diff --git a/CHANGELOG.md b/CHANGELOG.md index a034639..b8152e3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Added +- `sourcebot.lifecycle` and `sourcebot.terminationGracePeriodSeconds` values. [#110](https://github.com/sourcebot-dev/sourcebot-helm-chart/pull/110) + ## [0.1.85] - 2026-05-30 ### Changed diff --git a/charts/sourcebot/README.md b/charts/sourcebot/README.md index 4782972..9120fc1 100644 --- a/charts/sourcebot/README.md +++ b/charts/sourcebot/README.md @@ -87,6 +87,7 @@ Sourcebot is a self-hosted tool that helps you understand your codebase. | sourcebot.license.existingSecret | string | `""` | Use an existing secret for the license key | | sourcebot.license.existingSecretKey | string | `"key"` | Key in the existing secret that contains the license key | | sourcebot.license.value | string | `""` | License key value (or use existingSecret) | +| sourcebot.lifecycle | object | `{}` | Container lifecycle hooks. | | sourcebot.livenessProbe.failureThreshold | int | `5` | Number of consecutive failures before marking the container as unhealthy | | sourcebot.livenessProbe.httpGet | object | `{"path":"/api/health","port":"http"}` | Http GET request to check if the container is alive | | sourcebot.livenessProbe.httpGet.path | string | `"/api/health"` | Path to check | @@ -131,6 +132,7 @@ Sourcebot is a self-hosted tool that helps you understand your codebase. | sourcebot.startupProbe.httpGet.port | string | `"http"` | Port to check | | sourcebot.startupProbe.periodSeconds | int | `30` | Initial delay before the first probe | | sourcebot.strategy | object | `{"type":"RollingUpdate"}` | Deployment strategy configuration | +| sourcebot.terminationGracePeriodSeconds | string | `nil` | Grace period (seconds) Kubernetes waits between SIGTERM and SIGKILL on pod termination. | | sourcebot.tolerations | list | `[]` | Set tolerations for pod scheduling See: https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/ | ---------------------------------------------- diff --git a/charts/sourcebot/templates/deployment.yaml b/charts/sourcebot/templates/deployment.yaml index 7dc6d2b..b990eb6 100644 --- a/charts/sourcebot/templates/deployment.yaml +++ b/charts/sourcebot/templates/deployment.yaml @@ -30,6 +30,9 @@ spec: {{- toYaml . | nindent 8 }} {{- end }} serviceAccountName: {{ include "sourcebot.serviceAccountName" $ }} + {{- if ne $.Values.sourcebot.terminationGracePeriodSeconds nil }} + terminationGracePeriodSeconds: {{ $.Values.sourcebot.terminationGracePeriodSeconds }} + {{- end }} {{- if $.Values.sourcebot.podSecurityContext }} securityContext: {{- toYaml $.Values.sourcebot.podSecurityContext | nindent 8 }} @@ -118,6 +121,10 @@ spec: resources: {{- toYaml . | nindent 12 }} {{- end }} + {{- with $.Values.sourcebot.lifecycle }} + lifecycle: + {{- toYaml . | nindent 12 }} + {{- end }} volumeMounts: - name: sourcebot-config mountPath: /etc/sourcebot/config.json diff --git a/charts/sourcebot/values.schema.json b/charts/sourcebot/values.schema.json index d6a5135..15c2552 100644 --- a/charts/sourcebot/values.schema.json +++ b/charts/sourcebot/values.schema.json @@ -167,6 +167,12 @@ "startupProbe": { "type": "object" }, + "lifecycle": { + "type": "object" + }, + "terminationGracePeriodSeconds": { + "type": ["integer", "null"] + }, "extraVolumes": { "type": "array" }, diff --git a/charts/sourcebot/values.yaml b/charts/sourcebot/values.yaml index 80229cd..98f11b2 100644 --- a/charts/sourcebot/values.yaml +++ b/charts/sourcebot/values.yaml @@ -238,6 +238,13 @@ sourcebot: # -- Initial delay before the first probe periodSeconds: 30 + # -- Container lifecycle hooks. + lifecycle: {} + + # -- Grace period (seconds) Kubernetes waits between SIGTERM and SIGKILL on pod + # termination. + terminationGracePeriodSeconds: null + # -- Define additional volumes # See: https://kubernetes.io/docs/concepts/storage/volumes/ extraVolumes: []