Skip to content

Commit

Permalink
Make API server clusterrole name more unique
Browse files Browse the repository at this point in the history
  • Loading branch information
glrf committed Jan 10, 2022
1 parent cdde5ec commit 46d94bc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ generate: ## Generate manifests e.g. CRD, RBAC etc.
# Generate code
go run sigs.k8s.io/controller-tools/cmd/controller-gen object paths="./..."
# Generate CRDs
go run sigs.k8s.io/controller-tools/cmd/controller-gen rbac:roleName=control-api webhook paths="./..." output:crd:artifacts:config=$(CRD_ROOT_DIR)/v1/base crd:crdVersions=v1
go run sigs.k8s.io/controller-tools/cmd/controller-gen rbac:roleName=control-api-apiserver webhook paths="./..." output:crd:artifacts:config=$(CRD_ROOT_DIR)/v1/base crd:crdVersions=v1

.PHONY: crd
crd: generate ## Generate CRD to file
Expand Down
2 changes: 1 addition & 1 deletion config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
creationTimestamp: null
name: control-api
name: control-api-apiserver
rules:
- apiGroups:
- ""
Expand Down
4 changes: 2 additions & 2 deletions config/rbac/role_binding.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: control-api
name: control-api-apiserver
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: control-api
name: control-api-apiserver
subjects:
- kind: ServiceAccount
name: control-api
Expand Down

0 comments on commit 46d94bc

Please sign in to comment.