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

Helm chart: Quote wireguard psk to fix config errors #1826

Merged
merged 1 commit into from Nov 23, 2023

Conversation

koskev
Copy link
Contributor

@koskev koskev commented Nov 17, 2023

Description

When using the helm chart with a wireguard psk, the value is not quoted inside net-conf.json.
This results in the SubnetManager config parse to fail.

Steps to reproduce

kubectl create ns kube-flannel
kubectl label --overwrite ns kube-flannel pod-security.kubernetes.io/enforce=privileged
helm repo add flannel https://flannel-io.github.io/flannel/
helm repo update
helm install flannel --set podCidr="10.244.0.0/16" --set flannel.backend="wireguard" --set flannel.psk="SQrrIYA1R4A/zlTkJXP3WWE3Sk+20YJ7w946IGQto/o=" --namespace kube-flannel flannel/flannel

kubectl -n kube-flannel logs pods/kube-flannel-ds-l28qk

[..]
Failed to create SubnetManager: error parsing subnet config: invalid character 'S' after object key:value pair

The resulting config is

[..]
  net-conf.json: |
    {
      "Network": "10.244.0.0/16",
      "Backend": {
        "PSK": SQrrIYA1R4A/zlTkJXP3WWE3Sk+20YJ7w946IGQto/o=,
        "Type": "wireguard"
      }
    }

Quoting the value fixes this issue.

Release Note

None required

@thomasferrandiz thomasferrandiz merged commit 0373f88 into flannel-io:master Nov 23, 2023
8 checks passed
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.

None yet

2 participants