diff --git a/README.md b/README.md index 37cd627..3046bd6 100644 --- a/README.md +++ b/README.md @@ -1,2 +1 @@ -# fastapi-postgres-gitops - +# repository-name-fastapi-postgres-gitops diff --git a/manifests/database/deployment.yaml b/manifests/database/deployment.yaml index e69de29..804a040 100644 --- a/manifests/database/deployment.yaml +++ b/manifests/database/deployment.yaml @@ -0,0 +1,35 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: postgres + namespace: student-petracamber +spec: + replicas: 1 + selector: + matchLabels: + app: postgres + template: + metadata: + labels: + app: postgres + spec: + containers: + - name: postgres + image: postgres:16-alpine + envFrom: + - secretRef: + name: postgres-secret # lozinke iz Secreta + ports: + - containerPort: 5432 + volumeMounts: + - name: postgres-data + mountPath: /var/lib/postgresql/data + readinessProbe: + exec: + command: ["pg_isready", "-U", "fastapiuser", "-d", "fastapidb"] + initialDelaySeconds: 10 + periodSeconds: 5 + volumes: + - name: postgres-data + persistentVolumeClaim: + claimName: postgres-pvc # disk koji smo rezervirali