support extraEnvs for job resources in helm chart (#8545)

* support extraEnvs for job resources in helm chart

Signed-off-by: Li, Eric <Xiannan.li@fmr.com>

* Update helm doc

* Update helm doc

* Updated helm doc - add controller.admissionWebhooks.extraEnvs

* Added some test data for webhook controller.admissionWebhooks.extraEnvs

* added new line at the end of deployment-webhook-extraEnvs-values.yaml

* Fixed helm chart test issue
This commit is contained in:
Eric84626 2022-06-21 22:16:26 +08:00 committed by GitHub
parent 8bf77999dc
commit 7806159b38
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 27 additions and 0 deletions

View file

@ -244,6 +244,7 @@ Kubernetes: `>=1.19.0-0`
| controller.admissionWebhooks.createSecretJob.resources | object | `{}` | |
| controller.admissionWebhooks.enabled | bool | `true` | |
| controller.admissionWebhooks.existingPsp | string | `""` | Use an existing PSP instead of creating one |
| controller.admissionWebhooks.extraEnvs | list | `[]` | Additional environment variables to set |
| controller.admissionWebhooks.failurePolicy | string | `"Fail"` | |
| controller.admissionWebhooks.key | string | `"/usr/local/certificates/key"` | |
| controller.admissionWebhooks.labels | object | `{}` | Labels to be added to admission webhooks |

View file

@ -0,0 +1,12 @@
controller:
service:
type: ClusterIP
admissionWebhooks:
enabled: true
extraEnvs:
- name: FOO
value: foo
- name: TEST
value: test
patch:
enabled: true

View file

@ -56,6 +56,9 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.namespace
{{- if .Values.controller.admissionWebhooks.extraEnvs }}
{{- toYaml .Values.controller.admissionWebhooks.extraEnvs | nindent 12 }}
{{- end }}
securityContext:
allowPrivilegeEscalation: false
{{- if .Values.controller.admissionWebhooks.createSecretJob.resources }}

View file

@ -58,6 +58,9 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.namespace
{{- if .Values.controller.admissionWebhooks.extraEnvs }}
{{- toYaml .Values.controller.admissionWebhooks.extraEnvs | nindent 12 }}
{{- end }}
securityContext:
allowPrivilegeEscalation: false
{{- if .Values.controller.admissionWebhooks.patchWebhookJob.resources }}

View file

@ -594,6 +594,14 @@ controller:
## These annotations will be added to the ValidatingWebhookConfiguration and
## the Jobs Spec of the admission webhooks.
enabled: true
# -- Additional environment variables to set
extraEnvs: []
# extraEnvs:
# - name: FOO
# valueFrom:
# secretKeyRef:
# key: FOO
# name: secret-resource
failurePolicy: Fail
# timeoutSeconds: 10
port: 8443