Files
ABI CHAHINE e9b01ec1fd [stable/pgadmin] Pr modifies pgadmin to accept enhanced_cookie_protection env to fix ingress issue #18568 (#21045)
* False and True should be forced otherwise it will be interpreted as boolean

Signed-off-by: Rachad Abi Chahine <rachad.abi-chahine@hotmail.fr>

* updates enhanced_cookie_protection

Signed-off-by: Rachad Abi Chahine <rachad.abi-chahine@hotmail.fr>

* adds the documentation of enhanced_cookie_protection in pgadmin

Signed-off-by: Rachad Abi Chahine <rachad.abi-chahine@hotmail.fr>

* as discussed I upgrade to 1.2.2

Signed-off-by: Rachad Abi Chahine <rachad.abi-chahine@hotmail.fr>

* Updates README.md to adds default env variables

Signed-off-by: Rachad Abi Chahine <rachad.abi-chahine@hotmail.fr>

* the value of enhanced_cookie_protection should be double quoted

Signed-off-by: Rachad Abi Chahine <rachad.abi-chahine@hotmail.fr>

* update README.md : the value of enhanced_cookie_protection should be double quoted

Signed-off-by: Rachad Abi Chahine <rachad.abi-chahine@hotmail.fr>
2020-02-29 02:54:39 -08:00

112 lines
3.7 KiB
YAML

{{- $fullName := include "pgadmin.fullname" . -}}
apiVersion: {{ template "deployment.apiVersion" . }}
kind: Deployment
metadata:
name: {{ $fullName }}
labels:
{{- include "pgadmin.labels" . | nindent 4 }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
app.kubernetes.io/name: {{ include "pgadmin.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- if .Values.strategy }}
strategy:
{{- .Values.strategy | toYaml | nindent 4 }}
{{- end }}
template:
metadata:
labels:
app.kubernetes.io/name: {{ include "pgadmin.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
spec:
initContainers:
- name: init-pgadmin
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
command: ["/bin/chown", "-R", "5050:5050", "/var/lib/pgadmin"]
volumeMounts:
- name: pgadmin-data
mountPath: /var/lib/pgadmin
securityContext:
runAsUser: 0
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- name: http
containerPort: 80
protocol: TCP
{{- if .Values.livenessProbe }}
livenessProbe:
httpGet:
path: /misc/ping
port: 80
{{- .Values.livenessProbe | toYaml | nindent 12 }}
{{- end }}
{{- if .Values.readinessProbe }}
readinessProbe:
httpGet:
path: /misc/ping
port: 80
{{- .Values.readinessProbe | toYaml | nindent 12 }}
{{- end }}
env:
- name: PGADMIN_CONFIG_ENHANCED_COOKIE_PROTECTION
value: !!string {{ .Values.env.enhanced_cookie_protection }}
- name: PGADMIN_DEFAULT_EMAIL
value: {{ .Values.env.email }}
- name: PGADMIN_DEFAULT_PASSWORD
valueFrom:
secretKeyRef:
name: {{ $fullName }}
key: password
volumeMounts:
- name: pgadmin-data
mountPath: /var/lib/pgadmin
{{- if .Values.serverDefinitions.enabled }}
- name: definitions
mountPath: /pgadmin4/servers.json
subPath: servers.json
{{- end }}
resources:
{{- .Values.resources | toYaml | nindent 12 }}
volumes:
- name: pgadmin-data
{{- if .Values.persistentVolume.enabled }}
persistentVolumeClaim:
claimName: {{ if .Values.persistentVolume.existingClaim }}{{ .Values.persistentVolume.existingClaim }}{{- else }}{{ $fullName }}{{- end }}
{{- else }}
emptyDir: {}
{{- end }}
{{- if .Values.serverDefinitions.enabled }}
- name: definitions
secret:
secretName: {{ template "pgadmin.secretName" . }}
items:
- key: servers.json
path: servers.json
{{- end }}
{{- if .Values.imagePullSecrets }}
imagePullSecrets:
{{- .Values.iamgePullSecrets | toYaml | nindent 8 }}
{{- end }}
{{- if .Values.nodeSelector }}
nodeSelector:
{{- .Values.nodeSelector | toYaml | nindent 8 }}
{{- end }}
{{- if .Values.securityContext }}
securityContext:
{{- .Values.securityContext | toYaml | nindent 8 }}
{{- end }}
{{- if .Values.affinity }}
affinity:
{{- .Values.affinity | toYaml | nindent 8 }}
{{- end }}
{{- if .Values.tolerations }}
tolerations:
{{- .Values.tolerations | toYaml | nindent 8 }}
{{- end }}