Initial commit
This commit is contained in:
commit
c029592583
31 changed files with 39732 additions and 0 deletions
6
charts/postgres/Chart.yaml
Normal file
6
charts/postgres/Chart.yaml
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
apiVersion: v2
|
||||
name: postgres
|
||||
description: Chart for PostgreSQL using official Postgres image
|
||||
type: application
|
||||
version: 0.1.0
|
||||
appVersion: "18.4"
|
||||
13
charts/postgres/templates/service.yaml
Normal file
13
charts/postgres/templates/service.yaml
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: postgres
|
||||
namespace: {{ .Values.namespace }}
|
||||
spec:
|
||||
type: ClusterIP
|
||||
selector:
|
||||
app: postgres
|
||||
ports:
|
||||
- name: postgres
|
||||
port: 5432
|
||||
targetPort: 5432
|
||||
43
charts/postgres/templates/statefulset.yaml
Normal file
43
charts/postgres/templates/statefulset.yaml
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: postgres
|
||||
namespace: {{ .Values.namespace }}
|
||||
spec:
|
||||
serviceName: postgres
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: postgres
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: postgres
|
||||
spec:
|
||||
nodeSelector:
|
||||
{{ toYaml .Values.nodeSelector | indent 8 }}
|
||||
containers:
|
||||
- name: postgres
|
||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
||||
ports:
|
||||
- containerPort: 5432
|
||||
name: postgres
|
||||
envFrom:
|
||||
- secretRef:
|
||||
name: postgres-secret
|
||||
volumeMounts:
|
||||
- name: postgres-data
|
||||
mountPath: /var/lib/postgresql/data
|
||||
env:
|
||||
- name: PGDATA
|
||||
value: /var/lib/postgresql/data/pgdata
|
||||
volumeClaimTemplates:
|
||||
- metadata:
|
||||
name: postgres-data
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
storageClassName: {{ .Values.storage.className | quote }}
|
||||
resources:
|
||||
requests:
|
||||
storage: {{ .Values.storage.size | quote }}
|
||||
17
charts/postgres/values.yaml
Normal file
17
charts/postgres/values.yaml
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
namespace: database
|
||||
|
||||
image:
|
||||
repository: postgres
|
||||
tag: "18.4"
|
||||
|
||||
auth:
|
||||
database: symcrest
|
||||
username: admin
|
||||
secret: postgres-secret
|
||||
|
||||
storage:
|
||||
className: longhorn
|
||||
size: 20Gi
|
||||
|
||||
nodeSelector:
|
||||
workload: app
|
||||
Loading…
Add table
Add a link
Reference in a new issue