File tree 4 files changed +27
-21
lines changed
4 files changed +27
-21
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ OVPN_PROTO="${OVPN_PROTO:-tcp}"
22
22
OVPN_NATDEVICE=" ${OVPN_NATDEVICE:- eth0} "
23
23
OVPN_K8S_DOMAIN=" ${OVPN_K8S_DOMAIN:- svc.cluster.local} "
24
24
OVPN_VERB=${OVPN_VERB:- 3}
25
+ OVPN_STATUS_VERSION=${OVPN_STATUS_VERSION:- 2}
25
26
26
27
if [ ! -d " ${EASYRSA_PKI} " ]; then
27
28
echo " PKI directory missing. Did you mount in your Secret?"
101
102
102
103
if [ -n " ${OVPN_STATUS} " ]; then
103
104
addArg " --status" " ${OVPN_STATUS} "
104
- /sbin/print- status.sh ${OVPN_STATUS} &
105
+ addArg " -- status-version " " ${OVPN_STATUS_VERSION} "
105
106
fi
106
107
107
108
if [ $DEBUG ]; then
Original file line number Diff line number Diff line change 65
65
podcidr: "${podcidr} "
66
66
serverurl: "${serverurl} "
67
67
domain: "${domain} "
68
+ statusfile: "/etc/openvpn/status/server.status"
68
69
---
69
70
EOCONFIGMAP
70
71
Original file line number Diff line number Diff line change 9
9
metadata :
10
10
labels :
11
11
openvpn : ${OVPN_CN}
12
+ annotations :
13
+ prometheus.io/scrape : " true"
14
+ prometheus.io/port : " 9176"
12
15
spec :
13
16
restartPolicy : Always
14
17
terminationGracePeriodSeconds : 60
15
18
containers :
16
19
- name : openvpn
17
- image : ptlange /openvpn:latest
20
+ image : quay.io/plange /openvpn:latest
18
21
securityContext :
19
22
capabilities :
20
23
add :
35
38
name : openvpn-ccd
36
39
- mountPath : /etc/openvpn/portmapping
37
40
name : openvpn-portmapping
41
+ - mountPath : /etc/openvpn/status
42
+ name : openvpn-status
43
+ ports :
44
+ - name : openvpn
45
+ containerPort : 1194
38
46
env :
39
47
- name : PODIPADDR
40
48
valueFrom :
60
68
configMapKeyRef :
61
69
name : openvpn-settings
62
70
key : domain
71
+ - name : OVPN_STATUS
72
+ valueFrom :
73
+ configMapKeyRef :
74
+ name : openvpn-settings
75
+ key : statusfile
76
+ - name : metrics
77
+ image : quay.io/plange/openvpn_exporter:latest
78
+ ports :
79
+ - name : openvpn
80
+ containerPort : 9176
81
+ volumeMounts :
82
+ - mountPath : /etc/openvpn_exporter/
83
+ name : openvpn-status
63
84
volumes :
64
85
- name : openvpn-pki
65
86
secret :
75
96
- name : openvpn-portmapping
76
97
configMap :
77
98
name : openvpn-portmapping
99
+ - name : openvpn-status
100
+ emptyDir : {}
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments