Unable to (re)generate roles.yaml
using RBAC markers
#6716
Labels
language/go
Issue is related to a Go operator project
triage/needs-information
Indicates an issue needs more information in order to work on it.
triage/support
Indicates an issue that is a support question.
Milestone
Type of question
General operator-related help
Question
What did you do?
I'm attempting to migrate an existing (working) v3 Operator to v4 using Migration from go/v3 to go/v4
What did you expect to see?
The Operator worked outside a cluster. After Deployment to a cluster, I received a bunch of role errors and noticed that the
role.yaml
file was basic (unchanged):role.yaml
:I have 4 controllers and each has
kubebuilder:rbac
annotations|markers, e.g.:check_controller.go
// +kubebuilder:rbac:groups=ack.al,resources=checks,verbs=get;list;watch;create;update;patch;delete
Curiously, when I:
make manifests
per Generate CRD Manifests; or+
make generate
per Generate Code & Artifacts in Kubebuilder, the file remains unchanged.Moreover (!) if I rename
role.yaml
and run either of the above commands, norole.yaml
is (re)created.And:
What did you see instead? Under which circumstances?
I expected
role.yaml
to be (re)generatedI checked the earlier (v3) Operator and it contains
rules
entries for each CRD for{resource}
,{resource}/finalizers
and{resource}/status
.I've manually edited
role.yaml
withapiGroups
,resources
andverbs
for the CRDs and the Operator WAI.Environment
Operator type:
/language go
Kubernetes cluster type:
GKE
$ operator-sdk version
operator-sdk version: "v1.34.1", commit: "edaed1e5057db0349568e0b02df3743051b54e68", kubernetes version: "1.28.0", go version: "go1.21.7", GOOS: "linux", GOARCH: "amd64"
$ go version
(if language is Go)go version go1.22.0 linux/amd64
$ kubectl version
Client Version: v1.29.3
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
Server Version: v1.29.3-gke.1093000
Additional context
The text was updated successfully, but these errors were encountered: