Import some of the operator-related release improvements to main#390
Import some of the operator-related release improvements to main#390
Conversation
Use IMAGE_TAG_BASE instead of 'controller' in kustomize edit set image so the image name actually matches what manager.yaml declares. Fix the kustomization.yaml image entry name to match the real image reference. Add a post-generation step in the bundle target to align the CSV containerImage annotation with the actual IMG value. Made-with: Cursor (cherry picked from commit 93230f9)
(cherry picked from commit fcb1ac7)
(cherry picked from commit 7f5cc6d)
Add guidance on ensuring REPLACES points to the most recently published version in the channel (including release candidates) to avoid multiple channel heads in the OLM graph. Made-with: Cursor (cherry picked from commit 59d6d3b)
✅ Deploy Preview for jumpstarter-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
📝 WalkthroughWalkthroughThis PR introduces release documentation for the Kubernetes operator and refactors image tagging logic. It adds a release runbook describing versioning, bundle generation, and OLM community-operators workflow. Makefile changes standardize image defaults to use Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 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 |
There was a problem hiding this comment.
🧹 Nitpick comments (2)
.cursor/rules/releasing-operator.mdc (1)
59-60: Minor documentation clarification.The statement "The
newTagfield is updated automatically bymake bundle" may be misleading. Looking at the Makefile,kustomize edit set imageis called, which updates the kustomization.yaml in-place. However, sincebundle/is not committed (per line 94), and the kustomization.yaml changes would persist in the working tree, this could cause unexpected diffs if developers don't reset after runningmake bundle.Consider clarifying whether developers should expect and commit these kustomization.yaml changes, or if they should be reverted after bundle generation.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.cursor/rules/releasing-operator.mdc around lines 59 - 60, The doc line saying "The `newTag` field is updated automatically by `make bundle`" is ambiguous; update the text in releasing-operator.mdc to mention that `make bundle` invokes `kustomize edit set image` which mutates kustomization.yaml in-place, clarify that generated changes will remain in the working tree (since `bundle/` is not committed) and state whether developers should commit those kustomization.yaml changes or revert/reset them after running `make bundle`; reference the commands `make bundle`, `kustomize edit set image`, and the `newTag` field so readers know exactly what to expect and what action (commit vs revert) to take.controller/hack/deploy_vars (1)
9-9: Silent fallback may mask configuration issues.The
2>/dev/nullsuppression combined with the|| echofallback means if themake print-imgcommand fails (e.g., wrong working directory, missing dependencies), the script silently falls back to:latestinstead of the versioned tag (0.8.1-rc.1). This could lead to deploying an unexpected image without any indication.Consider emitting a warning when the fallback is used:
Proposed fix to warn on fallback
-OPERATOR_IMG=${OPERATOR_IMG:-$(make -C deploy/operator --no-print-directory -s print-img 2>/dev/null || echo "quay.io/jumpstarter-dev/jumpstarter-operator:latest")} +OPERATOR_IMG=${OPERATOR_IMG:-$(_img=$(make -C deploy/operator --no-print-directory -s print-img 2>/dev/null) && echo "$_img" || { echo -e "${YELLOW}Warning: Could not resolve operator image from Makefile, using :latest fallback${NC}" >&2; echo "quay.io/jumpstarter-dev/jumpstarter-operator:latest"; })}Alternatively, if this is intentional for flexibility in non-operator contexts, a code comment explaining the fallback behavior would help future maintainers.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@controller/hack/deploy_vars` at line 9, The OPERATOR_IMG assignment silently swallows errors by redirecting stderr (2>/dev/null) and falling back to a default tag via `|| echo`, which can hide misconfigurations; update the logic around OPERATOR_IMG to capture the exit status/output of `make -C deploy/operator --no-print-directory -s print-img` (or run it without redirecting stderr), and if the make command fails emit a clear warning to stderr (or to the existing logger) that the fallback `quay.io/jumpstarter-dev/jumpstarter-operator:latest` is being used, then continue with the fallback; alternatively, if silent fallback is intended, add an inline comment next to the OPERATOR_IMG assignment explaining the deliberate suppression and fallback behavior for future maintainers.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In @.cursor/rules/releasing-operator.mdc:
- Around line 59-60: The doc line saying "The `newTag` field is updated
automatically by `make bundle`" is ambiguous; update the text in
releasing-operator.mdc to mention that `make bundle` invokes `kustomize edit set
image` which mutates kustomization.yaml in-place, clarify that generated changes
will remain in the working tree (since `bundle/` is not committed) and state
whether developers should commit those kustomization.yaml changes or
revert/reset them after running `make bundle`; reference the commands `make
bundle`, `kustomize edit set image`, and the `newTag` field so readers know
exactly what to expect and what action (commit vs revert) to take.
In `@controller/hack/deploy_vars`:
- Line 9: The OPERATOR_IMG assignment silently swallows errors by redirecting
stderr (2>/dev/null) and falling back to a default tag via `|| echo`, which can
hide misconfigurations; update the logic around OPERATOR_IMG to capture the exit
status/output of `make -C deploy/operator --no-print-directory -s print-img` (or
run it without redirecting stderr), and if the make command fails emit a clear
warning to stderr (or to the existing logger) that the fallback
`quay.io/jumpstarter-dev/jumpstarter-operator:latest` is being used, then
continue with the fallback; alternatively, if silent fallback is intended, add
an inline comment next to the OPERATOR_IMG assignment explaining the deliberate
suppression and fallback behavior for future maintainers.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: a477127f-e440-401d-a977-15d493f96eae
📒 Files selected for processing (6)
.claude/rules/releasing-operator.md.cursor/rules/releasing-operator.mdcCLAUDE.mdcontroller/deploy/operator/Makefilecontroller/deploy/operator/config/manager/kustomization.yamlcontroller/hack/deploy_vars
Releasing 0.8.1 required a few changes and improvements in release-0.8, applied in #389 , this PR cherry picks those changes to main, so next time we need to release this process should be easier.
This also includes some agent instructions to help us do the operator release.