62 lines
1.2 KiB
YAML
62 lines
1.2 KiB
YAML
apiVersion: v1
|
|
kind: Secret
|
|
metadata:
|
|
name: studio-auth-db-secret
|
|
namespace: studio-system
|
|
type: Opaque
|
|
stringData:
|
|
POSTGRES_USER: atnmy_auth
|
|
POSTGRES_PASSWORD: future1234!@
|
|
POSTGRES_DB: atnmy_auth
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: studio-auth-db
|
|
namespace: studio-system
|
|
spec:
|
|
selector:
|
|
app: studio-auth-db
|
|
ports:
|
|
- name: postgres
|
|
port: 5432
|
|
targetPort: 5432
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: StatefulSet
|
|
metadata:
|
|
name: studio-auth-db
|
|
namespace: studio-system
|
|
spec:
|
|
serviceName: studio-auth-db
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: studio-auth-db
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: studio-auth-db
|
|
spec:
|
|
containers:
|
|
- name: postgres
|
|
image: postgres:17
|
|
ports:
|
|
- containerPort: 5432
|
|
envFrom:
|
|
- secretRef:
|
|
name: studio-auth-db-secret
|
|
volumeMounts:
|
|
- name: data
|
|
mountPath: /var/lib/postgresql/data
|
|
subPath: postgres
|
|
volumeClaimTemplates:
|
|
- metadata:
|
|
name: data
|
|
spec:
|
|
accessModes: ["ReadWriteOnce"]
|
|
storageClassName: local-path
|
|
resources:
|
|
requests:
|
|
storage: 3Gi
|