|
@@ -6,12 +6,17 @@ metadata:
|
|
|
{{- include "openvpn.labels" . | nindent 4 }}
|
|
|
spec:
|
|
|
replicas: 1
|
|
|
+ strategy:
|
|
|
+ type: Recreate
|
|
|
selector:
|
|
|
matchLabels:
|
|
|
{{- include "openvpn.selectorLabels" . | nindent 6 }}
|
|
|
template:
|
|
|
metadata:
|
|
|
annotations:
|
|
|
+ {{- if .Values.multus }}
|
|
|
+ v1.multus-cni.io/default-network: "{{ .Release.Namespace }}/{{ .Release.Name }}-net"
|
|
|
+ {{- end }}
|
|
|
checksum/config: {{ include (print $.Template.BasePath "/cm-configuration.yaml") . | sha256sum }}
|
|
|
checksum/config2: {{ include (print $.Template.BasePath "/secret-keys.yaml") . | sha256sum }}
|
|
|
checksum/config3: {{ include (print $.Template.BasePath "/cm-openvpnscripts.yaml") . | sha256sum }}
|
|
@@ -25,7 +30,9 @@ spec:
|
|
|
imagePullSecrets:
|
|
|
- name: {{ include "openvpn.fullname" . }}-registry-secret
|
|
|
{{- end }}
|
|
|
+ {{- if not .Values.multus }}
|
|
|
hostNetwork: true
|
|
|
+ {{- end }}
|
|
|
containers:
|
|
|
- name: {{ .Chart.Name }}
|
|
|
command: ["/scripts/startscript"]
|
|
@@ -47,7 +54,7 @@ spec:
|
|
|
imagePullPolicy: {{ .Values.openvpn.pullPolicy }}
|
|
|
env:
|
|
|
- name: TZ
|
|
|
- value: Europe/Moscow
|
|
|
+ value: Europe/Moscow
|
|
|
resources:
|
|
|
{{- toYaml .Values.openvpn.resources | nindent 12 }}
|
|
|
volumeMounts:
|
|
@@ -59,6 +66,7 @@ spec:
|
|
|
mountPath: /etc/openvpn/configuration/
|
|
|
- name: scripts
|
|
|
mountPath: /scripts/
|
|
|
+ {{- if and .Values.virtIP_addr .Values.virtIP_dev }}
|
|
|
- name: {{ .Chart.Name }}-stop
|
|
|
image: "{{ .Values.openvpn.image }}:{{ .Values.openvpn.tag | default "latest" }}"
|
|
|
imagePullPolicy: {{ .Values.openvpn.pullPolicy }}
|
|
@@ -75,12 +83,19 @@ spec:
|
|
|
add:
|
|
|
- NET_ADMIN
|
|
|
- MKNOD
|
|
|
+ {{- end }}
|
|
|
+ {{- if .Values.multus }}
|
|
|
+ dnsPolicy: "None"
|
|
|
+ dnsConfig:
|
|
|
+ nameservers:
|
|
|
+ - {{ .Values.multus.dnsIP }}
|
|
|
+ {{- end }}
|
|
|
volumes:
|
|
|
- name: keys
|
|
|
secret:
|
|
|
secretName: {{ include "openvpn.fullname" . }}-keys
|
|
|
- name: ccd
|
|
|
- configMap:
|
|
|
+ configMap:
|
|
|
name: {{ include "openvpn.fullname" . }}-ccd
|
|
|
- name: configuration
|
|
|
configMap:
|