Repository navigation
Add release-scoped RBAC and an overridable image tag - #383
Conversation
212046d to
055e1a1
Compare
2f4a1d9 to
fde2960
Compare
notandy
left a comment
There was a problem hiding this comment.
make generate >> controller-gen
../../api/v1/hypervisor_types.go:21:2: missing go.sum entry for module providing package k8s.io/apimachinery/pkg/api/resource (imported by github.com/cobaltcore-dev/openstack-hypervisor-operator/api/v1); to add:
go get github.com/cobaltcore-dev/openstack-hypervisor-operator/api/v1@v0.0.0-00010101000000-000000000000
...
Error: not all generators ran successfully
run `controller-gen crd:allowDangerousTypes=true rbac:roleName="{{ include \"openstack-hypervisor-operator.fullname\" . }}-manager-role" webhook paths=./... output:crd:artifacts:config=charts/openstack-hypervisor-operator/crds output:rbac:artifacts:config=charts/openstack-hypervisor-operator/templates -w` to see all available markers, or `controller-gen crd:allowDangerousTypes=true rbac:roleName="{{ include \"openstack-hypervisor-operator.fullname\" . }}-manager-role" webhook paths=./... output:crd:artifacts:config=charts/openstack-hypervisor-operator/crds output:rbac:artifacts:config=charts/openstack-hypervisor-operator/templates -h` for usage
make: *** [Makefile:117: generate] Error 1The Makefile installs controller-gen unpinned (@latest), so CI and machines without a preinstalled controller-gen already run v0.23.0 and "make generate" dirties the committed CRDs. Regenerate them to keep generation idempotent. Signed-off-by: Fabian Wiesel <fabian.wiesel@sap.com>
A second instance may need to run next to the production release in the same cluster. Today it cannot: both releases render the same cluster-scoped RBAC objects. A shared object blocks the second install, and one uninstall deletes it for both releases. The generator emits the release-scoped name, so "make generate" reproduces it. The production release renders the same name as before. Signed-off-by: Fabian Wiesel <fabian.wiesel@sap.com>
The chart pinned the manager image to Chart.AppVersion. A specific build could not be deployed. The tag defaults to Chart.AppVersion, so existing releases are unaffected. Signed-off-by: Fabian Wiesel <fabian.wiesel@sap.com>
fde2960 to
719b2c7
Compare
|
I tasked an LLM to reproduce it, because I can't do so on either this branch or main, with any controller-gen from v0.14 to v0.23. (Hence the rebase on a new controller version, as that was my first suspicion). It says:
It points to the relative path in your error message |
notandy
left a comment
There was a problem hiding this comment.
oh funny, yeah I had an benchmark project in the workdir that make was trying to compile, works now
A second instance of a specific build may need to run next to the production release in the same cluster. Today it cannot:
rbac:roleName, somake generatereproduces it.Chart.AppVersion, so a specific build could not be deployed.image.tagnow overrides it.The production render is unchanged (
fullnameOverride, noimage.tag): ClusterRolehypervisor-operator-manager-role, image<repository>:<AppVersion>.