mirror of
https://github.com/truenas/charts.git
synced 2026-04-13 15:20:09 +08:00
dynamically set webui Port
This commit is contained in:
@@ -51,13 +51,14 @@ spec:
|
||||
containerPort: {{ .Values.wgUDPPort }}
|
||||
protocol: UDP
|
||||
- name: web
|
||||
containerPort: 51821
|
||||
containerPort: {{ .Values.webUIPort }}
|
||||
env:
|
||||
{{ $wgeasy := .Values.wgeasy }}
|
||||
{{ $envList := (default list .Values.environmentVariables) }}
|
||||
{{ $envList = mustAppend $envList (dict "name" "WG_HOST" "value" $wgeasy.host) }}
|
||||
{{ $envList = mustAppend $envList (dict "name" "PASSWORD" "value" $wgeasy.password) }}
|
||||
{{ $envList = mustAppend $envList (dict "name" "WG_PORT" "value" .Values.wgUDPPort) }}
|
||||
{{ $envList = mustAppend $envList (dict "name" "PORT" "value" .Values.webUIPort) }}
|
||||
{{ $envList = mustAppend $envList (dict "name" "WG_PERSISTENT_KEEPALIVE" "value" $wgeasy.keep_alive) }}
|
||||
{{ $envList = mustAppend $envList (dict "name" "WG_MTU" "value" $wgeasy.client_mtu) }}
|
||||
{{ $envList = mustAppend $envList (dict "name" "WG_DEFAULT_ADDRESS" "value" $wgeasy.client_address_range) }}
|
||||
@@ -71,19 +72,19 @@ spec:
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: 51821
|
||||
port: {{ .Values.webUIPort }}
|
||||
failureThreshold: 5
|
||||
periodSeconds: 15
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: 51821
|
||||
port: {{ .Values.webUIPort }}
|
||||
failureThreshold: 5
|
||||
periodSeconds: 15
|
||||
startupProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: 51821
|
||||
port: {{ .Values.webUIPort }}
|
||||
initialDelaySeconds: 5
|
||||
failureThreshold: 40
|
||||
periodSeconds: 15
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
{{ $selectors = mustAppend $selectors (dict "key" "app" "value" (include "common.names.name" .) ) }}
|
||||
{{ $selectors = mustAppend $selectors (dict "key" "release" "value" .Release.Name ) }}
|
||||
{{ $ports := list }}
|
||||
{{ $ports = mustAppend $ports (dict "name" "web" "port" .Values.webUIPort "nodePort" .Values.webUIPort "targetPort" 51821) }}
|
||||
{{ $ports = mustAppend $ports (dict "name" "web" "port" .Values.webUIPort "nodePort" .Values.webUIPort "targetPort" .Values.webUIPort) }}
|
||||
{{ $ports = mustAppend $ports (dict "name" "udp" "port" .Values.wgUDPPort "nodePort" .Values.wgUDPPort "targetPort" .Values.wgUDPPort "protocol" "UDP") }}
|
||||
{{ $params := . }}
|
||||
{{ $_ := set $params "commonService" (dict "type" "NodePort" "ports" $ports ) }}
|
||||
|
||||
Reference in New Issue
Block a user