Files
chart/library/ix-dev/community/distribution/templates/_distribution.tpl
Stavros Kois a025fd6f83 Add distribution to community train (#1638)
* Add `distribution` to `community` train

* add service

* initial tests

* add values

* https

* add persistence

* add htpasswd

* mount file

* secret

* fix fullname

* typo

* typo

* add questions and metadata

* remove

* format

* allow disabling fs backend

* test with ro root fs

* remove comment

* fix auth and perms

* update icon
2023-10-18 12:27:59 +03:00

56 lines
2.0 KiB
Smarty

{{- define "distribution.workload" -}}
workload:
distribution:
enabled: true
primary: true
type: Deployment
podSpec:
hostNetwork: {{ .Values.distributionNetwork.hostNetwork }}
containers:
distribution:
enabled: true
primary: true
imageSelector: image
securityContext:
runAsUser: {{ .Values.distributionRunAs.user }}
runAsGroup: {{ .Values.distributionRunAs.group }}
envFrom:
- secretRef:
name: distribution-creds
- configMapRef:
name: distribution-config
{{ with .Values.distributionConfig.additionalEnvs }}
envList:
{{ range $env := . }}
- name: {{ $env.name }}
value: {{ $env.value }}
{{ end }}
{{ end }}
probes:
{{- $protocol := "http" -}}
{{- if .Values.distributionNetwork.certificateID -}}
{{- $protocol = "https" -}}
{{- end }}
liveness:
enabled: true
type: {{ $protocol }}
port: {{ .Values.distributionNetwork.apiPort }}
path: /
readiness:
enabled: true
type: {{ $protocol }}
port: {{ .Values.distributionNetwork.apiPort }}
path: /
startup:
enabled: true
type: {{ $protocol }}
port: {{ .Values.distributionNetwork.apiPort }}
path: /
initContainers:
{{- include "ix.v1.common.app.permissions" (dict "containerName" "01-permissions"
"UID" .Values.distributionRunAs.user
"GID" .Values.distributionRunAs.group
"mode" "check"
"type" "init") | nindent 8 }}
{{- end -}}