Files
chart/library/ix-dev/community/rust-desk/templates/_rust-desk-server.tpl
Stavros Kois 8424616d0e NAS-123927 / 24.04 / Add rust-desk to community train (#1512)
* Add `rust-desk` to `community` train

* typo

* fix ports

* fix few things

* add ui

* no portal

* add opton for onyl encrypted conns

* typo

* fix strateg

* fix flake
2023-09-08 23:12:42 +03:00

56 lines
1.8 KiB
Smarty

{{- define "rust-server.workload" -}}
{{- $fullname := (include "ix.v1.common.lib.chart.names.fullname" $) -}}
{{- $relay := (printf "%s-relay:%v" $fullname .Values.rustNetwork.relayPort) -}}
{{- $relays := mustAppend .Values.rustConfig.additionalRelayServers $relay }}
workload:
server:
enabled: true
primary: true
type: Deployment
podSpec:
hostNetwork: {{ .Values.rustNetwork.hostNetwork }}
containers:
server:
enabled: true
primary: true
imageSelector: image
securityContext:
runAsUser: {{ .Values.rustRunAs.user }}
runAsGroup: {{ .Values.rustRunAs.group }}
command:
- hbbs
args:
- -r
- "{{ join "," $relays }}"
{{ if .Values.rustConfig.allowOnlyEncryptedConnections }}
- -k
- _
{{ end }}
{{ with .Values.rustConfig.additionalEnvs }}
envList:
{{ range $env := . }}
- name: {{ $env.name }}
value: {{ $env.value }}
{{ end }}
{{ end }}
probes:
liveness:
enabled: true
type: tcp
port: 21115
readiness:
enabled: true
type: tcp
port: 21115
startup:
enabled: true
type: tcp
port: 21115
initContainers:
{{- include "ix.v1.common.app.permissions" (dict "containerName" "01-permissions"
"UID" .Values.rustRunAs.user
"GID" .Values.rustRunAs.group
"mode" "check"
"type" "init") | nindent 8 }}
{{- end -}}