|
@@ -37,9 +37,17 @@ spec:
|
|
|
- name: extrappvolume-{{ $index }}
|
|
|
mountPath: {{ $hostPathConfiguration.mountPath }}
|
|
|
{{ end }}
|
|
|
+ securityContext:
|
|
|
+ capabilities:
|
|
|
+ {{ if .Values.hostNetwork }}
|
|
|
+ {{/* This is needed to be able to bind 53(DNS) and 67(DHCP) ports */}}
|
|
|
+ add: ["NET_ADMIN"]
|
|
|
+ {{ else }}
|
|
|
+ add: []
|
|
|
+ {{ end }}
|
|
|
ports:
|
|
|
- name: web
|
|
|
- containerPort: 80
|
|
|
+ containerPort: {{ .Values.web_port }}
|
|
|
- name: dns-tcp
|
|
|
containerPort: 53
|
|
|
protocol: TCP
|
|
@@ -51,13 +59,44 @@ spec:
|
|
|
containerPort: 67
|
|
|
protocol: UDP
|
|
|
{{ end }}
|
|
|
+ readinessProbe:
|
|
|
+ httpGet:
|
|
|
+ path: /admin/login.php
|
|
|
+ port: {{ .Values.web_port }}
|
|
|
+ initialDelaySeconds: 10
|
|
|
+ periodSeconds: 10
|
|
|
+ timeoutSeconds: 5
|
|
|
+ failureThreshold: 5
|
|
|
+ successThreshold: 2
|
|
|
+ livenessProbe:
|
|
|
+ httpGet:
|
|
|
+ path: /admin/login.php
|
|
|
+ port: {{ .Values.web_port }}
|
|
|
+ initialDelaySeconds: 10
|
|
|
+ periodSeconds: 10
|
|
|
+ timeoutSeconds: 5
|
|
|
+ failureThreshold: 5
|
|
|
+ successThreshold: 1
|
|
|
+ startupProbe:
|
|
|
+ httpGet:
|
|
|
+ path: /admin/login.php
|
|
|
+ port: {{ .Values.web_port }}
|
|
|
+ initialDelaySeconds: 10
|
|
|
+ periodSeconds: 5
|
|
|
+ timeoutSeconds: 2
|
|
|
+ failureThreshold: 60
|
|
|
+ successThreshold: 1
|
|
|
env:
|
|
|
{{ $secretName := (include "common.names.fullname" .) }}
|
|
|
{{ $envList := (default list .Values.environmentVariables) }}
|
|
|
{{ $envList = mustAppend $envList (dict "name" "WEBPASSWORD" "valueFromSecret" true "secretName" $secretName "secretKey" "password") }}
|
|
|
{{ $envList = mustAppend $envList (dict "name" "TZ" "value" (printf "%s" .Values.timezone)) }}
|
|
|
+ {{ $envList = mustAppend $envList (dict "name" "WEB_PORT" "value" .Values.web_port) }}
|
|
|
{{ if .Values.dhcp }}
|
|
|
{{ $envList = mustAppend $envList (dict "name" "DHCP_ACTIVE" "value" "true") }}
|
|
|
+ {{ $envList = mustAppend $envList (dict "name" "DHCP_START" "value" .Values.dhcp_start) }}
|
|
|
+ {{ $envList = mustAppend $envList (dict "name" "DHCP_END" "value" .Values.dhcp_end) }}
|
|
|
+ {{ $envList = mustAppend $envList (dict "name" "DHCP_ROUTER" "value" .Values.dhcp_gateway) }}
|
|
|
{{ end }}
|
|
|
{{ include "common.containers.environmentVariables" (dict "environmentVariables" $envList) | nindent 12 }}
|
|
|
{{ include "common.networking.dnsConfiguration" .Values | nindent 6 }}
|