blob: 6626cb4d067200289ce120deba970b181cb4585e [file] [log] [blame]
giolekva716efb92022-05-07 23:08:58 +04001apiVersion: apps/v1
2kind: StatefulSet
3metadata:
4 name: soft-serve
5 namespace: {{ .Release.Namespace }}
6spec:
7 selector:
8 matchLabels:
9 app: soft-serve
10 serviceName: soft-serve
11 replicas: 1
12 template:
13 metadata:
14 labels:
15 app: soft-serve
16 spec:
17 volumes:
18 - name: data
19 persistentVolumeClaim:
Giorgi Lekveishvilie47fa8c2023-07-20 10:09:36 +040020 claimName: soft-serve
Giorgi Lekveishvili5f7d4412023-07-11 17:45:11 +040021 {{ if and .Values.privateKey .Values.publicKey }}
giolekva716efb92022-05-07 23:08:58 +040022 - name: keys
23 configMap:
24 name: keys
Giorgi Lekveishvili5f7d4412023-07-11 17:45:11 +040025 {{ end }}
giolekva716efb92022-05-07 23:08:58 +040026 containers:
27 - name: soft-serve
28 image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
29 imagePullPolicy: {{ .Values.image.pullPolicy}}
30 env:
Giorgi Lekveishvili725bb392023-05-05 18:24:27 +040031 - name: SOFT_SERVE_SSH_LISTEN_ADDR
32 value: ":{{ .Values.port }}"
33 - name: SOFT_SERVE_INITIAL_ADMIN_KEYS
giolekva716efb92022-05-07 23:08:58 +040034 value: "{{ .Values.adminKey }}"
Giorgi Lekveishvili5f7d4412023-07-11 17:45:11 +040035 {{ if and .Values.privateKey .Values.publicKey }}
Giorgi Lekveishvili725bb392023-05-05 18:24:27 +040036 - name: SOFT_SERVE_SSH_KEY_PATH
giolekva716efb92022-05-07 23:08:58 +040037 value: /.ssh/key
Giorgi Lekveishvili5f7d4412023-07-11 17:45:11 +040038 {{ end }}
Giorgi Lekveishvili725bb392023-05-05 18:24:27 +040039 - name: SOFT_SERVE_DATA_PATH
giolekva716efb92022-05-07 23:08:58 +040040 value: /var/lib/soft-serve/repos
Giorgi Lekveishvili5f7d4412023-07-11 17:45:11 +040041 {{ if .Values.ingress.enabled }}
42 - name: SOFT_SERVE_HTTP_LISTEN_ADDR
43 value: ":80"
44 - name: SOFT_SERVE_HTTP_PUBLIC_URL
45 value: "http://{{ .Values.ingress.domain }}"
46 {{ end }}
giolekva716efb92022-05-07 23:08:58 +040047 ports:
48 - name: ssh
49 containerPort: {{ .Values.port }}
50 protocol: TCP
Giorgi Lekveishvili5f7d4412023-07-11 17:45:11 +040051 - name: http
52 containerPort: 80
53 protocol: TCP
giolekva716efb92022-05-07 23:08:58 +040054 volumeMounts:
55 - name: data
56 mountPath: /var/lib/soft-serve
57 readOnly: false
Giorgi Lekveishvili5f7d4412023-07-11 17:45:11 +040058 {{ if and .Values.privateKey .Values.publicKey }}
giolekva716efb92022-05-07 23:08:58 +040059 - name: keys
60 mountPath: /.ssh
61 readOnly: true
Giorgi Lekveishvili5f7d4412023-07-11 17:45:11 +040062 {{ end }}