mirror of
https://github.com/truenas/charts.git
synced 2026-04-05 11:48:55 +08:00
* Apply a partial fix for hostnetwork toggling * gh hightlighting * fix test * apply it to few more apps * update comment * bump changed apps * add mail attrib * bump apps
99 lines
3.8 KiB
YAML
99 lines
3.8 KiB
YAML
{{ 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 }}
|