[FLINK-37242] Add labels for flink-operator-webhook-service
diff --git a/docs/content/docs/operations/helm.md b/docs/content/docs/operations/helm.md
index bc5fbfb..88dbeff 100644
--- a/docs/content/docs/operations/helm.md
+++ b/docs/content/docs/operations/helm.md
@@ -80,7 +80,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 and 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. | |
@@ -89,7 +89,7 @@
| 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.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. | |
@@ -108,6 +108,7 @@
| webhook.mutator.create | Enable or disable mutating webhook, overrides `webhook.create` | |
| webhook.validator.create | Enable or disable validating webhook, overrides `webhook.create` | |
| webhook.keystore | The ConfigMap of webhook key store. | useDefaultPassword: true |
+| webhook.serviceLabels | The labels for flink-operator-webhook-service-resource. | |
| defaultConfiguration.create | Whether to enable default configuration to create for flink-kubernetes-operator. | true |
| defaultConfiguration.append | Whether to append configuration files with configs. | true |
| defaultConfiguration.flink-conf.yaml | The default configuration of flink-conf.yaml. | kubernetes.operator.metrics.reporter.slf4j.factory.class: org.apache.flink.metrics.slf4j.Slf4jReporterFactory<br/>kubernetes.operator.metrics.reporter.slf4j.interval: 5 MINUTE<br/>kubernetes.operator.reconcile.interval: 15 s<br/>kubernetes.operator.observer.progress-check.interval: 5 s |
diff --git a/helm/flink-kubernetes-operator/templates/webhook.yaml b/helm/flink-kubernetes-operator/templates/webhook.yaml
index e7f703c..cfe64aa 100644
--- a/helm/flink-kubernetes-operator/templates/webhook.yaml
+++ b/helm/flink-kubernetes-operator/templates/webhook.yaml
@@ -23,6 +23,12 @@
metadata:
name: flink-operator-webhook-service
namespace: {{ .Release.Namespace }}
+ {{- if .Values.webhook.serviceLabels }}
+ labels:
+ {{- range $key, $value := .Values.webhook.serviceLabels }}
+ {{ $key }}: {{ $value }}
+ {{- end }}
+ {{- end }}
spec:
ports:
- port: 443
diff --git a/helm/flink-kubernetes-operator/values.yaml b/helm/flink-kubernetes-operator/values.yaml
index 824b265..c23d742 100644
--- a/helm/flink-kubernetes-operator/values.yaml
+++ b/helm/flink-kubernetes-operator/values.yaml
@@ -151,6 +151,7 @@
# passwordSecretRef:
# name: jks-password-secret
# key: password-key
+ serviceLabels: {}
defaultConfiguration:
# If set to true, creates ConfigMaps/VolumeMounts. If set to false, no configuration will be created.