Skip to content

Conversation

paddyoneill
Copy link

Relates to #211

Remove the peer config from status, and reconcile to a secret. This implementation creates a secret per wireguard, and adds peer configs as keys. This allows peer configs to be retrieved using kubectl get secret/<wireguard-name>-peer-configs -o jsonpath='{.data.<peer>}'

For example

kubectl get secret/test-vpn-peer-configs -o jsonpath='{.data.my-peer}' | base64 -d
[Interface]
PrivateKey = QIqIVfDK1kZKSmAIdlMbS76zjXBhptHo3FbwxDBeuFw=
Address = 10.8.0.2
DNS = 10.96.0.10, default.svc.cluster.local

[Peer]
PublicKey = yh1ZhiucGz8Jg6NJbfMBR3s28mxBO3LGmHBuZUltegw=
AllowedIPs = 10.8.0.0/24,172.16.0.0/12
EndPoint = 172.16.0.42:51820

* Add function to write peer config to secret

Removes config from peer status object

* Fix peer status update

* Remove duplicate RBAC rules
Removing unused dependencies using go mod tidy
@jodevsa
Copy link
Collaborator

jodevsa commented Oct 24, 2024

Hi @paddyoneill, appologies for the slow response. Are you still interested in getting this merged?

@jodevsa
Copy link
Collaborator

jodevsa commented Oct 24, 2024

I'd like to merge #185 first and then I'll fix any conflicts with your branch and merge it :)

#185 is really important as the code is currently a big mess and we need a structure..

@paddyoneill
Copy link
Author

Hi @paddyoneill, appologies for the slow response. Are you still interested in getting this merged?

Hi @jodevsa, it would be good to get this merged when possible

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants