Fix values
This commit is contained in:
parent
aed5c5c11e
commit
c1192c7049
@ -1,18 +1,11 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ include "warframe-db.fullname" . }}
|
||||
labels:
|
||||
app.kubernetes.io/name: {{ include "warframe-db.name" . }}
|
||||
{{- with .Values.service.annotations }}
|
||||
annotations:
|
||||
{{ toYaml . | indent 4 }}
|
||||
{{- end }}
|
||||
name: {{ include "warframe-db-simple.fullname" . }}
|
||||
spec:
|
||||
type: {{ .Values.service.type }}
|
||||
ports:
|
||||
- name: postgres
|
||||
port: {{ .Values.service.port }}
|
||||
targetPort: {{ .Values.postgres.port }}
|
||||
type: ClusterIP
|
||||
selector:
|
||||
app.kubernetes.io/name: {{ include "warframe-db.name" . }}
|
||||
app: {{ include "warframe-db-simple.name" . }}
|
||||
ports:
|
||||
- port: {{ .Values.service.port }}
|
||||
targetPort: 5432
|
||||
@ -1,78 +0,0 @@
|
||||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: {{ include "warframe-db.fullname" . }}
|
||||
labels:
|
||||
app.kubernetes.io/name: {{ include "warframe-db.name" . }}
|
||||
spec:
|
||||
serviceName: {{ include "warframe-db.fullname" . }}-headless
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: {{ include "warframe-db.name" . }}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: {{ include "warframe-db.name" . }}
|
||||
spec:
|
||||
securityContext:
|
||||
fsGroup: 999 # postgres user in official image
|
||||
containers:
|
||||
- name: postgres
|
||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
ports:
|
||||
- name: postgres
|
||||
containerPort: {{ .Values.postgres.port }}
|
||||
env:
|
||||
- name: POSTGRES_USER
|
||||
value: {{ .Values.postgres.user | quote }}
|
||||
- name: POSTGRES_DB
|
||||
value: {{ .Values.postgres.database | quote }}
|
||||
- name: POSTGRES_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ include "warframe-db.fullname" . }}
|
||||
key: POSTGRES_PASSWORD
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /var/lib/postgresql/data
|
||||
{{- if .Values.probes.enabled }}
|
||||
readinessProbe:
|
||||
exec:
|
||||
command: ["sh","-c","pg_isready -U $POSTGRES_USER -d $POSTGRES_DB -h 127.0.0.1 -p {{ .Values.postgres.port }}"]
|
||||
initialDelaySeconds: {{ .Values.probes.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.probes.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.probes.timeoutSeconds }}
|
||||
failureThreshold: {{ .Values.probes.failureThreshold }}
|
||||
livenessProbe:
|
||||
exec:
|
||||
command: ["sh","-c","pg_isready -U $POSTGRES_USER -d $POSTGRES_DB -h 127.0.0.1 -p {{ .Values.postgres.port }}"]
|
||||
initialDelaySeconds: {{ add .Values.probes.initialDelaySeconds 10 }}
|
||||
periodSeconds: {{ .Values.probes.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.probes.timeoutSeconds }}
|
||||
failureThreshold: {{ .Values.probes.failureThreshold }}
|
||||
{{- end }}
|
||||
{{- with .Values.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{ toYaml . | indent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.tolerations }}
|
||||
tolerations:
|
||||
{{ toYaml . | indent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.affinity }}
|
||||
affinity:
|
||||
{{ toYaml . | indent 8 }}
|
||||
{{- end }}
|
||||
volumeClaimTemplates:
|
||||
- metadata:
|
||||
name: data
|
||||
spec:
|
||||
accessModes: ["ReadWriteOnce"]
|
||||
resources:
|
||||
requests:
|
||||
storage: {{ .Values.persistence.size }}
|
||||
{{- if .Values.persistence.storageClassName }}
|
||||
storageClassName: {{ .Values.persistence.storageClassName }}
|
||||
{{- end }}
|
||||
@ -1,34 +1,7 @@
|
||||
image:
|
||||
repository: postgres
|
||||
tag: "16"
|
||||
pullPolicy: IfNotPresent
|
||||
|
||||
image: postgres:16
|
||||
postgres:
|
||||
user: wfuser
|
||||
password: wfpass # will be stored in a Secret
|
||||
password: wfpass # simple for POC
|
||||
database: wf
|
||||
port: 5432
|
||||
|
||||
service:
|
||||
type: ClusterIP
|
||||
port: 5432
|
||||
# Optional annotations:
|
||||
annotations: {}
|
||||
|
||||
persistence:
|
||||
enabled: true
|
||||
size: 5Gi
|
||||
storageClassName: "nfs-client" # e.g., nfs-client / longhorn / left empty = default
|
||||
|
||||
resources: {}
|
||||
nodeSelector: {}
|
||||
tolerations: []
|
||||
affinity: {}
|
||||
|
||||
# Simple liveness/readiness probes (tuned for small clusters)
|
||||
probes:
|
||||
enabled: true
|
||||
initialDelaySeconds: 20
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 3
|
||||
failureThreshold: 6
|
||||
|
||||
@ -1,34 +1,7 @@
|
||||
image:
|
||||
repository: postgres
|
||||
tag: "16"
|
||||
pullPolicy: IfNotPresent
|
||||
|
||||
image: postgres:16
|
||||
postgres:
|
||||
user: wfuser
|
||||
password: wfpass # will be stored in a Secret
|
||||
password: wfpass # simple for POC
|
||||
database: wf
|
||||
port: 5432
|
||||
|
||||
service:
|
||||
type: ClusterIP
|
||||
port: 5432
|
||||
# Optional annotations:
|
||||
annotations: {}
|
||||
|
||||
persistence:
|
||||
enabled: true
|
||||
size: 5Gi
|
||||
storageClassName: "nfs-client" # e.g., nfs-client / longhorn / left empty = default
|
||||
|
||||
resources: {}
|
||||
nodeSelector: {}
|
||||
tolerations: []
|
||||
affinity: {}
|
||||
|
||||
# Simple liveness/readiness probes (tuned for small clusters)
|
||||
probes:
|
||||
enabled: true
|
||||
initialDelaySeconds: 20
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 3
|
||||
failureThreshold: 6
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user