47 lines
No EOL
1.7 KiB
YAML
47 lines
No EOL
1.7 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: {{ include "go-loose.fullname" . }}
|
|
labels:
|
|
{{- include "go-loose.labels" . | nindent 4 }}
|
|
spec:
|
|
replicas: {{ .Values.replicaCount }}
|
|
selector:
|
|
matchLabels:
|
|
{{- include "go-loose.selectorLabels" . | nindent 6 }}
|
|
template:
|
|
metadata:
|
|
labels:
|
|
{{- include "go-loose.labels" . | nindent 8 }}
|
|
spec:
|
|
containers:
|
|
- name: {{ .Chart.Name }}
|
|
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
|
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
|
ports:
|
|
- name: http
|
|
containerPort: {{ .Values.service.port }}
|
|
protocol: TCP
|
|
env:
|
|
- name: GO_LOOSE_SESSION_SECRET
|
|
value: {{ .Values.sessionSecret | quote }}
|
|
- name: GO_LOOSE_DATABASE_URL
|
|
value: "postgres://{{ .Values.postgresql.auth.username }}:{{ .Values.postgresql.auth.password }}@{{ .Release.Name }}-postgresql:5432/{{ .Values.postgresql.auth.database }}?sslmode=disable"
|
|
{{- with .Values.probes.livenessProbe }}
|
|
livenessProbe:
|
|
httpGet:
|
|
path: {{ .httpGet.path }}
|
|
port: http
|
|
initialDelaySeconds: {{ .initialDelaySeconds }}
|
|
periodSeconds: {{ .periodSeconds }}
|
|
{{- end }}
|
|
{{- with .Values.probes.readinessProbe }}
|
|
readinessProbe:
|
|
httpGet:
|
|
path: {{ .httpGet.path }}
|
|
port: http
|
|
initialDelaySeconds: {{ .initialDelaySeconds }}
|
|
periodSeconds: {{ .periodSeconds }}
|
|
{{- end }}
|
|
resources:
|
|
{{- toYaml .Values.resources | nindent 12 }} |