use statefulSets and readinessProbes instead of initContainers
This commit is contained in:
@@ -1,15 +1,15 @@
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: gitea-db
|
||||
namespace: git-ops
|
||||
spec:
|
||||
strategy:
|
||||
type: Recreate
|
||||
selector:
|
||||
matchLabels:
|
||||
app: gitea-db
|
||||
serviceName: gitea-db
|
||||
replicas: 1
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
@@ -40,7 +40,12 @@ spec:
|
||||
volumeMounts:
|
||||
- name: gitea-db
|
||||
mountPath: /var/lib/postgresql
|
||||
volumes:
|
||||
- name: gitea-db
|
||||
persistentVolumeClaim:
|
||||
claimName: gitea-db-new-longhorn
|
||||
volumeClaimTemplates:
|
||||
- metadata:
|
||||
name: gitea-db
|
||||
spec:
|
||||
accessModes: ["ReadWriteOnce"]
|
||||
resources:
|
||||
requests:
|
||||
storage: 2Gi
|
||||
storageClassName: longhorn
|
||||
|
||||
Reference in New Issue
Block a user