nirmata / kube-static-egress-ip

Kubernetes CRD to manage static egress IP addresses for workloads
Apache License 2.0
214 stars 38 forks source link

Update apiVersion for k8s version > 1.22 #59

Open JuanRoss opened 2 years ago

JuanRoss commented 2 years ago

According to kubernetes documentation:

The rbac.authorization.k8s.io/v1beta1 API version of ClusterRole, ClusterRoleBinding, Role, and RoleBinding is no longer served as of v1.22.

Migrate manifests and API clients to use the rbac.authorization.k8s.io/v1 API version, available since v1.8.
All existing persisted objects are accessible via the new APIs
No notable changes

With version v1beta1, using kubernetes v1.22, the RBAC creation throws the following message:

resource mapping not found for name: "static-egressip-controller" namespace: "kube-system" from "https://raw.githubusercontent.com/nirmata/kube-static-egress-ip/master/config/static-egressip-rbac.yaml": no matches for kind "ClusterRole" in version "rbac.authorization.k8s.io/v1beta1" ensure CRDs are installed first resource mapping not found for name: "static-egressip-controller" namespace: "" from "https://raw.githubusercontent.com/nirmata/kube-static-egress-ip/master/config/static-egressip-rbac.yaml": no matches for kind "ClusterRoleBinding" in version "rbac.authorization.k8s.io/v1beta1" ensure CRDs are installed first