diff --git a/kubernetes/chart/README.md b/kubernetes/chart/README.md index 82fda744..9ee3603e 100644 --- a/kubernetes/chart/README.md +++ b/kubernetes/chart/README.md @@ -86,11 +86,6 @@ The open source Sourcegraph alternative. Sourcebot gives you a powerful interfac | startupProbe.httpGet.path | string | `"/"` | Path to check. | | startupProbe.httpGet.port | string | `"http"` | Port to check. | | startupProbe.periodSeconds | int | `30` | Initial delay before the first probe. | -| storage | object | `{"accessModes":["ReadWriteOnce"],"className":"","enabled":true,"size":"10Gi"}` | Configure persistent storage for the application (volume is mounted at /data) to use the internal database. | -| storage.accessModes | list | `["ReadWriteOnce"]` | Access modes for the persistent volume. | -| storage.className | string | `""` | Storage class name for the persistent volume. | -| storage.enabled | bool | `true` | Enable or disable persistent storage. | -| storage.size | string | `"10Gi"` | Size of the persistent volume. | | tolerations | list | `[]` | Set tolerations for pod scheduling. See: https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/ | | volumeMounts | list | `[]` | Define volume mounts for the container. See: https://kubernetes.io/docs/concepts/storage/volumes/ | | volumes | list | `[]` | Define additional volumes. See: https://kubernetes.io/docs/concepts/storage/volumes/ | diff --git a/kubernetes/chart/templates/deloyable.yaml b/kubernetes/chart/templates/deployment.yaml similarity index 86% rename from kubernetes/chart/templates/deloyable.yaml rename to kubernetes/chart/templates/deployment.yaml index 744ef0e1..2efd55f9 100644 --- a/kubernetes/chart/templates/deloyable.yaml +++ b/kubernetes/chart/templates/deployment.yaml @@ -1,21 +1,12 @@ --- apiVersion: apps/v1 -{{- if $.Values.storage }} -kind: StatefulSet -{{- else }} kind: Deployment -{{- end }} metadata: name: {{ include "sourcebot.fullname" $ }} labels: {{- include "sourcebot.labels" $ | nindent 4 }} spec: - {{- if $.Values.storage }} - serviceName: {{ include "sourcebot.fullname" $ }} - {{- end }} - {{- if not $.Values.autoscaling.enabled }} replicas: {{ $.Values.replicaCount }} - {{- end }} selector: matchLabels: {{- include "sourcebot.selectorLabels" $ | nindent 6 }} @@ -40,6 +31,10 @@ spec: securityContext: {{- toYaml . | nindent 8 }} {{- end }} + {{- with $.Values.initContainers }} + initContainers: + {{- toYaml . | nindent 8 }} + {{- end }} containers: - name: {{ .Chart.Name }} {{- with $.Values.containerSecurityContext }} @@ -55,6 +50,10 @@ spec: args: {{ toYaml . | nindent 12 }} {{- end }} env: + {{- if and $.Values.ingress.enabled (gt len ($.Values.ingress.hosts) 0) }} + - name: AUTH_URL + value: {{ (index $.Values.ingress.hosts 0).host | printf "https://%s" }} + {{- end }} - name: CONFIG_PATH value: /etc/sourcebot/config.json {{- if $.Values.license }} @@ -113,10 +112,6 @@ spec: mountPath: /etc/sourcebot/config.json subPath: config.json readOnly: true - {{- if $.Values.storage }} - - name: sourcebot-data - mountPath: /data - {{- end }} {{- with $.Values.volumeMounts }} {{- toYaml . | nindent 12 }} {{- end }} @@ -145,15 +140,3 @@ spec: tolerations: {{- toYaml . | nindent 8 }} {{- end }} - {{- if $.Values.storage }} - volumeClaimTemplates: - - metadata: - name: sourcebot-data - spec: - accessModes: - {{- $.Values.storage.accessModes | toYaml | nindent 10 }} - storageClassName: {{ $.Values.storage.className }} - resources: - requests: - storage: {{ $.Values.storage.size }} - {{- end }}