fix(argo-applicationset): Fix deployment issue with AppSet v0.1.0 (#650)

* fix: Add supports for private repos configured using SSH

Signed-off-by: Matteo Ruina <matteo.ruina@gmail.com>

* fix(argo-applicationset): Allow to select with volumes to mount

Signed-off-by: Matteo Ruina <matteo.ruina@gmail.com>

* Fix RBAC rules

Signed-off-by: Matteo Ruina <matteo.ruina@gmail.com>

* Fix linting issue

Signed-off-by: Matteo Ruina <matteo.ruina@gmail.com>

* Fix chart version

Signed-off-by: Matteo Ruina <matteo.ruina@gmail.com>

Co-authored-by: Jonathan West <jgwest@users.noreply.github.com>
This commit is contained in:
Matteo Ruina 2021-04-13 14:59:29 +02:00 committed by GitHub
parent b8f483fb73
commit 4b9c281711
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 81 additions and 50 deletions

View file

@ -2,8 +2,8 @@ apiVersion: v2
name: argocd-applicationset name: argocd-applicationset
description: A Helm chart for installing ArgoCD ApplicationSet description: A Helm chart for installing ArgoCD ApplicationSet
type: application type: application
version: 0.1.0 version: 0.1.1
appVersion: "v0.1.0-prerelease" appVersion: "v0.1.0"
home: https://github.com/argoproj/argo-helm home: https://github.com/argoproj/argo-helm
icon: https://raw.githubusercontent.com/argoproj/argo/master/docs/assets/argo.png icon: https://raw.githubusercontent.com/argoproj/argo/master/docs/assets/argo.png
keywords: keywords:

View file

@ -46,6 +46,10 @@ Users of Helm v3 should set the `installCRDs` value to `false` to avoid warnings
| image.tag | string | `""` | Overrides the image tag whose default is the chart appVersion. | | image.tag | string | `""` | Overrides the image tag whose default is the chart appVersion. |
| imagePullSecrets | list | `[]` | If defined, uses a Secret to pull an image from a private Docker registry or repository. | | imagePullSecrets | list | `[]` | If defined, uses a Secret to pull an image from a private Docker registry or repository. |
| installCRDs | bool | `true` | Install Custom Resource Definition | | installCRDs | bool | `true` | Install Custom Resource Definition |
| mountSSHKnownHostsVolume | bool | `true` | Mount the `argocd-ssh-known-hosts-cm` volume |
| mountTLSCertsVolume | bool | `true` | Mount the `argocd-tls-certs-cm` volume |
| mountGPGKeysVolume | bool | `false` | Mount the `argocd-gpg-keys-cm` volume |
| mountGPGKeyringVolume | bool | `true` | Mount an emptyDir volume for `gpg-keyring` |
| nameOverride | string | `""` | Provide a name in place of `argo-applicationset` | | nameOverride | string | `""` | Provide a name in place of `argo-applicationset` |
| nodeSelector | object | `{}` | [Node selector](https://kubernetes.io/docs/user-guide/node-selection/) | | nodeSelector | object | `{}` | [Node selector](https://kubernetes.io/docs/user-guide/node-selection/) |
| podAnnotations | object | `{}` | Annotations for the controller pods | | podAnnotations | object | `{}` | Annotations for the controller pods |

View file

@ -49,6 +49,43 @@ spec:
protocol: TCP protocol: TCP
resources: resources:
{{- toYaml .Values.resources | nindent 12 }} {{- toYaml .Values.resources | nindent 12 }}
volumeMounts:
{{- if .Values.mountSSHKnownHostsVolume }}
- mountPath: /app/config/ssh
name: ssh-known-hosts
{{- end }}
{{- if .Values.mountTLSCertsVolume }}
- mountPath: /app/config/tls
name: tls-certs
{{- end }}
{{- if .Values.mountGPGKeysVolume }}
- mountPath: /app/config/gpg/source
name: gpg-keys
{{- end }}
{{- if .Values.mountGPGKeyringVolume }}
- mountPath: /app/config/gpg/keys
name: gpg-keyring
{{- end }}
volumes:
{{- if .Values.mountSSHKnownHostsVolume }}
- configMap:
name: argocd-ssh-known-hosts-cm
name: ssh-known-hosts
{{- end }}
{{- if .Values.mountTLSCertsVolume }}
- configMap:
name: argocd-tls-certs-cm
name: tls-certs
{{- end }}
{{- if .Values.mountGPGKeysVolume }}
- configMap:
name: argocd-gpg-keys-cm
name: gpg-keys
{{- end }}
{{- if .Values.mountGPGKeyringVolume }}
- emptyDir: {}
name: gpg-keyring
{{- end }}
{{- with .Values.nodeSelector }} {{- with .Values.nodeSelector }}
nodeSelector: nodeSelector:
{{- toYaml . | nindent 8 }} {{- toYaml . | nindent 8 }}

View file

@ -6,73 +6,58 @@ metadata:
{{- include "argo-applicationset.labels" . | nindent 4 }} {{- include "argo-applicationset.labels" . | nindent 4 }}
rules: rules:
- apiGroups: - apiGroups:
- argoproj.io - argoproj.io
resources: resources:
- applications - applications
- applicationsets - appprojects
- applicationsets/finalizers - applicationsets
- applicationsets/finalizers
verbs: verbs:
- create - create
- delete - delete
- get - get
- list - list
- patch - patch
- update - update
- watch - watch
- apiGroups: - apiGroups:
- argoproj.io - argoproj.io
resources: resources:
- applicationsets/status - applicationsets/status
verbs: verbs:
- get - get
- patch - patch
- update - update
- apiGroups: - apiGroups:
- '' - ""
resources: resources:
- events - events
verbs: verbs:
- create - create
- delete - delete
- get - get
- list - list
- patch - patch
- update - update
- watch - watch
- apiGroups: - apiGroups:
- '' - ""
resources:
- secrets
verbs:
- get
- list
- watch
- apiGroups:
- ''
resources: resources:
- secrets
- configmaps - configmaps
verbs: verbs:
- get - get
- list - list
- watch - watch
- create
- update
- patch
- delete
- apiGroups: - apiGroups:
- '' - apps
- extensions
resources: resources:
- configmaps/status - deployments
verbs: verbs:
- get - get
- update - list
- patch - watch
- apiGroups:
- ''
resources:
- events
verbs:
- create
--- ---
apiVersion: rbac.authorization.k8s.io/v1 apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding kind: RoleBinding

View file

@ -70,3 +70,8 @@ nodeSelector: {}
tolerations: [] tolerations: []
affinity: {} affinity: {}
mountSSHKnownHostsVolume: true
mountTLSCertsVolume: true
mountGPGKeysVolume: false
mountGPGKeyringVolume: true