Skip to content

Commit 830a58f

Browse files
authored
add friendly names to the config for the exporter (#29)
Signed-off-by: DavidSpek <[email protected]> Signed-off-by: DavidSpek <[email protected]>
1 parent 8a3e728 commit 830a58f

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

config/samples/vpn_v1alpha1_wireguardserver.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ metadata:
55
namespace: default
66
spec:
77
serviceType: LoadBalancer
8-
wireguardImage: dkr.plural.sh/bootstrap/wireguard-server:0.1.1
8+
wireguardImage: dkr.plural.sh/bootstrap/wireguard-server:0.1.2
99
networkCIDR: 10.8.0.1/24
1010
mtu: "8921"
1111
dns:

controllers/vpn/wireguardserver_controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ ListenPort = %v
195195
continue
196196
}
197197

198-
peerConfig = peerConfig + fmt.Sprintf("\n[Peer]\nPublicKey = %s\nallowedIps = %s\n\n", peer.Spec.PublicKey, peer.Spec.Address)
198+
peerConfig = peerConfig + fmt.Sprintf("\n[Peer]\n# friendly_name = %s\nPublicKey = %s\nallowedIps = %s\n\n", peer.Name, peer.Spec.PublicKey, peer.Spec.Address)
199199
}
200200

201201
wgConfig = wgConfig + peerConfig

hack/images/wireguard/entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ function watch_and_update() {
2828
trap 'shutdown_wg "$1"' SIGTERM SIGINT SIGQUIT
2929
cp /tmp/wireguard/config /etc/wireguard/wg0.conf
3030
wg-quick up wg0
31-
/usr/local/bin/prometheus_wireguard_exporter &>/dev/null &
31+
/usr/local/bin/prometheus_wireguard_exporter -n /etc/wireguard/wg0.conf &>/dev/null &
3232
fswatch -o /tmp/wireguard/ | (while read; do update_config; done)
3333
}
3434

hack/images/wireguard/release.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ set -euo pipefail
1919
cd $(dirname $0)
2020

2121
REPOSITORY="${REPOSITORY:-dkr.plural.sh/bootstrap/wireguard-server}"
22-
VERSION=0.1.1
22+
VERSION=0.1.2
2323
SUFFIX=""
2424

2525
docker buildx build --platform linux/amd64 --no-cache --pull --push -f "Dockerfile" -t "${REPOSITORY}:${VERSION}${SUFFIX}" .

0 commit comments

Comments
 (0)