121 lines
4.1 KiB
YAML
121 lines
4.1 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: {{ include "romm.fullname" . }}
|
|
namespace: {{ .Values.namespace }}
|
|
labels:
|
|
{{- include "romm.labels" . | nindent 4 }}
|
|
spec:
|
|
replicas: {{ .Values.replicaCount }}
|
|
selector:
|
|
matchLabels:
|
|
{{- include "romm.selectorLabels" . | nindent 6 }}
|
|
template:
|
|
metadata:
|
|
{{- with .Values.podAnnotations }}
|
|
annotations:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
labels:
|
|
{{- include "romm.selectorLabels" . | nindent 8 }}
|
|
spec:
|
|
{{- with .Values.imagePullSecrets }}
|
|
imagePullSecrets:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
securityContext:
|
|
{{- toYaml .Values.podSecurityContext | nindent 8 }}
|
|
containers:
|
|
- name: {{ .Chart.Name }}
|
|
securityContext:
|
|
{{- toYaml .Values.securityContext | nindent 12 }}
|
|
image: "{{ .Values.www.image }}:{{ .Values.www.tag | default .Chart.AppVersion }}"
|
|
imagePullPolicy: {{ .Values.www.pullPolicy }}
|
|
env:
|
|
- name: ROMM_DB_DRIVER
|
|
value: mariadb
|
|
- name: DB_HOST
|
|
value: {{ include "romm.databaseHost" .}}:{{include "romm.databasePort" .}}
|
|
- name: DB_NAME
|
|
value: {{ include "romm.databaseName" . | quote }}
|
|
- name: DB_PASSWD
|
|
valueFrom:
|
|
secretKeyRef:
|
|
key: mariadb-password
|
|
name: {{ include "romm.databaseSecretName" . | quote }}
|
|
- name: DB_USER
|
|
value: {{ include "romm.databaseUser" . | quote }}
|
|
|
|
- name: CLIENT_ID
|
|
valueFrom:
|
|
secretKeyRef:
|
|
key: CLIENT_ID
|
|
name: {{ .Release.Name }}-config
|
|
- name: CLIENT_SECRET
|
|
valueFrom:
|
|
secretKeyRef:
|
|
key: CLIENT_SECRET
|
|
name: {{ .Release.Name }}-config
|
|
- name: STEAMGRIDDB_API_KEY
|
|
valueFrom:
|
|
secretKeyRef:
|
|
key: STEAMGRIDDB_API_KEY
|
|
name: {{ .Release.Name }}-config
|
|
ports:
|
|
- name: http
|
|
containerPort: 80
|
|
protocol: TCP
|
|
{{- if .Values.livenessProbe.enabled }}
|
|
livenessProbe:
|
|
{{- toYaml (omit .Values.livenessProbe "enabled") | nindent 12 }}
|
|
{{- end }}
|
|
{{- if .Values.readinessProbe.enabled }}
|
|
readinessProbe:
|
|
{{- toYaml (omit .Values.readinessProbe "enabled") | nindent 12 }}
|
|
{{- end }}
|
|
{{- if .Values.startupProbe.enabled }}
|
|
startupProbe:
|
|
{{- toYaml (omit .Values.startupProbe "enabled") | nindent 12 }}
|
|
{{- end }}
|
|
resources:
|
|
{{- toYaml .Values.resources | nindent 12 }}
|
|
volumeMounts:
|
|
- name: data
|
|
mountPath: /romm
|
|
{{- if .Values.persistence.subPath }}
|
|
subPath: {{ .Values.persistence.subPath }}
|
|
{{- end }}
|
|
volumes:
|
|
{{- if gt (len .Values.extraVolumes) 0 }}
|
|
{{- toYaml .Values.extraVolumes | nindent 8 }}
|
|
{{- end }}
|
|
{{- if and .Values.persistence.enabled .Values.persistence.existingClaim }}
|
|
- name: data
|
|
persistentVolumeClaim:
|
|
{{- with .Values.persistence.existingClaim }}
|
|
claimName: {{ tpl . $ }}
|
|
{{- end }}
|
|
{{- else if not .Values.persistence.enabled }}
|
|
- name: data
|
|
emptyDir: {}
|
|
{{- else if and .Values.persistence.enabled (not .Values.persistence.existingClaim) }}
|
|
- name: data
|
|
persistentVolumeClaim:
|
|
claimName: {{ include "romm.fullname" . }}-pvc
|
|
{{- end }}
|
|
{{- with .Values.nodeSelector }}
|
|
nodeSelector:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.affinity }}
|
|
affinity:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.tolerations }}
|
|
tolerations:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.dnsConfig }}
|
|
dnsConfig:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }} |