[FLINK-35402][helm] Add labels to metadata
diff --git a/docs/content.zh/docs/operations/helm.md b/docs/content.zh/docs/operations/helm.md
index 12425a1..54adfde 100644
--- a/docs/content.zh/docs/operations/helm.md
+++ b/docs/content.zh/docs/operations/helm.md
@@ -76,7 +76,7 @@
| rbac.create | Whether to enable RBAC to create for said namespaces. | true |
| rbac.nodesRule.create | Whether to add RBAC rule to list nodes which is needed for rest-service exposed as NodePort type. | false |
| 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). | |
+| operatorPod.labels | Custom labels to be added to the operator pod and deployment. | |
| operatorPod.env | Custom env to be added to the operator pod. | |
| operatorPod.envFrom | Custom envFrom settings to be added to the operator pod. | |
| operatorPod.dnsPolicy | DNS policy to be used by the operator pod. | |
diff --git a/docs/content/docs/operations/helm.md b/docs/content/docs/operations/helm.md
index 12425a1..54adfde 100644
--- a/docs/content/docs/operations/helm.md
+++ b/docs/content/docs/operations/helm.md
@@ -76,7 +76,7 @@
| rbac.create | Whether to enable RBAC to create for said namespaces. | true |
| rbac.nodesRule.create | Whether to add RBAC rule to list nodes which is needed for rest-service exposed as NodePort type. | false |
| 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). | |
+| operatorPod.labels | Custom labels to be added to the operator pod and deployment. | |
| operatorPod.env | Custom env to be added to the operator pod. | |
| operatorPod.envFrom | Custom envFrom settings to be added to the operator pod. | |
| operatorPod.dnsPolicy | DNS policy to be used by the operator pod. | |
diff --git a/helm/flink-kubernetes-operator/templates/flink-operator.yaml b/helm/flink-kubernetes-operator/templates/flink-operator.yaml
index 69e1f8f..87a3e80 100644
--- a/helm/flink-kubernetes-operator/templates/flink-operator.yaml
+++ b/helm/flink-kubernetes-operator/templates/flink-operator.yaml
@@ -23,6 +23,11 @@
namespace: {{ .Release.Namespace }}
labels:
{{- include "flink-operator.labels" . | nindent 4 }}
+ {{- if index (.Values.operatorPod) "labels" }}
+ {{- with .Values.operatorPod.labels }}
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
+ {{- end }}
spec:
replicas: {{ .Values.replicas }}
strategy: