Split manifests into infra/ and applications/
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
namespace: gitea
|
||||
name: gitea-postgresql-pvc
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteMany
|
||||
storageClassName: longhorn-static
|
||||
volumeName: gitea-postgresql-data
|
||||
resources:
|
||||
requests:
|
||||
storage: 10Gi
|
||||
14
applications/gitea/postgres/gitea-postgres-service.yaml
Normal file
14
applications/gitea/postgres/gitea-postgres-service.yaml
Normal file
@@ -0,0 +1,14 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: gitea-postgresql
|
||||
namespace: gitea
|
||||
spec:
|
||||
selector:
|
||||
app: gitea-postgresql
|
||||
type: ClusterIP
|
||||
ports:
|
||||
- name: postgresql-port
|
||||
protocol: TCP
|
||||
port: 5432
|
||||
targetPort: 5432
|
||||
55
applications/gitea/postgres/gitea-postgres-statefulset.yaml
Normal file
55
applications/gitea/postgres/gitea-postgres-statefulset.yaml
Normal file
@@ -0,0 +1,55 @@
|
||||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
namespace: gitea
|
||||
name: gitea-postgresql
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: gitea-postgresql
|
||||
serviceName: gitea-postgresql
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: gitea-postgresql
|
||||
spec:
|
||||
restartPolicy: Always
|
||||
terminationGracePeriodSeconds: 60
|
||||
containers:
|
||||
- name: gitea-postgresql
|
||||
image: postgres:18
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 256Mi
|
||||
limits:
|
||||
cpu: 500m
|
||||
memory: 512Mi
|
||||
ports:
|
||||
- containerPort: 5432
|
||||
volumeMounts:
|
||||
- name: gitea-postgresql-database
|
||||
mountPath: /var/lib/postgresql/volumes/pgdata
|
||||
env:
|
||||
- name: POSTGRES_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: gitea-secrets
|
||||
key: db_password
|
||||
- name: POSTGRES_USER
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: gitea-secrets
|
||||
key: db_user
|
||||
- name: POSTGRES_DB
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: gitea-secrets
|
||||
key: db_name
|
||||
- name: PGDATA
|
||||
value: /var/lib/postgresql/volumes/pgdata/data
|
||||
volumes:
|
||||
- name: gitea-postgresql-database
|
||||
persistentVolumeClaim:
|
||||
claimName: gitea-postgresql-pvc
|
||||
Reference in New Issue
Block a user