feat: patch kuadrant operator image via KUADRANT_OPERATOR_IMAGE#1009
feat: patch kuadrant operator image via KUADRANT_OPERATOR_IMAGE#1009crstrn13 wants to merge 1 commit into
Conversation
Signed-off-by: Alexander Cristurean <acristur@redhat.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe Kuadrant operator deploy flow now runs a new patch target after installation. That target conditionally updates the controller manager image from ChangesKuadrant operator image patching
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
| $(MAKE) patch-kuadrant-operator-env | ||
| @echo "Kuadrant Operator $(KUADRANT_OPERATOR_VERSION) installed from Helm" | ||
| endif | ||
| $(MAKE) patch-kuadrant-operator-image |
There was a problem hiding this comment.
You think setting a custom kuadrant-operator image could be useful to expose for configuration in the Kuadrant's helm chart values yaml? Here, I suppose, we just use custom images for testing, but could it be also useful for other Kuadrant users?
There was a problem hiding this comment.
Good point, don't think a regular user should want to do this. The main reason I added this is because you can no longer change the wasm-shim image easily, since it is embedded in the kuadrant operator for now. But our releases should be the only versions a regular user should care about. Does that answer your question?
| kubectl set image deployment/kuadrant-operator-controller-manager \ | ||
| -n $(KUADRANT_NAMESPACE) \ | ||
| manager=$(KUADRANT_OPERATOR_IMAGE) | ||
| kubectl -n $(KUADRANT_NAMESPACE) rollout status deployment/kuadrant-operator-controller-manager --timeout=$(KUBECTL_TIMEOUT) |
There was a problem hiding this comment.
Would this stop the make target execution if fails?
There was a problem hiding this comment.
yes, the rollout would fail on timeout if the pod isn't able to start. Maybe it isn't able to pull the image or stuff like that.
azgabur
left a comment
There was a problem hiding this comment.
What is the advantage for patching kuadrant opeator image instead of deploying the needed version from released catalogSource? I can see only disadvantage of disconnecting operator version mentioned in catalogSource used for helm install and actual used kuadrant operator image. Such patch can be very hidden on long running cluster.
Why is this needed?
Patching relatedImages field in Subscription would be more persitent as well.
Summary
KUADRANT_OPERATOR_IMAGEvariable (defined but unused invars.mk) to actually patch the operator deployment imagepatch-kuadrant-operator-imagetarget that useskubectl set imageto swap the manager container image when the variable is setUsage
Or standalone on an existing cluster:
Test plan
make local-setupwithoutKUADRANT_OPERATOR_IMAGE— operator deploys as before, skip message printedmake local-setupwithKUADRANT_OPERATOR_IMAGE=<custom-image>— operator image is patched after deploymentmake patch-kuadrant-operator-imagestandalone on an existing cluster with the variable set🤖 Generated with Claude Code
Summary by CodeRabbit