1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798 |
- {{ include "common.storage.hostPathValidate" .Values }}
- apiVersion: {{ template "common.capabilities.deployment.apiVersion" . }}
- kind: Deployment
- metadata:
- name: {{ template "common.names.fullname" . }}
- labels:
- app: {{ template "common.names.name" . }}
- chart: {{ template "common.names.chart" . }}
- release: {{ .Release.Name }}
- heritage: {{ .Release.Service }}
- annotations:
- rollme: {{ randAlphaNum 5 | quote }}
- spec:
- replicas: {{ (default 1 .Values.replicas) }}
- strategy:
- type: "Recreate"
- selector:
- matchLabels:
- app: {{ template "common.names.name" . }}
- release: {{ .Release.Name }}
- template:
- metadata:
- name: {{ template "common.names.fullname" . }}
- labels:
- app: {{ template "common.names.name" . }}
- release: {{ .Release.Name }}
- {{- include "common.labels.selectorLabels" . | nindent 8 }}
- annotations: {{ include "common.annotations" . | nindent 8 }}
- spec:
- hostNetwork: {{ .Values.hostNetwork }}
- hostname: {{ .Release.Name }}
- containers:
- - name: {{ .Chart.Name }}
- {{ include "common.resources.limitation" . | nindent 10 }}
- {{ include "common.containers.imageConfig" .Values.image | nindent 10 }}
- volumeMounts: {{ include "common.storage.configureAppVolumeMountsInContainer" .Values | nindent 12 }}
- {{ range $index, $hostPathConfiguration := .Values.extraAppVolumeMounts }}
- - name: extrappvolume-{{ $index }}
- mountPath: {{ $hostPathConfiguration.mountPath }}
- {{ end }}
- ports:
- - name: web
- containerPort: 8384
- {{ if not .Values.hostNetwork }}
- hostPort: null
- {{ end }}
- - name: tcp
- containerPort: 22000
- protocol: TCP
- {{ if not .Values.hostNetwork }}
- hostPort: null
- {{ end }}
- - name: udp
- containerPort: 22000
- protocol: UDP
- {{ if not .Values.hostNetwork }}
- hostPort: null
- {{ end }}
- readinessProbe:
- httpGet:
- path: /rest/noauth/health
- port: 8384
- initialDelaySeconds: 10
- periodSeconds: 10
- timeoutSeconds: 5
- failureThreshold: 5
- successThreshold: 2
- livenessProbe:
- httpGet:
- path: /rest/noauth/health
- port: 8384
- initialDelaySeconds: 10
- periodSeconds: 10
- timeoutSeconds: 5
- failureThreshold: 5
- successThreshold: 1
- startupProbe:
- httpGet:
- path: /rest/noauth/health
- port: 8384
- initialDelaySeconds: 10
- periodSeconds: 5
- timeoutSeconds: 2
- failureThreshold: 60
- successThreshold: 1
- env:
- {{ $envList := (default list .Values.environmentVariables) }}
- {{ $envList = mustAppend $envList (dict "name" "PUID" "value" (printf "%d" (.Values.ownerUID | int))) }}
- {{ $envList = mustAppend $envList (dict "name" "PGID" "value" (printf "%d" (.Values.ownerGID | int))) }}
- {{ $envList = mustAppend $envList (dict "name" "STGUIADDRESS" "value" "0.0.0.0:8384") }}
- {{ include "common.containers.environmentVariables" (dict "environmentVariables" $envList) | nindent 12 }}
- {{ include "common.networking.dnsConfiguration" .Values | nindent 6 }}
- volumes: {{ include "common.storage.configureAppVolumes" .Values | nindent 8 }}
- {{ range $index, $hostPathConfiguration := .Values.extraAppVolumeMounts }}
- - name: extrappvolume-{{ $index }}
- hostPath:
- path: {{ $hostPathConfiguration.hostPath }}
- {{ end }}
|