From d721d9f6d1afdd36aac1ce61ff827683efcdfa84 Mon Sep 17 00:00:00 2001 From: Tao Li Date: Tue, 3 Dec 2024 20:32:55 +0800 Subject: [PATCH] feat: support for podAnnotations Signed-off-by: Tao Li --- charts/edb-postgres-distributed-for-kubernetes/README.md | 1 + .../templates/deployment.yaml | 3 +++ .../values.schema.json | 3 +++ charts/edb-postgres-distributed-for-kubernetes/values.yaml | 6 ++++-- 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/charts/edb-postgres-distributed-for-kubernetes/README.md b/charts/edb-postgres-distributed-for-kubernetes/README.md index b152bb7..209ef9b 100644 --- a/charts/edb-postgres-distributed-for-kubernetes/README.md +++ b/charts/edb-postgres-distributed-for-kubernetes/README.md @@ -72,6 +72,7 @@ global repository | | nameOverride | string | `""` | | | nodeSelector | object | `{}` | Nodeselector for the operator to be installed | | podAnnotations | object | `{}` | Annotations to be added to the pod | +| podLabels | object | `{}` | Labels to be added to the pod | | podSecurityContext | object | `{"runAsNonRoot":true,"seccompProfile":{"type":"RuntimeDefault"}}` | Security Context for the whole pod | | priorityClassName | string | `""` | Priority indicates the importance of a Pod relative to other Pods. | | rbac.aggregateClusterRoles | bool | `false` | Aggregate ClusterRoles to Kubernetes default user-facing roles. Ref: https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles | diff --git a/charts/edb-postgres-distributed-for-kubernetes/templates/deployment.yaml b/charts/edb-postgres-distributed-for-kubernetes/templates/deployment.yaml index 84cecaf..6dffb27 100644 --- a/charts/edb-postgres-distributed-for-kubernetes/templates/deployment.yaml +++ b/charts/edb-postgres-distributed-for-kubernetes/templates/deployment.yaml @@ -41,6 +41,9 @@ spec: labels: control-plane: controller-manager {{- include "edb-postgres-distributed-for-kubernetes.selectorLabels" . | nindent 8 }} + {{- with .Values.podLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} spec: {{- with .Values.imagePullSecrets }} imagePullSecrets: diff --git a/charts/edb-postgres-distributed-for-kubernetes/values.schema.json b/charts/edb-postgres-distributed-for-kubernetes/values.schema.json index 77de540..a5a414b 100644 --- a/charts/edb-postgres-distributed-for-kubernetes/values.schema.json +++ b/charts/edb-postgres-distributed-for-kubernetes/values.schema.json @@ -227,6 +227,9 @@ "podAnnotations": { "type": "object" }, + "podLabels": { + "type": "object" + }, "podSecurityContext": { "type": "object", "properties": { diff --git a/charts/edb-postgres-distributed-for-kubernetes/values.yaml b/charts/edb-postgres-distributed-for-kubernetes/values.yaml index 10048e8..d9c2fdb 100644 --- a/charts/edb-postgres-distributed-for-kubernetes/values.yaml +++ b/charts/edb-postgres-distributed-for-kubernetes/values.yaml @@ -127,10 +127,12 @@ rbac: # Ref: https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles aggregateClusterRoles: false -# -- Annotations to be added to the pod -podAnnotations: {} # -- Annotations to be added to all other resources commonAnnotations: {} +# -- Annotations to be added to the pod +podAnnotations: {} +# -- Labels to be added to the pod +podLabels: {} # -- Container Security Context containerSecurityContext: