Skip to content

Commit aae2ae0

Browse files
committed
fix: remove sts
Signed-off-by: Andre Nogueira <andre.nogueira@mollie.com>
1 parent b83dbf0 commit aae2ae0

2 files changed

Lines changed: 8 additions & 30 deletions

File tree

kubernetes/chart/README.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,6 @@ The open source Sourcegraph alternative. Sourcebot gives you a powerful interfac
8686
| startupProbe.httpGet.path | string | `"/"` | Path to check. |
8787
| startupProbe.httpGet.port | string | `"http"` | Port to check. |
8888
| startupProbe.periodSeconds | int | `30` | Initial delay before the first probe. |
89-
| 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. |
90-
| storage.accessModes | list | `["ReadWriteOnce"]` | Access modes for the persistent volume. |
91-
| storage.className | string | `""` | Storage class name for the persistent volume. |
92-
| storage.enabled | bool | `true` | Enable or disable persistent storage. |
93-
| storage.size | string | `"10Gi"` | Size of the persistent volume. |
9489
| tolerations | list | `[]` | Set tolerations for pod scheduling. See: https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/ |
9590
| volumeMounts | list | `[]` | Define volume mounts for the container. See: https://kubernetes.io/docs/concepts/storage/volumes/ |
9691
| volumes | list | `[]` | Define additional volumes. See: https://kubernetes.io/docs/concepts/storage/volumes/ |

kubernetes/chart/templates/deloyable.yaml renamed to kubernetes/chart/templates/deployment.yaml

Lines changed: 8 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,12 @@
11
---
22
apiVersion: apps/v1
3-
{{- if $.Values.storage }}
4-
kind: StatefulSet
5-
{{- else }}
63
kind: Deployment
7-
{{- end }}
84
metadata:
95
name: {{ include "sourcebot.fullname" $ }}
106
labels:
117
{{- include "sourcebot.labels" $ | nindent 4 }}
128
spec:
13-
{{- if $.Values.storage }}
14-
serviceName: {{ include "sourcebot.fullname" $ }}
15-
{{- end }}
16-
{{- if not $.Values.autoscaling.enabled }}
179
replicas: {{ $.Values.replicaCount }}
18-
{{- end }}
1910
selector:
2011
matchLabels:
2112
{{- include "sourcebot.selectorLabels" $ | nindent 6 }}
@@ -40,6 +31,10 @@ spec:
4031
securityContext:
4132
{{- toYaml . | nindent 8 }}
4233
{{- end }}
34+
{{- with $.Values.initContainers }}
35+
initContainers:
36+
{{- toYaml . | nindent 8 }}
37+
{{- end }}
4338
containers:
4439
- name: {{ .Chart.Name }}
4540
{{- with $.Values.containerSecurityContext }}
@@ -55,6 +50,10 @@ spec:
5550
args: {{ toYaml . | nindent 12 }}
5651
{{- end }}
5752
env:
53+
{{- if and $.Values.ingress.enabled (gt len ($.Values.ingress.hosts) 0) }}
54+
- name: AUTH_URL
55+
value: {{ (index $.Values.ingress.hosts 0).host | printf "https://%s" }}
56+
{{- end }}
5857
- name: CONFIG_PATH
5958
value: /etc/sourcebot/config.json
6059
{{- if $.Values.license }}
@@ -113,10 +112,6 @@ spec:
113112
mountPath: /etc/sourcebot/config.json
114113
subPath: config.json
115114
readOnly: true
116-
{{- if $.Values.storage }}
117-
- name: sourcebot-data
118-
mountPath: /data
119-
{{- end }}
120115
{{- with $.Values.volumeMounts }}
121116
{{- toYaml . | nindent 12 }}
122117
{{- end }}
@@ -145,15 +140,3 @@ spec:
145140
tolerations:
146141
{{- toYaml . | nindent 8 }}
147142
{{- end }}
148-
{{- if $.Values.storage }}
149-
volumeClaimTemplates:
150-
- metadata:
151-
name: sourcebot-data
152-
spec:
153-
accessModes:
154-
{{- $.Values.storage.accessModes | toYaml | nindent 10 }}
155-
storageClassName: {{ $.Values.storage.className }}
156-
resources:
157-
requests:
158-
storage: {{ $.Values.storage.size }}
159-
{{- end }}

0 commit comments

Comments
 (0)