use statefulSets and readinessProbes instead of initContainers
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: nextcloud-db
|
||||
namespace: tools
|
||||
@@ -8,6 +8,8 @@ spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: nextcloud-db
|
||||
serviceName: nextcloud-db
|
||||
replicas: 1
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
@@ -36,9 +38,14 @@ spec:
|
||||
- name: MARIADB_AUTO_UPGRADE
|
||||
value: "1"
|
||||
volumeMounts:
|
||||
- name: nextcloud-db-storage
|
||||
- name: nextcloud-db
|
||||
mountPath: /var/lib/mysql
|
||||
volumes:
|
||||
- name: nextcloud-db-storage
|
||||
persistentVolumeClaim:
|
||||
claimName: nextcloud-db-longhorn
|
||||
volumeClaimTemplates:
|
||||
- metadata:
|
||||
name: nextcloud-db
|
||||
spec:
|
||||
accessModes: ["ReadWriteOnce"]
|
||||
resources:
|
||||
requests:
|
||||
storage: 2Gi
|
||||
storageClassName: longhorn
|
||||
|
||||
Reference in New Issue
Block a user