stackage-server/etc/helm/templates/hoogle_deployment.yaml
Deni Bertovic 98d0d61958 Adds /healthz endpoint
And points k8s readiness and liveness probes on it
2019-06-18 10:11:43 +02:00

72 lines
2.0 KiB
YAML

apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: {{ .Values.hoogleName }}
spec:
replicas: {{ .Values.image.replicasHoggle }}
minReadySeconds: 5
template:
metadata:
labels:
app: {{ .Values.hoogleApp }}
release: {{ .Release.Name }}
spec:
imagePullSecrets:
- name: {{ .Values.registrySecretName }}
containers:
- name: stackage-server-hoogle
image: {{ .Values.image.image }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- name: http
containerPort: 3000
command: ["stackage-server"]
workingDir: /app
env:
- name: APPROOT
value: {{ .Values.image.env.approot | quote }}
- name: PGSTRING
valueFrom:
secretKeyRef:
name: {{ .Values.name }}-upgrade
key: PGCONN
readinessProbe:
httpGet:
path: /healthz
port: 3000
httpHeaders:
# Works around stackage-server's `forceSSL` redirect
- name: HTTPS
value: "on"
initialDelaySeconds: 5
timeoutSeconds: 3
periodSeconds: 5
successThreshold: 1
livenessProbe:
httpGet:
path: /healthz
port: 3000
httpHeaders:
# Works around stackage-server's `forceSSL` redirect
- name: HTTPS
value: "on"
initialDelaySeconds: 120
timeoutSeconds: 3
periodSeconds: 10
successThreshold: 1
failureThreshold: 3
resources:
{{ toYaml .Values.stackageResources.resources | indent 12 }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}