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

cannot use $patch: delete for machine patches #876

Open
clementnuss opened this issue Mar 3, 2025 · 1 comment
Open

cannot use $patch: delete for machine patches #876

clementnuss opened this issue Mar 3, 2025 · 1 comment

Comments

@clementnuss
Copy link

hi,

I'm trying to remove the exclude-from-load-balancer label from my control-plane nodes, but am getting an error:

patch:

controlPlane:
  patches:
    - |-
      machine:
        nodeLabels:
          node.kubernetes.io/exclude-from-external-load-balancers:
            $patch: delete

error:

2025/03/03 07:01:06 failed to parse config file: failed to substitute env: variable ${patch} not set

is there any way to add a skipEnvSubst arg somehow ?

@budimanjojo
Copy link
Owner

Hi!

You're using patches wrong. It should be something like this:

controlPlane:
  patches:
    - |-
       - op: remove
         path: /machine/nodeLabels/node.kubernetes.io~1exclude-from-external-load-balancers
         value: the-value

But then, I think it's not there by default so it means you added it, why not just don't add it? Sorry if I misunderstood you, I'm really confused here.

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