FairwindsOps / rbac-manager

A Kubernetes operator that simplifies the management of Role Bindings and Service Accounts.
https://fairwinds.com
Apache License 2.0
1.46k stars 117 forks source link

no matches for kind "RBACDefinition" in version "rbacmanager.reactiveops.io/v1beta1" #452

Closed jacsovalentin closed 4 months ago

jacsovalentin commented 6 months ago

What happened?

I deployed it from repository, the pod is running, but when I try to create an RBACDefinition I get this error message:

error: resource mapping not found for name: "my-sa-definition" namespace: "" from "my-rbac-definition.yaml": no matches for kind "RBACDefinition" in version "rbacmanager.reactiveops.io/v1beta1"
ensure CRDs are installed first

I installed the CRDs

$ kubectl get crd
NAME                                                  CREATED AT
...
rbacdefinitions.rbacmanager.reactiveops.io            2024-02-12T12:02:54Z
...

This is my definition file:

apiVersion: rbacmanager.reactiveops.io/v1beta1
kind: RBACDefinition
metadata:
  name: my-sa-definition
rbacBindings:
  - name: my-sa
    subjects:
      - kind: ServiceAccount
        name: my-sa
        namespace: k8s-users
    roleBindings:
      - clusterRole: view
        namespaceSelector:
          matchLabels:
            type: read-only
      - clusterRole: admin
        namespaceSelector:
          matchLabels:
            type: writable

What did you expect to happen?

The user and the rolebindings were created.

How can we reproduce this?

Deply version 1.8.0 from repository. K8S version: v1.28.2

Version

1.8.0

Search

Code of Conduct

Additional context

No response