From 1906c53de68d518b184fbe7ccf0f53d08ec31ade Mon Sep 17 00:00:00 2001 From: Shuyi Chen Date: Mon, 11 Nov 2024 13:48:39 -0800 Subject: [PATCH] [FLINK-36686] add operatorPod.webhook.container.env in helm chart to allow customizating of flink-webhook container envs --- docs/content/docs/operations/helm.md | 1 + .../flink-kubernetes-operator/templates/flink-operator.yaml | 3 +++ helm/flink-kubernetes-operator/values.yaml | 6 ++++++ 3 files changed, 10 insertions(+) diff --git a/docs/content/docs/operations/helm.md b/docs/content/docs/operations/helm.md index 54adfde0e6..44b54baad3 100644 --- a/docs/content/docs/operations/helm.md +++ b/docs/content/docs/operations/helm.md @@ -85,6 +85,7 @@ The configurable parameters of the Helm chart and which default values as detail | operatorPod.topologySpreadConstraints | Custom topologySpreadConstraints to be added to the operator pod. | | | operatorPod.resources | Custom resources block to be added to the operator pod on main container. | | | operatorPod.webhook.resources | Custom resources block to be added to the operator pod on flink-webhook container. | | +| operatorPod.webhook.container.env | Custom env to be added to the flink-webhook container | | | operatorPod.tolerations | Custom tolerations to be added to the operator pod. | | | operatorServiceAccount.create | Whether to enable operator service account to create for flink-kubernetes-operator. | true | | operatorServiceAccount.annotations | The annotations of operator service account. | | diff --git a/helm/flink-kubernetes-operator/templates/flink-operator.yaml b/helm/flink-kubernetes-operator/templates/flink-operator.yaml index 9146c0f9bb..9621f8f0bd 100644 --- a/helm/flink-kubernetes-operator/templates/flink-operator.yaml +++ b/helm/flink-kubernetes-operator/templates/flink-operator.yaml @@ -207,6 +207,9 @@ spec: valueFrom: fieldRef: fieldPath: metadata.namespace + {{- with .Values.operatorPod.webhook.container.env }} + {{- toYaml . | nindent 12 }} + {{- end }} resources: {{- toYaml .Values.operatorPod.webhook.resources | nindent 12 }} securityContext: diff --git a/helm/flink-kubernetes-operator/values.yaml b/helm/flink-kubernetes-operator/values.yaml index f2c3172898..824b265938 100644 --- a/helm/flink-kubernetes-operator/values.yaml +++ b/helm/flink-kubernetes-operator/values.yaml @@ -62,6 +62,8 @@ operatorPod: priorityClassName: null annotations: {} labels: {} + # The env variables only apply to the operator container in the operator pod + # TODO: consider making this pod level env variables env: # - name: "" # value: "" @@ -96,6 +98,10 @@ operatorPod: # memory: "512Mi" webhook: resources: {} + container: + env: + # - name: "" + # value: "" operatorServiceAccount: create: true