Skip to content

Commit

Permalink
updated yamls
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidOkulski committed Jan 6, 2025
1 parent e2b5e8f commit 4d494a2
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 55 deletions.
18 changes: 15 additions & 3 deletions helm/postgresql/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Release.Name }}-postgresql
labels:
app: {{ .Release.Name }}-postgresql
spec:
replicas: 1
selector:
Expand All @@ -17,8 +19,18 @@ spec:
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
env:
- name: POSTGRES_USER
value: {{ .Values.postgresql.username }}
value: "{{ .Values.postgresql.username }}"
- name: POSTGRES_PASSWORD
value: {{ .Values.postgresql.password }}
value: "{{ .Values.postgresql.password }}"
- name: POSTGRES_DB
value: {{ .Values.postgresql.database }}
value: "{{ .Values.postgresql.database }}"
ports:
- containerPort: 5432
name: postgresql
volumeMounts:
- name: postgresql-data
mountPath: /var/lib/postgresql/data
volumes:
- name: postgresql-data
persistentVolumeClaim:
claimName: {{ .Release.Name }}-postgresql-pvc
13 changes: 13 additions & 0 deletions helm/postgresql/templates/pvc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: {{ .Release.Name }}-postgresql
labels:
app.kubernetes.io/name: postgresql
app.kubernetes.io/instance: {{ .Release.Name }}
spec:
accessModes: {{ toYaml .Values.persistence.accessModes | indent 2 }}
resources:
requests:
storage: {{ .Values.persistence.size }}
storageClassName: ""
3 changes: 1 addition & 2 deletions helm/postgresql/templates/service.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
apiVersion: v1
kind: Service
metadata:
name: {{ .Release.Name }}-postgresql-hl
name: {{ .Release.Name }}-postgresql
labels:
app.kubernetes.io/name: postgresql
app.kubernetes.io/instance: {{ .Release.Name }}
spec:
clusterIP: None
ports:
- name: postgresql
port: 5432
Expand Down
46 changes: 0 additions & 46 deletions helm/postgresql/templates/statefulset.yaml

This file was deleted.

4 changes: 0 additions & 4 deletions helm/postgresql/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,3 @@ persistence:
accessModes:
- ReadWriteOnce

service:
type: ClusterIP
port: 5432
headless: true

0 comments on commit 4d494a2

Please sign in to comment.