feat: Add securityContext. Fixes #96 (#185)

* make securityContext optional
* add docs
* bump chart version
Signed-off-by: David J. M. Karlsen <david@davidkarlsen.com>
This commit is contained in:
David J. M. Karlsen 2019-12-16 03:55:09 +01:00 committed by Sean Johnson
parent 78f4b788da
commit c1f6ed45f5
7 changed files with 18 additions and 1 deletions

View file

@ -2,7 +2,7 @@ apiVersion: v1
appVersion: "1.3.6" appVersion: "1.3.6"
description: A Helm chart for ArgoCD, a declarative, GitOps continuous delivery tool for Kubernetes. description: A Helm chart for ArgoCD, a declarative, GitOps continuous delivery tool for Kubernetes.
name: argo-cd name: argo-cd
version: 1.4.8 version: 1.5.0
home: https://github.com/argoproj/argo-helm home: https://github.com/argoproj/argo-helm
icon: https://raw.githubusercontent.com/argoproj/argo/master/argo.png icon: https://raw.githubusercontent.com/argoproj/argo/master/argo.png
keywords: keywords:

View file

@ -32,6 +32,7 @@ $ helm install --name my-release argo/argo-cd
| global.image.imagePullPolicy | If defined, a imagePullPolicy applied to all ArgoCD deployments. | `"IfNotPresent"` | | global.image.imagePullPolicy | If defined, a imagePullPolicy applied to all ArgoCD deployments. | `"IfNotPresent"` |
| global.image.repository | If defined, a repository applied to all ArgoCD deployments. | `"argoproj/argocd"` | | global.image.repository | If defined, a repository applied to all ArgoCD deployments. | `"argoproj/argocd"` |
| global.image.tag | If defined, a tag applied to all ArgoCD deployments. | `"v1.3.6"` | | global.image.tag | If defined, a tag applied to all ArgoCD deployments. | `"v1.3.6"` |
| global.securityContext | Toggle and define securityContext | See [values.yaml](values.yaml) | 
| nameOverride | Provide a name in place of `argocd` | `"argocd"` | | nameOverride | Provide a name in place of `argocd` | `"argocd"` |
| configs.knownHosts.data.ssh_known_hosts | Known Hosts | See [values.yaml](values.yaml) | | configs.knownHosts.data.ssh_known_hosts | Known Hosts | See [values.yaml](values.yaml) |
| configs.secret.bitbucketSecret | BitBucket incoming webhook secret | `""` | | configs.secret.bitbucketSecret | BitBucket incoming webhook secret | `""` |

View file

@ -35,6 +35,9 @@ spec:
{{- toYaml .Values.controller.podLabels | nindent 8 }} {{- toYaml .Values.controller.podLabels | nindent 8 }}
{{- end }} {{- end }}
spec: spec:
{{- if .Values.global.securityContext }}
securityContext: {{- toYaml .Values.global.securityContext | nindent 8 }}
{{- end }}
containers: containers:
- command: - command:
- argocd-application-controller - argocd-application-controller

View file

@ -35,6 +35,9 @@ spec:
{{- toYaml .Values.controller.podLabels | nindent 8 }} {{- toYaml .Values.controller.podLabels | nindent 8 }}
{{- end }} {{- end }}
spec: spec:
{{- if .Values.global.securityContext }}
securityContext: {{- toYaml .Values.global.securityContext | nindent 8 }}
{{- end }}
containers: containers:
- name: {{ .Values.repoServer.name }} - name: {{ .Values.repoServer.name }}
image: {{ default .Values.global.image.repository .Values.repoServer.image.repository }}:{{ default .Values.global.image.tag .Values.repoServer.image.tag }} image: {{ default .Values.global.image.repository .Values.repoServer.image.repository }}:{{ default .Values.global.image.tag .Values.repoServer.image.tag }}

View file

@ -35,6 +35,9 @@ spec:
{{- toYaml .Values.controller.podLabels | nindent 8 }} {{- toYaml .Values.controller.podLabels | nindent 8 }}
{{- end }} {{- end }}
spec: spec:
{{- if .Values.global.securityContext }}
securityContext: {{- toYaml .Values.global.securityContext | nindent 8 }}
{{- end }}
containers: containers:
- name: {{ .Values.server.name }} - name: {{ .Values.server.name }}
image: {{ default .Values.global.image.repository .Values.server.image.repository }}:{{ default .Values.global.image.tag .Values.server.image.tag }} image: {{ default .Values.global.image.repository .Values.server.image.repository }}:{{ default .Values.global.image.tag .Values.server.image.tag }}

View file

@ -25,6 +25,9 @@ spec:
app.kubernetes.io/component: {{ .Values.redis.name }} app.kubernetes.io/component: {{ .Values.redis.name }}
spec: spec:
automountServiceAccountToken: false automountServiceAccountToken: false
{{- if .Values.global.securityContext }}
securityContext: {{- toYaml .Values.global.securityContext | nindent 8 }}
{{- end }}
containers: containers:
- name: {{ template "argo-cd.redis.fullname" . }} - name: {{ template "argo-cd.redis.fullname" . }}
args: args:

View file

@ -12,6 +12,10 @@ global:
repository: argoproj/argocd repository: argoproj/argocd
tag: v1.3.6 tag: v1.3.6
imagePullPolicy: IfNotPresent imagePullPolicy: IfNotPresent
securityContext: {}
# runAsUser: 999
# runAsGroup: 999
# fsGroup: 999
## Controller ## Controller
controller: controller: