From 5112c440f498c2b1f425ec468186909c243b92bc Mon Sep 17 00:00:00 2001 From: Lester Guerzon Date: Sat, 7 Sep 2024 15:06:26 +0800 Subject: [PATCH] feat: make enableServiceLinks configurable Signed-off-by: Lester Guerzon --- charts/vaultwarden/Chart.yaml | 2 +- charts/vaultwarden/README.md | 1 + charts/vaultwarden/ci/test-values.yaml | 2 ++ charts/vaultwarden/templates/_podSpec.tpl | 3 +++ charts/vaultwarden/values.yaml | 5 +++++ 5 files changed, 12 insertions(+), 1 deletion(-) diff --git a/charts/vaultwarden/Chart.yaml b/charts/vaultwarden/Chart.yaml index 8a2ac0a..cf9fad3 100644 --- a/charts/vaultwarden/Chart.yaml +++ b/charts/vaultwarden/Chart.yaml @@ -13,5 +13,5 @@ maintainers: - name: guerzon email: guerzon@proton.me url: https://github.com/guerzon -version: 0.27.0 +version: 0.28.0 kubeVersion: ">=1.12.0-0" diff --git a/charts/vaultwarden/README.md b/charts/vaultwarden/README.md index b37f9ff..187b308 100644 --- a/charts/vaultwarden/README.md +++ b/charts/vaultwarden/README.md @@ -338,6 +338,7 @@ helm -n $NAMESPACE uninstall $RELEASE_NAME | `podSecurityContext` | Pod security options | `{}` | | `securityContext` | Default security options to run vault as read only container without privilege escalation | `{}` | | `dnsConfig` | Pod DNS options | `{}` | +| `enableServiceLinks` | Enable service links, Kubernetes default is true | `""` | ### Reliability configuration diff --git a/charts/vaultwarden/ci/test-values.yaml b/charts/vaultwarden/ci/test-values.yaml index fc8eaa8..ca70b59 100644 --- a/charts/vaultwarden/ci/test-values.yaml +++ b/charts/vaultwarden/ci/test-values.yaml @@ -24,3 +24,5 @@ duo: iKey: "999888" sKey: value: "HELLO" + +enableServiceLinks: false diff --git a/charts/vaultwarden/templates/_podSpec.tpl b/charts/vaultwarden/templates/_podSpec.tpl index 8f60724..4911ec1 100644 --- a/charts/vaultwarden/templates/_podSpec.tpl +++ b/charts/vaultwarden/templates/_podSpec.tpl @@ -23,6 +23,9 @@ securityContext: initContainers: {{- toYaml . | nindent 2 }} {{- end }} +{{- if .Values.enableServiceLinks }} +enableServiceLinks: {{ .Values.enableServiceLinks }} +{{- end }} containers: - image: {{ .Values.image.registry }}/{{ .Values.image.repository }}:{{ .Values.image.tag }} imagePullPolicy: {{ .Values.image.pullPolicy }} diff --git a/charts/vaultwarden/values.yaml b/charts/vaultwarden/values.yaml index e235880..97df14e 100644 --- a/charts/vaultwarden/values.yaml +++ b/charts/vaultwarden/values.yaml @@ -124,6 +124,11 @@ securityContext: ## Ref: https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-dns-config dnsConfig: {} +## @param enableServiceLinks Enable service links, Kubernetes default is true +## Ref: https://kubernetes.io/docs/tutorials/services/connect-applications-service/#accessing-the-service +## +enableServiceLinks: "" + ## @section Reliability configuration ##