You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
prodwork01-mobene-deployment/templates/pgadmin/statefulset.yaml

51 lines
1.5 KiB
YAML

---
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: '{{ .Values.stage }}-pgadmin'
spec:
serviceName: '{{ .Values.stage }}-pgadmin-service'
podManagementPolicy: Parallel
replicas: 1
selector:
matchLabels:
app: '{{ .Values.stage }}-pgadmin'
type: pgadmin
template:
metadata:
labels:
app: '{{ .Values.stage }}-pgadmin'
spec:
terminationGracePeriodSeconds: 10
containers:
- name: '{{ .Values.stage }}-pgadmin'
image: '{{.Values.pgadmin.image.name}}:{{.Values.pgadmin.image.tag}}'
imagePullPolicy: Always
env:
- name: PGADMIN_DEFAULT_EMAIL
value: {{.Values.pgadmin.env.email}}
- name: PGADMIN_DEFAULT_PASSWORD
valueFrom:
secretKeyRef:
name: '{{ .Values.stage }}-pgadmin-secret'
key: password
resources:
limits:
cpu: 100m
memory: 256Mi
requests:
cpu: 100m
memory: 256Mi
ports:
- name: http
containerPort: 80
protocol: TCP
volumeMounts:
- name: '{{ .Values.stage }}-pgadmin-config'
mountPath: /pgadmin4/servers.json
subPath: servers.json
readOnly: true
volumes:
- name: '{{ .Values.stage }}-pgadmin-config'
configMap:
name: '{{ .Values.stage }}-pgadmin-config'