mirror of
https://github.com/Thumbscrew/k8s-charts.git
synced 2024-11-10 08:03:50 +00:00
77 lines
2.3 KiB
YAML
77 lines
2.3 KiB
YAML
|
apiVersion: apps/v1
|
||
|
kind: Deployment
|
||
|
metadata:
|
||
|
name: {{ include "pgadmin.fullname" . }}
|
||
|
labels:
|
||
|
{{- include "pgadmin.labels" . | nindent 4 }}
|
||
|
spec:
|
||
|
replicas: {{ .Values.replicaCount }}
|
||
|
strategy:
|
||
|
type: Recreate
|
||
|
selector:
|
||
|
matchLabels:
|
||
|
{{- include "pgadmin.selectorLabels" . | nindent 6 }}
|
||
|
template:
|
||
|
metadata:
|
||
|
{{- with .Values.podAnnotations }}
|
||
|
annotations:
|
||
|
{{- toYaml . | nindent 8 }}
|
||
|
{{- end }}
|
||
|
labels:
|
||
|
{{- include "pgadmin.selectorLabels" . | nindent 8 }}
|
||
|
spec:
|
||
|
{{- with .Values.imagePullSecrets }}
|
||
|
imagePullSecrets:
|
||
|
{{- toYaml . | nindent 8 }}
|
||
|
{{- end }}
|
||
|
serviceAccountName: {{ include "pgadmin.serviceAccountName" . }}
|
||
|
securityContext:
|
||
|
{{- toYaml .Values.podSecurityContext | nindent 8 }}
|
||
|
containers:
|
||
|
- name: {{ .Chart.Name }}
|
||
|
securityContext:
|
||
|
{{- toYaml .Values.securityContext | nindent 12 }}
|
||
|
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
|
||
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||
|
ports:
|
||
|
- name: http
|
||
|
containerPort: {{ .Values.service.port }}
|
||
|
protocol: TCP
|
||
|
env:
|
||
|
{{- toYaml .Values.env | nindent 12 }}
|
||
|
livenessProbe:
|
||
|
httpGet:
|
||
|
path: /login
|
||
|
port: http
|
||
|
startupProbe:
|
||
|
httpGet:
|
||
|
path: /login
|
||
|
port: http
|
||
|
periodSeconds: 3
|
||
|
failureThreshold: 10
|
||
|
resources:
|
||
|
{{- toYaml .Values.resources | nindent 12 }}
|
||
|
volumeMounts:
|
||
|
- name: pgadmin-config
|
||
|
mountPath: /var/lib/pgadmin
|
||
|
volumes:
|
||
|
- name: pgadmin-config
|
||
|
{{- if .Values.persistence.enabled }}
|
||
|
persistentVolumeClaim:
|
||
|
claimName: {{ if .Values.persistence.existingClaim }}{{ .Values.persistence.existingClaim }}{{- else }}{{ template "pgadmin.fullname" . }}-pvc{{- end }}
|
||
|
{{- else }}
|
||
|
emptyDir: {}
|
||
|
{{- end }}
|
||
|
{{- with .Values.nodeSelector }}
|
||
|
nodeSelector:
|
||
|
{{- toYaml . | nindent 8 }}
|
||
|
{{- end }}
|
||
|
{{- with .Values.affinity }}
|
||
|
affinity:
|
||
|
{{- toYaml . | nindent 8 }}
|
||
|
{{- end }}
|
||
|
{{- with .Values.tolerations }}
|
||
|
tolerations:
|
||
|
{{- toYaml . | nindent 8 }}
|
||
|
{{- end }}
|