From 622cfcf55d1b9477564ad1f2b8d8e3d2bf1a5b81 Mon Sep 17 00:00:00 2001 From: bkellam Date: Mon, 20 Oct 2025 23:33:45 -0700 Subject: [PATCH 1/6] s --- charts/sourcebot/templates/deployment.yaml | 2 +- charts/sourcebot/values.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/sourcebot/templates/deployment.yaml b/charts/sourcebot/templates/deployment.yaml index e3e1250..0c4ad6b 100644 --- a/charts/sourcebot/templates/deployment.yaml +++ b/charts/sourcebot/templates/deployment.yaml @@ -62,7 +62,7 @@ spec: {{- end }} {{- include "sourcebot.databaseEnv" . | nindent 12 }} {{- include "sourcebot.redisEnv" . | nindent 12 }} - {{- range $.Values.sourcebot.envSecrets }} + {{- range $.Values.sourcebot.additionalEnvSecrets }} - name: {{ .envName }} valueFrom: secretKeyRef: diff --git a/charts/sourcebot/values.yaml b/charts/sourcebot/values.yaml index 61da367..ffaab8d 100644 --- a/charts/sourcebot/values.yaml +++ b/charts/sourcebot/values.yaml @@ -45,7 +45,7 @@ sourcebot: existingSecretKey: key # -- Set environment variables from Kubernetes secrets - envSecrets: [] + additionalEnvSecrets: [] # - secretName: sourcebot-github-token # secretKey: token # envName: GITHUB_TOKEN From 4479eb9332afba30d9ef70970306d751edb4689a Mon Sep 17 00:00:00 2001 From: bkellam Date: Mon, 20 Oct 2025 23:35:20 -0700 Subject: [PATCH 2/6] update chart --- charts/sourcebot/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/sourcebot/README.md b/charts/sourcebot/README.md index 13f692a..f026570 100644 --- a/charts/sourcebot/README.md +++ b/charts/sourcebot/README.md @@ -47,6 +47,7 @@ Sourcebot is a self-hosted tool that helps you understand your codebase. | redis.image.repository | string | `"bitnamilegacy/valkey"` | Overwrite default repository of helm chart to point to non-paid bitnami images | | redis.port | int | `6379` | Redis port | | sourcebot.additionalEnv | list | `[]` | Set additional environment variables | +| sourcebot.additionalEnvSecrets | list | `[]` | Set environment variables from Kubernetes secrets | | sourcebot.additionalLabels | object | `{}` | Add extra labels to all resources | | sourcebot.additionalPorts | list | `[]` | Configure additional ports to expose on the container and service | | sourcebot.affinity | object | `{}` | 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/ | @@ -54,7 +55,6 @@ Sourcebot is a self-hosted tool that helps you understand your codebase. | sourcebot.command | list | `[]` | Override the default command of the container | | sourcebot.config | object | `{"$schema":"https://raw.githubusercontent.com/sourcebot-dev/sourcebot/main/schemas/v3/index.json","connections":{},"settings":{}}` | Configure Sourcebot-specific application settings | | sourcebot.containerSecurityContext | object | `{}` | Set the container-level security context | -| sourcebot.envSecrets | list | `[]` | Set environment variables from Kubernetes secrets | | 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.image.digest | string | `""` | Container image digest (used instead of tag if set) | From c738b6055b646ca5ab2e9c9714fb8a697df7a2e3 Mon Sep 17 00:00:00 2001 From: bkellam Date: Mon, 20 Oct 2025 23:44:55 -0700 Subject: [PATCH 3/6] Add value validation to action --- .github/workflows/validate.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/validate.yaml b/.github/workflows/validate.yaml index 68cadc2..299310b 100644 --- a/.github/workflows/validate.yaml +++ b/.github/workflows/validate.yaml @@ -44,3 +44,7 @@ jobs: exit 1 fi + - name: Validate schema against values + run: | + helm template test charts/sourcebot/ -f charts/sourcebot/values.yaml + From b3549700ed60fc89955707813c9b1b2a164d024a Mon Sep 17 00:00:00 2001 From: bkellam Date: Mon, 20 Oct 2025 23:46:08 -0700 Subject: [PATCH 4/6] w --- .github/workflows/validate.yaml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/validate.yaml b/.github/workflows/validate.yaml index 299310b..7ae2147 100644 --- a/.github/workflows/validate.yaml +++ b/.github/workflows/validate.yaml @@ -34,6 +34,10 @@ jobs: - name: Run helm lint run: helm lint charts/sourcebot/ -f charts/sourcebot/values.lint.yaml + - name: Validate schema against values + run: | + helm template test charts/sourcebot/ -f charts/sourcebot/values.yaml -f charts/sourcebot/values.lint.yaml + - name: Validate helm-docs run: | helm-docs charts/sourcebot/ @@ -43,8 +47,3 @@ jobs: git diff exit 1 fi - - - name: Validate schema against values - run: | - helm template test charts/sourcebot/ -f charts/sourcebot/values.yaml - From 09d1e57b42850a507976e46ebeb9763c9474be56 Mon Sep 17 00:00:00 2001 From: bkellam Date: Mon, 20 Oct 2025 23:53:19 -0700 Subject: [PATCH 5/6] schema --- .github/workflows/validate.yaml | 4 ---- charts/sourcebot/values.schema.json | 2 ++ 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/validate.yaml b/.github/workflows/validate.yaml index 7ae2147..e35d10d 100644 --- a/.github/workflows/validate.yaml +++ b/.github/workflows/validate.yaml @@ -34,10 +34,6 @@ jobs: - name: Run helm lint run: helm lint charts/sourcebot/ -f charts/sourcebot/values.lint.yaml - - name: Validate schema against values - run: | - helm template test charts/sourcebot/ -f charts/sourcebot/values.yaml -f charts/sourcebot/values.lint.yaml - - name: Validate helm-docs run: | helm-docs charts/sourcebot/ diff --git a/charts/sourcebot/values.schema.json b/charts/sourcebot/values.schema.json index 471d611..d195d71 100644 --- a/charts/sourcebot/values.schema.json +++ b/charts/sourcebot/values.schema.json @@ -6,6 +6,7 @@ "properties": { "global": { "type": "object", + "additionalProperties": false, "properties": { "security": { "type": "object", @@ -25,6 +26,7 @@ }, "sourcebot": { "type": "object", + "additionalProperties": false, "properties": { "replicaCount": { "type": "integer", From 8f30f585827a512cf97ec9f60c8aee44ac77248c Mon Sep 17 00:00:00 2001 From: bkellam Date: Mon, 20 Oct 2025 23:56:57 -0700 Subject: [PATCH 6/6] update schema --- charts/sourcebot/values.schema.json | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/charts/sourcebot/values.schema.json b/charts/sourcebot/values.schema.json index d195d71..8bb557c 100644 --- a/charts/sourcebot/values.schema.json +++ b/charts/sourcebot/values.schema.json @@ -62,8 +62,23 @@ "license": { "type": "object" }, - "envSecrets": { - "type": "array" + "additionalEnvSecrets": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "properties": { + "envName": { + "type": "string" + }, + "secretName": { + "type": "string" + }, + "secretKey": { + "type": "string" + } + } + } }, "additionalEnv": { "type": "array"