Skip to content

Commit

Permalink
add friendly names to the config for the exporter (#29)
Browse files Browse the repository at this point in the history
Signed-off-by: DavidSpek <[email protected]>

Signed-off-by: DavidSpek <[email protected]>
  • Loading branch information
davidspek authored Oct 26, 2022
1 parent 8a3e728 commit 830a58f
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion config/samples/vpn_v1alpha1_wireguardserver.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
namespace: default
spec:
serviceType: LoadBalancer
wireguardImage: dkr.plural.sh/bootstrap/wireguard-server:0.1.1
wireguardImage: dkr.plural.sh/bootstrap/wireguard-server:0.1.2
networkCIDR: 10.8.0.1/24
mtu: "8921"
dns:
Expand Down
2 changes: 1 addition & 1 deletion controllers/vpn/wireguardserver_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ ListenPort = %v
continue
}

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

wgConfig = wgConfig + peerConfig
Expand Down
2 changes: 1 addition & 1 deletion hack/images/wireguard/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function watch_and_update() {
trap 'shutdown_wg "$1"' SIGTERM SIGINT SIGQUIT
cp /tmp/wireguard/config /etc/wireguard/wg0.conf
wg-quick up wg0
/usr/local/bin/prometheus_wireguard_exporter &>/dev/null &
/usr/local/bin/prometheus_wireguard_exporter -n /etc/wireguard/wg0.conf &>/dev/null &
fswatch -o /tmp/wireguard/ | (while read; do update_config; done)
}

Expand Down
2 changes: 1 addition & 1 deletion hack/images/wireguard/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ set -euo pipefail
cd $(dirname $0)

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

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

0 comments on commit 830a58f

Please sign in to comment.