You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 3, 2025. It is now read-only.
I didn't remove it at the time because I don't know if this is deliberate, or if it can just be removed. I also wonder if the check for whether or not the link exists a second time makes sense? How could it possibly not exist if we just created it? I wonder if this function should be reworked a bit to simply call itself again after the link is created rather than getting the link multiple times.
Describe the bug
Whilst looking at the
SyncLinkfunction, I noticed there may be some duplicated code:https://github.com/jodevsa/wireguard-operator/blob/1d1bef4d0d82c0235dbfba3b665f6ebe5fb4260b/pkg/wireguard/wireguard.go#L136-L142
It looks like we already get the link and set it to up later in the function.
https://github.com/jodevsa/wireguard-operator/blob/1d1bef4d0d82c0235dbfba3b665f6ebe5fb4260b/pkg/wireguard/wireguard.go#L145-L150
https://github.com/jodevsa/wireguard-operator/blob/1d1bef4d0d82c0235dbfba3b665f6ebe5fb4260b/pkg/wireguard/wireguard.go#L167-L169
I didn't remove it at the time because I don't know if this is deliberate, or if it can just be removed. I also wonder if the check for whether or not the link exists a second time makes sense? How could it possibly not exist if we just created it? I wonder if this function should be reworked a bit to simply call itself again after the link is created rather than getting the link multiple times.
To Reproduce
N/A
Expected behavior
N/A
Screenshots
N/A
Additional context
N/A