// +kubebuilder:rbac
Generates ClusterRole with name "manager-role", How to change this name ?.
#2297
-
Hi , // +kubebuilder:rbac:groups=apps,resources=deployments,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=apps,resources=replicasets,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=core,resources=pods,verbs=get;list;watch;create;
// +kubebuilder:rbac:groups=core,resources=services,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=core,resources=configmaps,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=core,resources=serviceaccounts,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=core,resources=configmaps,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=core,resources=replicasets,verbs=get;list;watch;create;update;patch;delete Kubebuilder generated ClusterRole For example, Below the ClusterRole got generated ---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
creationTimestamp: null
name: manager-role
rules:
- apiGroups:
- apps
resources:
- deployments
verbs:
- create
- delete
- get
- list
- patch
- update
- watch My question is, How to change |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
Hi Please let me know if you have found anything on this, im also facing this issue. |
Beta Was this translation helpful? Give feedback.
-
I was looking into this, and this is not controlled by the markers but by the Makefile template . |
Beta Was this translation helpful? Give feedback.
-
The permissions are generate according to the markers defined in the controller Those will be generate via controller-gen when you run make manifests and make generate Please note that go/v2, and go/v3 layouts are deprecated and no longer used. So, you can look the Makefile of the example ALso, I would recommend you upgrade your project to use the latest layout available. Closing this one as answered as well |
Beta Was this translation helpful? Give feedback.
Hi!
role.yaml
file is generated through the marker:If you add
namespace=xxxxx
to the marker:The role.yaml file is generated in Role format.
You can check the documentation in here