Skip to content

Commit c074ae1

Browse files
authored
Merge pull request #13375 from kiblik/helm_automountServiceAccountToken
feat(helm): Add support for automountServiceAccountToken
2 parents 10c2d51 + c72f0b2 commit c074ae1

9 files changed

Lines changed: 33 additions & 1 deletion

File tree

helm/defectdojo/Chart.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,6 @@ annotations:
3434
# - kind: security
3535
# description: Critical bug
3636
artifacthub.io/prerelease: "true"
37-
artifacthub.io/changes: ""
37+
artifacthub.io/changes: |
38+
- kind: added
39+
description: Add support for automountServiceAccountToken

helm/defectdojo/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -528,6 +528,7 @@ A Helm chart for Kubernetes to install DefectDojo
528528
| celery.annotations | object | `{}` | |
529529
| celery.beat.affinity | object | `{}` | |
530530
| celery.beat.annotations | object | `{}` | |
531+
| celery.beat.automountServiceAccountToken | bool | `false` | |
531532
| celery.beat.extraEnv | list | `[]` | |
532533
| celery.beat.extraInitContainers | list | `[]` | |
533534
| celery.beat.extraVolumeMounts | list | `[]` | |
@@ -548,6 +549,7 @@ A Helm chart for Kubernetes to install DefectDojo
548549
| celery.worker.affinity | object | `{}` | |
549550
| celery.worker.annotations | object | `{}` | |
550551
| celery.worker.appSettings.poolType | string | `"solo"` | |
552+
| celery.worker.automountServiceAccountToken | bool | `false` | |
551553
| celery.worker.extraEnv | list | `[]` | |
552554
| celery.worker.extraInitContainers | list | `[]` | |
553555
| celery.worker.extraVolumeMounts | list | `[]` | |
@@ -582,6 +584,7 @@ A Helm chart for Kubernetes to install DefectDojo
582584
| disableHooks | bool | `false` | |
583585
| django.affinity | object | `{}` | |
584586
| django.annotations | object | `{}` | |
587+
| django.automountServiceAccountToken | bool | `false` | |
585588
| django.extraInitContainers | list | `[]` | |
586589
| django.extraVolumes | list | `[]` | |
587590
| django.ingress.activateTLS | bool | `true` | |
@@ -656,6 +659,7 @@ A Helm chart for Kubernetes to install DefectDojo
656659
| imagePullSecrets | string | `nil` | |
657660
| initializer.affinity | object | `{}` | |
658661
| initializer.annotations | object | `{}` | |
662+
| initializer.automountServiceAccountToken | bool | `false` | |
659663
| initializer.extraEnv | list | `[]` | |
660664
| initializer.extraVolumeMounts | list | `[]` | |
661665
| initializer.extraVolumes | list | `[]` | |
@@ -722,6 +726,7 @@ A Helm chart for Kubernetes to install DefectDojo
722726
| serviceAccount.create | bool | `true` | |
723727
| serviceAccount.labels | object | `{}` | |
724728
| tag | string | `"latest"` | |
729+
| tests.unitTests.automountServiceAccountToken | bool | `false` | |
725730
| tests.unitTests.resources.limits.cpu | string | `"500m"` | |
726731
| tests.unitTests.resources.limits.memory | string | `"512Mi"` | |
727732
| tests.unitTests.resources.requests.cpu | string | `"100m"` | |

helm/defectdojo/templates/celery-beat-deployment.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ spec:
5252
{{- end }}
5353
spec:
5454
serviceAccountName: {{ include "defectdojo.serviceAccountName" . }}
55+
automountServiceAccountToken: {{ .Values.celery.beat.automountServiceAccountToken }}
5556
{{- with .Values.imagePullSecrets }}
5657
imagePullSecrets:
5758
- name: {{ . }}

helm/defectdojo/templates/celery-worker-deployment.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ spec:
5252
{{- end }}
5353
spec:
5454
serviceAccountName: {{ include "defectdojo.serviceAccountName" . }}
55+
automountServiceAccountToken: {{ .Values.celery.worker.automountServiceAccountToken }}
5556
{{- with .Values.imagePullSecrets }}
5657
imagePullSecrets:
5758
- name: {{ . }}

helm/defectdojo/templates/django-deployment.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ spec:
5959
{{- end }}
6060
spec:
6161
serviceAccountName: {{ include "defectdojo.serviceAccountName" . }}
62+
automountServiceAccountToken: {{ .Values.django.automountServiceAccountToken }}
6263
{{- with .Values.imagePullSecrets }}
6364
imagePullSecrets:
6465
- name: {{ quote . }}

helm/defectdojo/templates/initializer-job.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ spec:
3939
{{- end }}
4040
spec:
4141
serviceAccountName: {{ include "defectdojo.serviceAccountName" . }}
42+
automountServiceAccountToken: {{ .Values.initializer.automountServiceAccountToken }}
4243
{{- with .Values.imagePullSecrets }}
4344
imagePullSecrets:
4445
- name: {{ . }}

helm/defectdojo/templates/tests/unit-tests.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ metadata:
1212
helm.sh/hook: test-success
1313
spec:
1414
serviceAccountName: {{ include "defectdojo.serviceAccountName" . }}
15+
automountServiceAccountToken: {{ .Values.tests.unitTests.automountServiceAccountToken }}
1516
{{- with .Values.imagePullSecrets }}
1617
imagePullSecrets:
1718
- name: {{ . }}

helm/defectdojo/values.schema.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@
4949
"annotations": {
5050
"type": "object"
5151
},
52+
"automountServiceAccountToken": {
53+
"type": "boolean"
54+
},
5255
"extraEnv": {
5356
"type": "array"
5457
},
@@ -134,6 +137,9 @@
134137
}
135138
}
136139
},
140+
"automountServiceAccountToken": {
141+
"type": "boolean"
142+
},
137143
"extraEnv": {
138144
"type": "array"
139145
},
@@ -288,6 +294,9 @@
288294
"annotations": {
289295
"type": "object"
290296
},
297+
"automountServiceAccountToken": {
298+
"type": "boolean"
299+
},
291300
"extraInitContainers": {
292301
"type": "array"
293302
},
@@ -616,6 +625,9 @@
616625
"annotations": {
617626
"type": "object"
618627
},
628+
"automountServiceAccountToken": {
629+
"type": "boolean"
630+
},
619631
"extraEnv": {
620632
"type": "array"
621633
},
@@ -968,6 +980,9 @@
968980
"unitTests": {
969981
"type": "object",
970982
"properties": {
983+
"automountServiceAccountToken": {
984+
"type": "boolean"
985+
},
971986
"resources": {
972987
"type": "object",
973988
"properties": {

helm/defectdojo/values.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ dbMigrationChecker:
114114

115115
tests:
116116
unitTests:
117+
automountServiceAccountToken: false
117118
resources:
118119
requests:
119120
cpu: 100m
@@ -153,6 +154,7 @@ celery:
153154
# Common annotations to worker and beat deployments and pods.
154155
annotations: {}
155156
beat:
157+
automountServiceAccountToken: false
156158
# Annotations for the Celery beat deployment.
157159
annotations: {}
158160
affinity: {}
@@ -192,6 +194,7 @@ celery:
192194
startupProbe: {}
193195
tolerations: []
194196
worker:
197+
automountServiceAccountToken: false
195198
# Annotations for the Celery worker deployment.
196199
annotations: {}
197200
affinity: {}
@@ -241,6 +244,7 @@ celery:
241244
# prefetchMultiplier: 128
242245

243246
django:
247+
automountServiceAccountToken: false
244248
annotations: {}
245249
service:
246250
annotations: {}
@@ -364,6 +368,7 @@ django:
364368

365369
initializer:
366370
run: true
371+
automountServiceAccountToken: false
367372
jobAnnotations: {}
368373
annotations: {}
369374
labels: {}

0 commit comments

Comments
 (0)