Skip to content

Commit

Permalink
Do not enable prometheus by default & and add prometheus annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
pieterlange committed Apr 2, 2018
1 parent 8d2fdfa commit 9e635e5
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
1 change: 0 additions & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ OVPN_PROTO="${OVPN_PROTO:-tcp}"
OVPN_NATDEVICE="${OVPN_NATDEVICE:-eth0}"
OVPN_K8S_DOMAIN="${OVPN_K8S_DOMAIN:-svc.cluster.local}"
OVPN_VERB=${OVPN_VERB:-3}
OVPN_STATUS="${OVPN_STATUS:-${OPENVPN}/status/server.status}"
OVPN_STATUS_VERSION=${OVPN_STATUS_VERSION:-2}

if [ ! -d "${EASYRSA_PKI}" ]; then
Expand Down
1 change: 1 addition & 0 deletions kube/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ data:
podcidr: "${podcidr}"
serverurl: "${serverurl}"
domain: "${domain}"
statusfile: "/etc/openvpn/status/server.status"
---
EOCONFIGMAP

Expand Down
8 changes: 8 additions & 0 deletions kube/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ spec:
metadata:
labels:
openvpn: ${OVPN_CN}
annotations:
prometheus.io/scrape: "true"
prometheus.io/port: "9176"
spec:
restartPolicy: Always
terminationGracePeriodSeconds: 60
Expand Down Expand Up @@ -65,6 +68,11 @@ spec:
configMapKeyRef:
name: openvpn-settings
key: domain
- name: OVPN_STATUS
valueFrom:
configMapKeyRef:
name: openvpn-settings
key: statusfile
- name: metrics
image: quay.io/plange/openvpn_exporter:latest
ports:
Expand Down

0 comments on commit 9e635e5

Please sign in to comment.