Skip to content

Commit 409c289

Browse files
committed
feat(#787): change sakura and onsen into statefulset
Sakura and onsen were changed from a deplomyent into a statefulset within the kubernetes. Signed-off-by: Tobias Anker <tobias.anker@kitsunemimi.moe>
1 parent 1c97632 commit 409c289

2 files changed

Lines changed: 13 additions & 6 deletions

File tree

deploy/k8s/ainari/templates/onsen/onsen-deployment.yaml renamed to deploy/k8s/ainari/templates/onsen/onsen-statefulset.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@
1313
# limitations under the License.
1414

1515
apiVersion: apps/v1
16-
kind: Deployment
16+
kind: StatefulSet
1717
metadata:
1818
name: onsen
1919
labels:
2020
app: onsen
2121
spec:
22-
replicas: 1
22+
replicas: {{ .Values.onsen.replica_count }}
2323
selector:
2424
matchLabels:
2525
app: onsen

deploy/k8s/ainari/templates/sakura/sakura-deployment.yaml renamed to deploy/k8s/ainari/templates/sakura/sakura-statefulset.yaml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# limitations under the License.
1414

1515
apiVersion: apps/v1
16-
kind: Deployment
16+
kind: StatefulSet
1717
metadata:
1818
name: sakura
1919
labels:
@@ -96,9 +96,6 @@ spec:
9696
- name: sakura-config
9797
configMap:
9898
name: sakura-config
99-
- name: data-volume
100-
persistentVolumeClaim:
101-
claimName: sakura-pvc
10299
- name: tls-certs
103100
secret:
104101
secretName: sakura-selfsigned-secret
@@ -109,3 +106,13 @@ spec:
109106
secret:
110107
secretName: wg-sakura-secret
111108

109+
volumeClaimTemplates:
110+
- metadata:
111+
name: data-volume
112+
spec:
113+
accessModes:
114+
- ReadWriteOnce
115+
storageClassName: {{ .Values.sakura.storage.storage_class }}
116+
resources:
117+
requests:
118+
storage: 100Mi

0 commit comments

Comments
 (0)