diff --git a/Makefile b/Makefile index 62da5179..490871f1 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index d7c367a4..03a2a80a 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -4,7 +4,7 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: creationTimestamp: null - name: control-api + name: control-api-apiserver rules: - apiGroups: - "" diff --git a/config/rbac/role_binding.yaml b/config/rbac/role_binding.yaml index 1eda0270..f9897621 100644 --- a/config/rbac/role_binding.yaml +++ b/config/rbac/role_binding.yaml @@ -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