From 0aa9aceda8ffd2abfa8921fcad3d59621ec3cedf 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 | 7 +++---- .../templates/deployment.yaml | 6 ++++++ .../values.schema.json | 6 ++++++ charts/edb-postgres-distributed-for-kubernetes/values.yaml | 3 +++ 4 files changed, 18 insertions(+), 4 deletions(-) diff --git a/charts/edb-postgres-distributed-for-kubernetes/README.md b/charts/edb-postgres-distributed-for-kubernetes/README.md index 209ef9b..f43b722 100644 --- a/charts/edb-postgres-distributed-for-kubernetes/README.md +++ b/charts/edb-postgres-distributed-for-kubernetes/README.md @@ -44,16 +44,16 @@ 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. Another repository is: docker.enterprisedb.com/k8s_standard_pgd | | global.pgdImageName | string | `"postgresql-pgd:16.4-5.5.1-1"` | Specifies the name of pgd image to be used for the operator, this image will be downloaded from -global repository | | global.proxyImageName | string | `"edb-pgd-proxy:5.5.0"` | Specifies the name of pgd-proxy image to be used for the operator, this image will be downloaded from -global repository | +| global.repository | string | `"docker.enterprisedb.com/k8s_enterprise_pgd"` | Specifies the repository where the operator image to be downloaded from. Another repository is: 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 | `""` | | @@ -94,4 +94,3 @@ global repository | | webhook.readinessProbe.periodSeconds | int | `20` | | | webhook.validating.create | bool | `true` | | | webhook.validating.failurePolicy | string | `"Fail"` | | - 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 a5a414b..e4b60ab 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": { @@ -130,6 +133,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 d9c2fdb..c8205ee 100644 --- a/charts/edb-postgres-distributed-for-kubernetes/values.yaml +++ b/charts/edb-postgres-distributed-for-kubernetes/values.yaml @@ -55,6 +55,9 @@ imagePullSecrets: nameOverride: "" fullnameOverride: "" +hostNetwork: false +dnsPolicy: "" + crds: create: true