From 4c15561a387d9b31d286cb26fc0d2bfafb6f0e4e Mon Sep 17 00:00:00 2001 From: 51ame <79866689+51ame@users.noreply.github.com> Date: Thu, 13 Aug 2026 11:54:27 +0300 Subject: [PATCH 1/3] add hostAliases support --- CHANGELOG.md | 4 ++++ charts/sourcebot/README.md | 1 + charts/sourcebot/templates/deployment.yaml | 4 ++++ charts/sourcebot/values.schema.json | 3 +++ charts/sourcebot/values.yaml | 7 +++++++ 5 files changed, 19 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1a941fd..53ddc22 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Added + +- `sourcebot.hostAliases` value for injecting entries into the pod's `/etc/hosts`. [#NNN](https://github.com/sourcebot-dev/sourcebot-helm-chart/pull/NNN) + ## [0.1.101] - 2026-08-13 ### Changed diff --git a/charts/sourcebot/README.md b/charts/sourcebot/README.md index 613e2ac..0bbdd6f 100644 --- a/charts/sourcebot/README.md +++ b/charts/sourcebot/README.md @@ -75,6 +75,7 @@ Sourcebot is a self-hosted tool that helps you understand your codebase. | sourcebot.envFrom | list | `[]` | Load environment variables from ConfigMaps and Secrets This is useful for injecting multiple environment variables from external secret management systems | | sourcebot.extraVolumeMounts | list | `[]` | Define volume mounts for the container See: https://kubernetes.io/docs/concepts/storage/volumes/ | | sourcebot.extraVolumes | list | `[]` | Define additional volumes See: https://kubernetes.io/docs/concepts/storage/volumes/ | +| sourcebot.hostAliases | list | `[]` | Set host aliases to inject entries into the pod's /etc/hosts file See: https://kubernetes.io/docs/tasks/network/customize-hosts-file-for-pods/ | | sourcebot.image.digest | string | `""` | Container image digest (used instead of tag if set) | | sourcebot.image.pullPolicy | string | `"IfNotPresent"` | Image pull policy | | sourcebot.image.pullSecrets | list | `[]` | Configure image pull secrets for private registries | diff --git a/charts/sourcebot/templates/deployment.yaml b/charts/sourcebot/templates/deployment.yaml index b990eb6..9fd2fbf 100644 --- a/charts/sourcebot/templates/deployment.yaml +++ b/charts/sourcebot/templates/deployment.yaml @@ -167,3 +167,7 @@ spec: tolerations: {{- toYaml . | nindent 8 }} {{- end }} + {{- with $.Values.sourcebot.hostAliases }} + hostAliases: + {{- toYaml . | nindent 8 }} + {{- end }} diff --git a/charts/sourcebot/values.schema.json b/charts/sourcebot/values.schema.json index 9d94b5d..479a217 100644 --- a/charts/sourcebot/values.schema.json +++ b/charts/sourcebot/values.schema.json @@ -200,6 +200,9 @@ "tolerations": { "type": "array" }, + "hostAliases": { + "type": "array" + }, "affinity": { "type": "object" }, diff --git a/charts/sourcebot/values.yaml b/charts/sourcebot/values.yaml index d75b11e..feac102 100644 --- a/charts/sourcebot/values.yaml +++ b/charts/sourcebot/values.yaml @@ -297,6 +297,13 @@ sourcebot: # operator: Equal # value: "value" + # -- Set host aliases to inject entries into the pod's /etc/hosts file + # See: https://kubernetes.io/docs/tasks/network/customize-hosts-file-for-pods/ + hostAliases: [] + # - ip: "10.0.0.10" + # hostnames: + # - "gitlab.internal.example.com" + # -- Set affinity rules for pod scheduling # Defaults to soft anti-affinity if not set # See: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/ From 9f528cd2d80974749271a8932972fd6014f6afc3 Mon Sep 17 00:00:00 2001 From: 51ame <79866689+51ame@users.noreply.github.com> Date: Thu, 13 Aug 2026 12:01:25 +0300 Subject: [PATCH 2/3] docs: add PR link to changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 53ddc22..ca5e40a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added -- `sourcebot.hostAliases` value for injecting entries into the pod's `/etc/hosts`. [#NNN](https://github.com/sourcebot-dev/sourcebot-helm-chart/pull/NNN) +- `sourcebot.hostAliases` value for injecting entries into the pod's `/etc/hosts`. [131](https://github.com/sourcebot-dev/sourcebot-helm-chart/pull/131) ## [0.1.101] - 2026-08-13 From b092214dd3c91f6bc6506cb63857872ec4abd52d Mon Sep 17 00:00:00 2001 From: 51ame <79866689+51ame@users.noreply.github.com> Date: Thu, 13 Aug 2026 12:23:57 +0300 Subject: [PATCH 3/3] fix(schema): validate hostAliases entry structure --- charts/sourcebot/values.schema.json | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/charts/sourcebot/values.schema.json b/charts/sourcebot/values.schema.json index 479a217..1e823bc 100644 --- a/charts/sourcebot/values.schema.json +++ b/charts/sourcebot/values.schema.json @@ -201,7 +201,18 @@ "type": "array" }, "hostAliases": { - "type": "array" + "type": "array", + "items": { + "type": "object", + "properties": { + "ip": { "type": "string" }, + "hostnames": { + "type": "array", + "items": { "type": "string" } + } + }, + "required": ["ip"] + } }, "affinity": { "type": "object"