mirror of
https://github.com/apricote/Listory.git
synced 2026-02-08 18:57:03 +00:00
feat(cd): add Helm Chart with automated releases
This commit is contained in:
parent
e186915695
commit
1bdd6181ba
13 changed files with 399 additions and 2 deletions
80
charts/listory/templates/deployment.yaml
Normal file
80
charts/listory/templates/deployment.yaml
Normal file
|
|
@ -0,0 +1,80 @@
|
|||
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 }}
|
||||
- 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 }}
|
||||
|
||||
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 }}
|
||||
Loading…
Add table
Add a link
Reference in a new issue