Skip to content

Commit

Permalink
update yamls
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidOkulski committed Jan 6, 2025
1 parent 0c9f059 commit e760058
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 20 deletions.
9 changes: 7 additions & 2 deletions helm/postgresql/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,15 @@ apiVersion: v1
kind: Service
metadata:
name: {{ .Release.Name }}-postgresql
labels:
app.kubernetes.io/name: postgresql
app.kubernetes.io/instance: {{ .Release.Name }}
spec:
type: ClusterIP
ports:
- port: 5432
- name: postgresql
port: 5432
targetPort: 5432
selector:
app: {{ .Release.Name }}-postgresql
app.kubernetes.io/name: postgresql
app.kubernetes.io/instance: {{ .Release.Name }}
45 changes: 38 additions & 7 deletions helm/postgresql/templates/statefulset.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,39 @@
volumeClaimTemplates:
- metadata:
name: data
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: {{ .Release.Name }}-postgresql
labels:
app.kubernetes.io/name: postgresql
app.kubernetes.io/instance: {{ .Release.Name }}
spec:
serviceName: {{ .Release.Name }}-postgresql-hl
replicas: 1
selector:
matchLabels:
app.kubernetes.io/name: postgresql
app.kubernetes.io/instance: {{ .Release.Name }}
template:
metadata:
labels:
app.kubernetes.io/name: postgresql
app.kubernetes.io/instance: {{ .Release.Name }}
spec:
accessModes: ["ReadWriteOnce"]
resources:
requests:
storage: {{ .Values.persistence.size }}
containers:
- name: postgresql
image: postgres:13
ports:
- containerPort: 5432
resources:
requests:
storage: {{ .Values.postgresql.resources.requests.storage }}
volumeMounts:
- name: data
mountPath: /bitnami/postgresql
volumeClaimTemplates:
- metadata:
name: data
spec:
accessModes: ["ReadWriteOnce"]
resources:
requests:
storage: {{ .Values.postgresql.persistence.size }}
13 changes: 2 additions & 11 deletions helm/postgresql/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,7 @@ resources:
postgresql:
persistence:
enabled: true
size: 1Gi
size: 1Gi
resources:
requests:
storage: 1Gi

volumeClaimTemplates:
- metadata:
name: data
spec:
accessModes: ["ReadWriteOnce"]
resources:
requests:
storage: 1Gi
storage: 1Gi

0 comments on commit e760058

Please sign in to comment.