2020-05-08 02:11:39 +02:00
|
|
|
apiVersion: apps/v1
|
|
|
|
|
kind: Deployment
|
|
|
|
|
metadata:
|
|
|
|
|
name: {{ include "listory.fullname" . }}
|
|
|
|
|
labels:
|
|
|
|
|
{{- include "listory.labels" . | nindent 4 }}
|
|
|
|
|
spec:
|
|
|
|
|
replicas: {{ .Values.replicaCount }}
|
|
|
|
|
selector:
|
|
|
|
|
matchLabels:
|
|
|
|
|
{{- include "listory.selectorLabels" . | nindent 6 }}
|
|
|
|
|
template:
|
|
|
|
|
metadata:
|
|
|
|
|
labels:
|
|
|
|
|
{{- include "listory.selectorLabels" . | nindent 8 }}
|
|
|
|
|
spec:
|
|
|
|
|
{{- with .Values.imagePullSecrets }}
|
|
|
|
|
imagePullSecrets:
|
|
|
|
|
{{- toYaml . | nindent 8 }}
|
|
|
|
|
{{- end }}
|
|
|
|
|
serviceAccountName: {{ include "listory.serviceAccountName" . }}
|
|
|
|
|
securityContext:
|
|
|
|
|
{{- toYaml .Values.podSecurityContext | nindent 8 }}
|
|
|
|
|
containers:
|
|
|
|
|
- name: {{ .Chart.Name }}
|
|
|
|
|
image: "{{ .Values.image.repository }}:{{ .Chart.AppVersion }}"
|
|
|
|
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
|
|
|
|
env:
|
|
|
|
|
- name: DB_HOST
|
|
|
|
|
value: {{ .Values.externalDatabase.host }}
|
|
|
|
|
- name: DB_USERNAME
|
|
|
|
|
value: {{ .Values.externalDatabase.user }}
|
|
|
|
|
- name: DB_PASSWORD
|
|
|
|
|
valueFrom:
|
|
|
|
|
secretKeyRef:
|
|
|
|
|
name: {{ include "listory.fullname" . }}-external-db
|
|
|
|
|
key: postgres-password
|
|
|
|
|
- name: DB_DATABASE
|
|
|
|
|
value: {{ .Values.externalDatabase.database }}
|
2022-06-11 18:47:04 +02:00
|
|
|
- name: DB_POOL_MAX
|
|
|
|
|
value: "{{ .Values.database.poolMax }}"
|
2020-05-08 02:11:39 +02:00
|
|
|
- name: JWT_SECRET
|
|
|
|
|
valueFrom:
|
|
|
|
|
secretKeyRef:
|
|
|
|
|
name: {{ include "listory.fullname" . }}
|
|
|
|
|
key: jwt-secret
|
|
|
|
|
- name: APP_URL
|
|
|
|
|
value: https://{{ .Values.ingress.host }}
|
|
|
|
|
- name: SPOTIFY_CLIENT_ID
|
|
|
|
|
value: {{ .Values.spotify.clientId }}
|
|
|
|
|
- name: SPOTIFY_CLIENT_SECRET
|
|
|
|
|
valueFrom:
|
|
|
|
|
secretKeyRef:
|
|
|
|
|
name: {{ include "listory.fullname" . }}
|
|
|
|
|
key: spotify-client-secret
|
|
|
|
|
- name: SPOTIFY_USER_FILTER
|
|
|
|
|
value: {{ .Values.spotify.userFilter }}
|
2020-11-17 22:36:51 +01:00
|
|
|
|
2020-11-18 12:18:05 +01:00
|
|
|
{{- if .Values.sentry.enabled }}
|
2020-11-17 22:36:51 +01:00
|
|
|
- name: SENTRY_ENABLED
|
2020-11-18 12:18:05 +01:00
|
|
|
value: "true"
|
2020-11-17 22:36:51 +01:00
|
|
|
- name: SENTRY_DSN
|
|
|
|
|
value: {{ .Values.sentry.dsn }}
|
2020-11-18 12:18:05 +01:00
|
|
|
{{- end }}
|
|
|
|
|
|
2020-12-06 02:44:36 +01:00
|
|
|
{{- if .Values.prometheus.enabled }}
|
|
|
|
|
- name: PROMETHEUS_ENABLED
|
|
|
|
|
value: "true"
|
2020-12-06 03:03:33 +01:00
|
|
|
|
|
|
|
|
{{- if .Values.prometheus.basicAuth.enabled }}
|
|
|
|
|
- name: PROMETHEUS_BASIC_AUTH
|
|
|
|
|
value: "true"
|
|
|
|
|
- name: PROMETHEUS_BASIC_AUTH_USERNAME
|
|
|
|
|
valueFrom:
|
|
|
|
|
secretKeyRef:
|
|
|
|
|
name: {{ include "listory.fullname" . }}
|
|
|
|
|
key: prometheus-basic-auth-username
|
|
|
|
|
- name: PROMETHEUS_BASIC_AUTH_PASSWORD
|
|
|
|
|
valueFrom:
|
|
|
|
|
secretKeyRef:
|
|
|
|
|
name: {{ include "listory.fullname" . }}
|
|
|
|
|
key: prometheus-basic-auth-password
|
|
|
|
|
{{- end }}
|
2020-12-06 02:44:36 +01:00
|
|
|
{{- end }}
|
|
|
|
|
|
2020-05-08 02:11:39 +02:00
|
|
|
securityContext:
|
|
|
|
|
{{- toYaml .Values.securityContext | nindent 12 }}
|
|
|
|
|
ports:
|
|
|
|
|
- name: http
|
|
|
|
|
containerPort: 3000
|
|
|
|
|
protocol: TCP
|
|
|
|
|
readinessProbe:
|
|
|
|
|
httpGet:
|
|
|
|
|
path: /api/v1/health
|
|
|
|
|
port: http
|
|
|
|
|
resources:
|
|
|
|
|
{{- toYaml .Values.resources | nindent 12 }}
|
|
|
|
|
{{- with .Values.nodeSelector }}
|
|
|
|
|
nodeSelector:
|
|
|
|
|
{{- toYaml . | nindent 8 }}
|
|
|
|
|
{{- end }}
|
|
|
|
|
{{- with .Values.affinity }}
|
|
|
|
|
affinity:
|
|
|
|
|
{{- toYaml . | nindent 8 }}
|
|
|
|
|
{{- end }}
|
|
|
|
|
{{- with .Values.tolerations }}
|
|
|
|
|
tolerations:
|
|
|
|
|
{{- toYaml . | nindent 8 }}
|
|
|
|
|
{{- end }}
|