kubeguard / guard

🔑 Kubernetes Authentication & Authorization WebHook Server
https://kubeguard.dev
Apache License 2.0
593 stars 81 forks source link

Update RBAC API version #369

Closed dvob closed 1 year ago

dvob commented 1 year ago

Update RABC API version because rbac.authorization.k8s.io/v1beta1 got removed in Kubernetes 1.22 (https://kubernetes.io/docs/reference/using-api/deprecation-guide/#rbac-resources-v122).

Another question I asked my self is why this cluster role to list nodes is required at all? could possible removed entirely?

tamalsaha commented 1 year ago

Thanks, @dvob !

Another question I asked my self is why this cluster role to list nodes is required at all? could possible removed entirely?

I don't think it is needed anymore. It should be ok to remove.

dvob commented 1 year ago

@tamalsaha ok, I will update the PR accordingly to remove these two resources.

dvob commented 1 year ago

@tamalsaha I removed the cluster role, cluster role binding and the service account which were required to list the nodes. then I also removed the annotation "scheduler.alpha.kubernetes.io/critical-pod" which is no longer used in kubernetes clusters 1.16+ and added the priorityClassName field instead.