Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to add any new clients in recent versions (2.0+) #148

Open
xamindar opened this issue Mar 24, 2024 · 6 comments
Open

Unable to add any new clients in recent versions (2.0+) #148

xamindar opened this issue Mar 24, 2024 · 6 comments

Comments

@xamindar
Copy link

xamindar commented Mar 24, 2024

Describe the bug
New clients fail to install and work. Example client yaml:
$ cat client-test.yaml

apiVersion: vpn.example.com/v1alpha1
kind: WireguardPeer
metadata:
  name: test
  namespace: radnimax-vpn
spec:
  wireguardRef: "radnimax-vpn"

To Reproduce
Steps to reproduce the behavior:

  1. apply new client yaml: kubectl apply -f client-test.yaml
  2. run command to get peer information: kubectl -n radnimax-vpn get wireguardpeer test --template={{.status.config}} | bash
  3. Note the following error is returned instead of the peer configuration:
bash: line 1: syntax error near unexpected token `newline'
bash: line 1: `<no value>'
Note: without piping to bash, the return is simply "<no value>"

Expected behavior
Should receive proper config info, which still happens with the existing clients already set up.

Additional context
Existing client configs are able to be retrieved. It is only any new ones that are added now, that are not able to be retrieved.

@xamindar xamindar changed the title Unable to add any new cients in recent versions (2.0+) Unable to add any new clients in recent versions (2.0+) Mar 25, 2024
@xamindar
Copy link
Author

This is still a problem on v2.0.26.

@jodevsa
Copy link
Owner

jodevsa commented Apr 16, 2024

Hello,

What does kubectl -n radnimax-vpn get wireguardpeer test --template={{.status.config}} return?

@xamindar
Copy link
Author

Hello,

What does kubectl -n radnimax-vpn get wireguardpeer test --template={{.status.config}} return?

It just returns no value:

$ kubectl -n radnimax-vpn get wireguardpeer test --template={{.status.config}}

@jodevsa
Copy link
Owner

jodevsa commented Apr 20, 2024

what about kubectl -n radnimax-vpn describe wireguardpeer test

@xamindar
Copy link
Author

xamindar commented May 10, 2024

what about kubectl -n radnimax-vpn describe wireguardpeer test

Sorry for the delay, been busy. Here is the result:

[xamindar@hp2530p-xam wireguard-operator]$ kubectl -n radnimax-vpn describe wireguardpeer test Name: test Namespace: radnimax-vpn Labels: <none> Annotations: <none> API Version: vpn.example.com/v1alpha1 Kind: WireguardPeer Metadata: Creation Timestamp: 2024-04-20T06:31:52Z Generation: 1 Resource Version: 381408287 UID: 4f9de045-988d-493c-aad8-a5de4861aae7 Spec: Wireguard Ref: radnimax-vpn Events: <none> [xamindar@hp2530p-xam wireguard-operator]$

I have some time to troubleshoot it now but I think I will just blow it away and redeploy it at this point.

@xamindar
Copy link
Author

xamindar commented May 11, 2024

Alright, so I removed it and my vpn "server/client" configs and redeployed. Now it isn't working at all. Applied release v2.0.30, then my server config in its own namespace just as I originally did. The only difference is updating the apiVersion to vpn.wireguard-operator.io/v1alpha1 as it's now listed on the readme page.

Now when I apply the client config, I just get nothing:

[xamindar@hp2530p-xam wireguard-operator]$ cat client-test.yaml
apiVersion: vpn.wireguard-operator.io/v1alpha1
kind: WireguardPeer
metadata:
name: test
namespace: radnimax-vpn
spec:
wireguardRef: "radnimax-vpn"
[xamindar@hp2530p-xam wireguard-operator]$ kubectl apply -f client-test.yaml
wireguardpeer.vpn.wireguard-operator.io/test created
[xamindar@hp2530p-xam wireguard-operator]$ kubectl -n radnimax-vpn get wireguardpeer test --template={{.status.config}}
Error from server (NotFound): the server could not find the requested resource (get wireguardpeers.vpn.example.com test)
[xamindar@hp2530p-xam wireguard-operator]$

EDIT: nevermind, it is working now. Just took a little while.

One thing I noticed before I wiped it all out was it appears upgrading versions doesn't remove old CRDs so maybe that was the problem. I took them all out before I reinstalled everything:
wireguardpeers.vpn.example.com 2023-01-23T05:05:23Z
wireguardpeers.vpn.wireguard-operator.io 2024-05-10T22:41:07Z
wireguards.vpn.example.com 2023-01-23T05:05:23Z
wireguards.vpn.wireguard-operator.io 2024-05-10T22:41:07Z

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

No branches or pull requests

2 participants