Skip to content

Commit

Permalink
- Separated the rbac from crd generation so that unnecesary roles
Browse files Browse the repository at this point in the history
   are not given to nimbus-operator
  • Loading branch information
shivaccuknox committed Jul 5, 2024
1 parent 1ff7f80 commit a67d273
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 40 deletions.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ help: ## Display this help.

.PHONY: manifests
manifests: controller-gen ## Generate WebhookConfiguration, ClusterRole and CustomResourceDefinition objects.
$(CONTROLLER_GEN) rbac:roleName=nimbus-operator crd webhook paths="./..." output:crd:artifacts:config=config/crd/bases
$(CONTROLLER_GEN) rbac:roleName=nimbus-operator webhook paths="./internal/..."
$(CONTROLLER_GEN) crd paths="./api/..." output:crd:artifacts:config=config/crd/bases

.PHONY: generate
generate: controller-gen ## Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations.
Expand Down
39 changes: 0 additions & 39 deletions config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,35 +4,6 @@ kind: ClusterRole
metadata:
name: nimbus-operator
rules:
- apiGroups:
- ""
resources:
- configmaps
- namespaces
- serviceaccounts
verbs:
- create
- delete
- get
- update
- apiGroups:
- ""
resources:
- services
verbs:
- get
- list
- apiGroups:
- batch
resources:
- cronjobs
verbs:
- create
- delete
- get
- list
- update
- watch
- apiGroups:
- ""
resources:
Expand Down Expand Up @@ -141,13 +112,3 @@ rules:
- get
- patch
- update
- apiGroups:
- rbac.authorization.k8s.io
resources:
- clusterrolebindings
- clusterroles
verbs:
- create
- delete
- get
- update

0 comments on commit a67d273

Please sign in to comment.