mirror of
https://github.com/commercialhaskell/stackage-server.git
synced 2026-01-12 04:08:29 +01:00
This is needed to we can easily migrate to the new db with the recent pantry changes. If something goes wrong we can simply revert to the old secret (and hence the old db). Once the upgrade is done (and verified) we can update the old secret and update the name in this commit (back to it's original name)
72 lines
2.0 KiB
YAML
72 lines
2.0 KiB
YAML
apiVersion: extensions/v1beta1
|
|
kind: Deployment
|
|
metadata:
|
|
name: {{ .Values.name }}
|
|
spec:
|
|
replicas: {{ .Values.image.replicas }}
|
|
minReadySeconds: 50
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: {{ .Values.app }}
|
|
release: {{ .Release.Name }}
|
|
spec:
|
|
imagePullSecrets:
|
|
- name: {{ .Values.registrySecretName }}
|
|
containers:
|
|
- name: stackage-server
|
|
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: /
|
|
port: 3000
|
|
httpHeaders:
|
|
# Works around stackage-server's `forceSSL` redirect
|
|
- name: HTTPS
|
|
value: "on"
|
|
initialDelaySeconds: 5
|
|
timeoutSeconds: 1
|
|
periodSeconds: 5
|
|
successThreshold: 1
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /
|
|
port: 3000
|
|
httpHeaders:
|
|
# Works around stackage-server's `forceSSL` redirect
|
|
- name: HTTPS
|
|
value: "on"
|
|
initialDelaySeconds: 120
|
|
timeoutSeconds: 1
|
|
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 }}
|