From 7f59f2b36e18323b0eccd5c82c3bbb07067ccf23 Mon Sep 17 00:00:00 2001 From: Michael Kriese Date: Tue, 7 Mar 2023 11:18:25 +0000 Subject: [PATCH] feat: Add support for hostAliases (#401) (#97) picked from upstream - https://gitea.com/gitea/helm-chart/pulls/401 Co-authored-by: podain77 Reviewed-on: https://codeberg.org/forgejo-contrib/forgejo-helm/pulls/97 --- README.md | 1 + templates/gitea/statefulset.yaml | 4 ++++ values.yaml | 5 +++++ 3 files changed, 10 insertions(+) diff --git a/README.md b/README.md index 948a3c3..bfd67bd 100644 --- a/README.md +++ b/README.md @@ -593,6 +593,7 @@ gitea: | `global.imageRegistry` | global image registry override | `""` | | `global.imagePullSecrets` | global image pull secrets override; can be extended by `imagePullSecrets` | `[]` | | `global.storageClass` | global storage class override | `""` | +| `global.hostAliases` | global hostAliases which will be added to the pod's hosts files | `[]` | | `replicaCount` | number of replicas for the statefulset | `1` | | `clusterDomain` | cluster domain | `cluster.local` | diff --git a/templates/gitea/statefulset.yaml b/templates/gitea/statefulset.yaml index ce6f550..04cbdc5 100644 --- a/templates/gitea/statefulset.yaml +++ b/templates/gitea/statefulset.yaml @@ -302,6 +302,10 @@ spec: subPath: {{ .Values.persistence.subPath }} {{- end }} {{- include "gitea.container-additional-mounts" . | nindent 12 }} + {{- with .Values.global.hostAliases }} + hostAliases: + {{- toYaml . | nindent 8 }} + {{- end }} {{- with .Values.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} diff --git a/values.yaml b/values.yaml index a7f0450..d00bf4d 100644 --- a/values.yaml +++ b/values.yaml @@ -6,6 +6,7 @@ ## @param global.imageRegistry global image registry override ## @param global.imagePullSecrets global image pull secrets override; can be extended by `imagePullSecrets` ## @param global.storageClass global storage class override +## @param global.hostAliases global hostAliases which will be added to the pod's hosts files global: imageRegistry: "" ## E.g. @@ -14,6 +15,10 @@ global: ## imagePullSecrets: [] storageClass: "" + hostAliases: [] + # - ip: 192.168.137.2 + # hostnames: + # - example.com ## @param replicaCount number of replicas for the statefulset replicaCount: 1