All checks were successful
Validate Kubernetes Manifests / kubeconform (push) Successful in 1m3s
52 lines
1.1 KiB
YAML
52 lines
1.1 KiB
YAML
---
|
|
apiVersion: apps/v1
|
|
kind: StatefulSet
|
|
metadata:
|
|
name: gitea-db
|
|
namespace: git-ops
|
|
spec:
|
|
selector:
|
|
matchLabels:
|
|
app: gitea-db
|
|
serviceName: gitea-db
|
|
replicas: 1
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: gitea-db
|
|
spec:
|
|
initContainers:
|
|
- name: init-cleanup
|
|
image: busybox
|
|
command: ["rm", "-rf", "/var/lib/postgresql/lost+found"]
|
|
volumeMounts:
|
|
- name: gitea-db
|
|
mountPath: /var/lib/postgresql
|
|
containers:
|
|
- name: gitea-db
|
|
image: postgres:18
|
|
ports:
|
|
- containerPort: 5432
|
|
env:
|
|
- name: POSTGRES_USER
|
|
value: "gitea"
|
|
- name: POSTGRES_PASSWORD
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: gitea-db-secret
|
|
key: password
|
|
- name: POSTGRES_DB
|
|
value: "gitea"
|
|
volumeMounts:
|
|
- name: gitea-db
|
|
mountPath: /var/lib/postgresql
|
|
volumeClaimTemplates:
|
|
- metadata:
|
|
name: gitea-db
|
|
spec:
|
|
accessModes: ["ReadWriteOnce"]
|
|
resources:
|
|
requests:
|
|
storage: 2Gi
|
|
storageClassName: longhorn
|