You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by gy...@apache.org on 2022/06/25 05:52:07 UTC

[flink-kubernetes-operator] branch main updated: [FLINK-27788] Custom labels for the operator pod

This is an automated email from the ASF dual-hosted git repository.

gyfora pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/flink-kubernetes-operator.git


The following commit(s) were added to refs/heads/main by this push:
     new a9f08d1  [FLINK-27788] Custom labels for the operator pod
a9f08d1 is described below

commit a9f08d1958f84b1dfa371be65a9701bee69a0bd0
Author: Marton Balassi <ma...@apple.com>
AuthorDate: Thu Jun 23 10:49:07 2022 +0200

    [FLINK-27788] Custom labels for the operator pod
---
 docs/content/docs/operations/helm.md                        |  4 +++-
 .../flink-kubernetes-operator/templates/flink-operator.yaml | 13 +++++++++----
 helm/flink-kubernetes-operator/values.yaml                  |  1 +
 3 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/docs/content/docs/operations/helm.md b/docs/content/docs/operations/helm.md
index e1831d1..48c5a91 100644
--- a/docs/content/docs/operations/helm.md
+++ b/docs/content/docs/operations/helm.md
@@ -64,6 +64,8 @@ The configurable parameters of the Helm chart and which default values as detail
 | image.pullPolicy | The image pull policy of flink-kubernetes-operator. | IfNotPresent |
 | image.tag | The image tag of flink-kubernetes-operator. | latest |
 | rbac.create | Whether to enable RBAC to create for said namespaces. | true |
+| operatorPod.annotations | Custom annotations to be added to the operator pod (but not the deployment). | |
+| operatorPod.labels | Custom labels to be added to the operator pod (but not the deployment). | |
 | operatorServiceAccount.create | Whether to enable operator service account to create for flink-kubernetes-operator. | true |
 | operatorServiceAccount.annotations | The annotations of operator service account. | |
 | operatorServiceAccount.name | The name of operator service account. | flink-operator |
@@ -78,7 +80,7 @@ The configurable parameters of the Helm chart and which default values as detail
 | operatorSecurityContext | Defines privilege and access control settings for a pod or container for operator security context.  | |
 | webhookSecurityContext | Defines privilege and access control settings for a pod or container for webhook security context. | |
 | webhook.create | Whether to enable webhook validator to create for flink-kubernetes-operator.                        | true |
-| wenhook.mutator.create | Whether to enable webhook mutator to create for flink-kubernetes-operator. | True |
+| webhook.mutator.create | Whether to enable webhook mutator to create for flink-kubernetes-operator. | true |
 | webhook.keystore | The ConfigMap of webhook key store. | useDefaultPassword: true |
 | defaultConfiguration.create | Whether to enable default configuration to create for flink-kubernetes-operator. | true |
 | defaultConfiguration.append | Whether to append configuration files with configs.  | true |
diff --git a/helm/flink-kubernetes-operator/templates/flink-operator.yaml b/helm/flink-kubernetes-operator/templates/flink-operator.yaml
index a416dea..1591271 100644
--- a/helm/flink-kubernetes-operator/templates/flink-operator.yaml
+++ b/helm/flink-kubernetes-operator/templates/flink-operator.yaml
@@ -34,13 +34,18 @@ spec:
     metadata:
       labels:
         {{- include "flink-operator.selectorLabels" . | nindent 8 }}
+        {{- if index (.Values.operatorPod) "labels" }}
+          {{- with .Values.operatorPod.labels }}
+            {{- toYaml . | nindent 8 }}
+          {{- end }}
+        {{- end }}
       annotations:
         kubectl.kubernetes.io/default-container: {{ .Chart.Name }}
-       {{- if index (.Values.operatorPod) "annotations" }}
-        {{- with .Values.operatorPod.annotations }}
-          {{- toYaml . | nindent 8 }}
+        {{- if index (.Values.operatorPod) "annotations" }}
+          {{- with .Values.operatorPod.annotations }}
+            {{- toYaml . | nindent 8 }}
+          {{- end }}
         {{- end }}
-       {{- end }}
     spec:
       securityContext:
         {{- toYaml .Values.podSecurityContext | nindent 8 }}
diff --git a/helm/flink-kubernetes-operator/values.yaml b/helm/flink-kubernetes-operator/values.yaml
index db9b7a1..0cd53b5 100644
--- a/helm/flink-kubernetes-operator/values.yaml
+++ b/helm/flink-kubernetes-operator/values.yaml
@@ -32,6 +32,7 @@ rbac:
 
 operatorPod:
    annotations: {}
+   labels: {}
 
 operatorServiceAccount:
   create: true