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:
parent
8bf77999dc
commit
7806159b38
5 changed files with 27 additions and 0 deletions
|
@ -244,6 +244,7 @@ Kubernetes: `>=1.19.0-0`
|
||||||
| controller.admissionWebhooks.createSecretJob.resources | object | `{}` | |
|
| controller.admissionWebhooks.createSecretJob.resources | object | `{}` | |
|
||||||
| controller.admissionWebhooks.enabled | bool | `true` | |
|
| controller.admissionWebhooks.enabled | bool | `true` | |
|
||||||
| controller.admissionWebhooks.existingPsp | string | `""` | Use an existing PSP instead of creating one |
|
| 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.failurePolicy | string | `"Fail"` | |
|
||||||
| controller.admissionWebhooks.key | string | `"/usr/local/certificates/key"` | |
|
| controller.admissionWebhooks.key | string | `"/usr/local/certificates/key"` | |
|
||||||
| controller.admissionWebhooks.labels | object | `{}` | Labels to be added to admission webhooks |
|
| controller.admissionWebhooks.labels | object | `{}` | Labels to be added to admission webhooks |
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
controller:
|
||||||
|
service:
|
||||||
|
type: ClusterIP
|
||||||
|
admissionWebhooks:
|
||||||
|
enabled: true
|
||||||
|
extraEnvs:
|
||||||
|
- name: FOO
|
||||||
|
value: foo
|
||||||
|
- name: TEST
|
||||||
|
value: test
|
||||||
|
patch:
|
||||||
|
enabled: true
|
|
@ -56,6 +56,9 @@ spec:
|
||||||
valueFrom:
|
valueFrom:
|
||||||
fieldRef:
|
fieldRef:
|
||||||
fieldPath: metadata.namespace
|
fieldPath: metadata.namespace
|
||||||
|
{{- if .Values.controller.admissionWebhooks.extraEnvs }}
|
||||||
|
{{- toYaml .Values.controller.admissionWebhooks.extraEnvs | nindent 12 }}
|
||||||
|
{{- end }}
|
||||||
securityContext:
|
securityContext:
|
||||||
allowPrivilegeEscalation: false
|
allowPrivilegeEscalation: false
|
||||||
{{- if .Values.controller.admissionWebhooks.createSecretJob.resources }}
|
{{- if .Values.controller.admissionWebhooks.createSecretJob.resources }}
|
||||||
|
|
|
@ -58,6 +58,9 @@ spec:
|
||||||
valueFrom:
|
valueFrom:
|
||||||
fieldRef:
|
fieldRef:
|
||||||
fieldPath: metadata.namespace
|
fieldPath: metadata.namespace
|
||||||
|
{{- if .Values.controller.admissionWebhooks.extraEnvs }}
|
||||||
|
{{- toYaml .Values.controller.admissionWebhooks.extraEnvs | nindent 12 }}
|
||||||
|
{{- end }}
|
||||||
securityContext:
|
securityContext:
|
||||||
allowPrivilegeEscalation: false
|
allowPrivilegeEscalation: false
|
||||||
{{- if .Values.controller.admissionWebhooks.patchWebhookJob.resources }}
|
{{- if .Values.controller.admissionWebhooks.patchWebhookJob.resources }}
|
||||||
|
|
|
@ -594,6 +594,14 @@ controller:
|
||||||
## These annotations will be added to the ValidatingWebhookConfiguration and
|
## These annotations will be added to the ValidatingWebhookConfiguration and
|
||||||
## the Jobs Spec of the admission webhooks.
|
## the Jobs Spec of the admission webhooks.
|
||||||
enabled: true
|
enabled: true
|
||||||
|
# -- Additional environment variables to set
|
||||||
|
extraEnvs: []
|
||||||
|
# extraEnvs:
|
||||||
|
# - name: FOO
|
||||||
|
# valueFrom:
|
||||||
|
# secretKeyRef:
|
||||||
|
# key: FOO
|
||||||
|
# name: secret-resource
|
||||||
failurePolicy: Fail
|
failurePolicy: Fail
|
||||||
# timeoutSeconds: 10
|
# timeoutSeconds: 10
|
||||||
port: 8443
|
port: 8443
|
||||||
|
|
Loading…
Reference in a new issue