From 0b57fee16c9ec5c1f7435c33a3f115f40427d716 Mon Sep 17 00:00:00 2001 From: Tao Li Date: Wed, 4 Dec 2024 09:35:48 +0800 Subject: [PATCH] feat: support hostnetwork and dnsPolicy for operator pod Signed-off-by: Tao Li --- charts/edb-postgres-distributed-for-kubernetes/README.md | 2 ++ .../templates/deployment.yaml | 6 ++++++ .../values.schema.json | 6 ++++++ charts/edb-postgres-distributed-for-kubernetes/values.yaml | 3 +++ 4 files changed, 17 insertions(+) diff --git a/charts/edb-postgres-distributed-for-kubernetes/README.md b/charts/edb-postgres-distributed-for-kubernetes/README.md index 57d4eed..9ad6840 100644 --- a/charts/edb-postgres-distributed-for-kubernetes/README.md +++ b/charts/edb-postgres-distributed-for-kubernetes/README.md @@ -44,12 +44,14 @@ EDB Postgres Distributed for Kubernetes Helm Chart | config.secret | bool | `false` | Specifies whether it should be stored in a secret, instead of a configmap | | containerSecurityContext | object | `{"allowPrivilegeEscalation":false,"capabilities":{"drop":["ALL"]},"readOnlyRootFilesystem":true,"runAsGroup":10001,"runAsUser":10001}` | Container Security Context | | crds.create | bool | `true` | | +| dnsPolicy | string | `""` | | | edb-postgres-for-kubernetes-lts.crds.create | bool | `true` | | | edb-postgres-for-kubernetes-lts.enabled | bool | `true` | | | edb-postgres-for-kubernetes-lts.image.repository | string | `""` | | | fullnameOverride | string | `""` | | | global | object | `{"repository":"docker.enterprisedb.com/k8s_enterprise_pgd"}` | Global values | | global.repository | string | `"docker.enterprisedb.com/k8s_enterprise_pgd"` | Specifies the repository where the operator image to be downloaded from repository: docker.enterprisedb.com/k8s_standard_pgd | +| hostNetwork | bool | `false` | | | image.imageCredentials.create | bool | `true` | Specifies if an imagePullSecret should be created | | image.imageCredentials.name | string | `"edb-pull-secret"` | | | image.imageCredentials.password | string | `""` | | diff --git a/charts/edb-postgres-distributed-for-kubernetes/templates/deployment.yaml b/charts/edb-postgres-distributed-for-kubernetes/templates/deployment.yaml index 6dffb27..462d1d6 100644 --- a/charts/edb-postgres-distributed-for-kubernetes/templates/deployment.yaml +++ b/charts/edb-postgres-distributed-for-kubernetes/templates/deployment.yaml @@ -49,6 +49,12 @@ spec: imagePullSecrets: {{- toYaml . | nindent 8 }} {{- end }} + {{- if .Values.hostNetwork }} + hostNetwork: {{ .Values.hostNetwork }} + {{- end }} + {{- if .Values.dnsPolicy }} + dnsPolicy: {{ .Values.dnsPolicy }} + {{- end }} containers: - args: - controller diff --git a/charts/edb-postgres-distributed-for-kubernetes/values.schema.json b/charts/edb-postgres-distributed-for-kubernetes/values.schema.json index 1bea8dd..76eacbb 100644 --- a/charts/edb-postgres-distributed-for-kubernetes/values.schema.json +++ b/charts/edb-postgres-distributed-for-kubernetes/values.schema.json @@ -89,6 +89,9 @@ } } }, + "dnsPolicy": { + "type": "string" + }, "edb-postgres-for-kubernetes-lts": { "type": "object", "properties": { @@ -124,6 +127,9 @@ } } }, + "hostNetwork": { + "type": "boolean" + }, "image": { "type": "object", "properties": { diff --git a/charts/edb-postgres-distributed-for-kubernetes/values.yaml b/charts/edb-postgres-distributed-for-kubernetes/values.yaml index a1dc5d6..e5ab34d 100644 --- a/charts/edb-postgres-distributed-for-kubernetes/values.yaml +++ b/charts/edb-postgres-distributed-for-kubernetes/values.yaml @@ -47,6 +47,9 @@ imagePullSecrets: nameOverride: "" fullnameOverride: "" +hostNetwork: false +dnsPolicy: "" + crds: create: true