Created
March 28, 2025 11:17
-
-
Save tarasowski/ad565fceeb93d83ad5969d6d1375ba05 to your computer and use it in GitHub Desktop.
potgres
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: postgres-deployment | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: | |
component: postgres | |
template: | |
metadata: | |
labels: | |
component: postgres | |
spec: | |
volumes: | |
- name: postgres-storage | |
persistentVolumeClaim: | |
claimName: database-persistent-volume-claim | |
containers: | |
- name: postgres | |
image: fhsinchy/notes-postgres | |
ports: | |
- containerPort: 5432 | |
volumeMounts: | |
- name: postgres-storage | |
mountPath: /var/lib/postgresql/data | |
subPath: postgres | |
env: | |
# not putting the password directly anymore | |
- name: POSTGRES_PASSWORD | |
valueFrom: | |
secretKeyRef: | |
name: postgres-secret | |
key: password | |
- name: POSTGRES_DB | |
value: notesdb |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment