Skip to content

Commit 8e58f17

Browse files
authored
feat(openvpn): optional service for metrics (#161)
Fixes #160 Signed-off-by: Aurora Gaffney <aurora@blinklabs.io>
1 parent b42ae03 commit 8e58f17

3 files changed

Lines changed: 35 additions & 1 deletion

File tree

charts/openvpn/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: A Helm chart for deploying OpenVPN in Kubernetes
44

55
type: application
66

7-
version: 0.4.0
7+
version: 0.5.0
88

99
appVersion: "0.3.0"
1010

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{{- if (and .Values.metrics.enabled .Values.metrics.service.enabled) }}
2+
apiVersion: v1
3+
kind: Service
4+
metadata:
5+
name: {{ include "openvpn.fullname" . }}-metrics
6+
labels:
7+
{{- include "openvpn.labels" . | nindent 4 }}
8+
{{- with .Values.metrics.service.annotations }}
9+
annotations: {{- toYaml . | nindent 4 }}
10+
{{- end }}
11+
spec:
12+
type: {{ .Values.metrics.service.type }}
13+
ports:
14+
- port: {{ .Values.metrics.service.port }}
15+
targetPort: metrics
16+
{{- with .Values.metrics.service.nodePort }}
17+
nodePort: {{ . }}
18+
{{- end }}
19+
protocol: {{ .Values.metrics.service.protocol }}
20+
name: metrics
21+
selector:
22+
{{- include "openvpn.selectorLabels" . | nindent 4 }}
23+
{{- with .Values.metrics.service.loadBalancerClass }}
24+
loadBalancerClass: {{ . }}
25+
{{- end }}
26+
{{- end }}

charts/openvpn/values.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,3 +130,11 @@ metrics:
130130
port: 9176
131131
statusFile: /var/tmp/openvpn/openvpn-status.log
132132
resources: {}
133+
service:
134+
enabled: false
135+
type: ClusterIP
136+
port: 9176
137+
# nodePort:
138+
protocol: TCP
139+
annotations: {}
140+
# loadBalancerClass:

0 commit comments

Comments
 (0)