diff --git a/.github/workflows/validate.yaml b/.github/workflows/validate.yaml index 68cadc2..e35d10d 100644 --- a/.github/workflows/validate.yaml +++ b/.github/workflows/validate.yaml @@ -43,4 +43,3 @@ jobs: git diff exit 1 fi - 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) | 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.schema.json b/charts/sourcebot/values.schema.json index 471d611..8bb557c 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", @@ -60,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" 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