rancher / system-upgrade-controller

In your Kubernetes, upgrading your nodes
Apache License 2.0
723 stars 86 forks source link

Fix clusterrolebinding by adding a namespace to sa #313

Closed manuelbuil closed 3 months ago

manuelbuil commented 3 months ago

In custerrolebindings, serviceaccounts need to have a namespace, otherwise we get the error:

ClusterRoleBinding.rbac.authorization.k8s.io "system-upgrade-drainer" is invalid: subjects[0].namespace: Required value

This PR fixes that by adding the namespace system-upgrade, which is what that serviceAccount has: https://github.com/rancher/system-upgrade-controller/blob/v0.13.4/manifests/system-upgrade-controller.yaml#L12

brandond commented 3 months ago

See the discussion at https://github.com/rancher/system-upgrade-controller/issues/294#issuecomment-1970602865 - the lack of NS is intentional.

manuelbuil commented 3 months ago

Thanks @brandond for the heads up