Skip to content

Operator 0.8 release prep#389

Open
mangelajo wants to merge 7 commits intorelease-0.8from
operator-0.8-release-prep
Open

Operator 0.8 release prep#389
mangelajo wants to merge 7 commits intorelease-0.8from
operator-0.8-release-prep

Conversation

@mangelajo
Copy link
Copy Markdown
Member

@mangelajo mangelajo commented Mar 26, 2026

This is preparing for the release to community / and community prod operator catalogs, includes some changes to make future releases easier to perform.

Some of the commits here are also cherry-picked into main via #390

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
Bump VERSION to 0.8.1, set controller/router image defaults to
jumpstarter-controller:0.8.1, drop v-prefix from BUNDLE_IMG and
CATALOG_IMG tags to match the actual registry convention.

Made-with: Cursor
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 26, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: a9705389-1d97-4e8f-859e-92e1abbd7f98

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • ✅ Review completed - (🔄 Check again to review again)
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch operator-0.8-release-prep

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

…v0.21

ENVTEST_K8S_VERSION was 1.30.0 and ENVTEST_VERSION was release-0.18,
but go.mod uses controller-runtime v0.21.0 (k8s.io/api v0.33.0).
The old setup-envtest could not fetch binaries, producing an empty
KUBEBUILDER_ASSETS and failing CI with "etcd not found in $PATH".

Made-with: Cursor
Since v0.8.1-rc.1 was already published to the alpha channel, v0.8.1 must
replace it (not v0.8.0) to avoid "multiple channel heads" in the OLM graph.

Made-with: Cursor
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
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🧹 Nitpick comments (2)
controller/deploy/operator/api/v1alpha1/jumpstarter_types.go (1)

187-190: Update image-default comments to match pinned behavior.

The comments still say “latest stable version,” but the defaults are now explicitly pinned to 0.8.1. Aligning wording here avoids stale CRD descriptions downstream.

Suggested wording update
-    // If not specified, defaults to the latest stable version of the Jumpstarter router.
+    // If not specified, defaults to the operator release-pinned Jumpstarter router image.
@@
-    // If not specified, defaults to the latest stable version of the Jumpstarter controller.
+    // If not specified, defaults to the operator release-pinned Jumpstarter controller image.

Also applies to: 223-225

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@controller/deploy/operator/api/v1alpha1/jumpstarter_types.go` around lines
187 - 190, The Image field comment still says “latest stable version” but the
kubebuilder default is pinned to 0.8.1; update the doc comment above the Image
string fields (e.g., the Image field in the Jumpstarter types struct) to state
that the default is pinned to
"quay.io/jumpstarter-dev/jumpstarter-controller:0.8.1" (or say “pinned to
v0.8.1”) instead of “latest stable version”; make the same wording change for
the other Image comment occurrence in this file so CRD descriptions reflect the
pinned default.
.cursor/rules/releasing-operator.mdc (1)

110-112: Prefer --force-with-lease over -f in push examples.

Safer default for contributor workflows; prevents clobbering unexpected remote updates.

💡 Suggested doc update
-cd contribute/community-operators && git push -f user jumpstarter-operator-release-X.Y.Z
-cd ../community-operators-prod && git push -f user jumpstarter-operator-release-X.Y.Z
+cd contribute/community-operators && git push --force-with-lease user jumpstarter-operator-release-X.Y.Z
+cd ../community-operators-prod && git push --force-with-lease user jumpstarter-operator-release-X.Y.Z
🤖 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 110 - 112, Replace the
unsafe git push examples that use the short force flag by changing both
occurrences of "git push -f user jumpstarter-operator-release-X.Y.Z" to use the
safer form "git push --force-with-lease user
jumpstarter-operator-release-X.Y.Z"; update each example line in the diff and
any other similar push examples in the same file to use --force-with-lease
instead of -f.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.cursor/rules/releasing-operator.mdc:
- Around line 88-89: The verification greps are hardcoded to "quay" and should
be registry-agnostic: update the second command and/or both checks so they don't
require "quay". Replace the literal grep "default: quay" with a generic pattern
such as grep -E 'default:\s*[^[:space:]]+' or simply grep 'default:' to detect
any default image registry, and ensure the first grep continues to match image
keys (containerImage|image:) — update the commands shown (grep -E
"containerImage|image: ..." and grep "default: quay") accordingly so
IMAGE_TAG_BASE overrides are detected regardless of registry.

In `@controller/deploy/operator/Makefile`:
- Around line 326-327: The current Makefile perl replacement hardcodes the old
image literal ("quay.io/jumpstarter-dev/jumpstarter-operator:latest") which is
brittle; change the perl substitution in the Makefile so it targets the CSV's
containerImage field generically (match the YAML key "containerImage:" and
replace whatever value follows, including optional quotes/whitespace) and set
that value to $(IMG); update the existing perl command that references the
literal and bundle/manifests/jumpstarter-operator.clusterserviceversion.yaml to
use a regex like matching the containerImage line and substituting only the
right-hand value so future template-image changes don't silently skip
replacement.

In `@controller/hack/deploy_vars`:
- Line 9: The current assignment for OPERATOR_IMG silently falls back to
quay.io/...:latest when the make command fails; change it to fail-fast by
removing the echo fallback so the make failure propagates (e.g., use
OPERATOR_IMG=${OPERATOR_IMG:-$(make -C deploy/operator --no-print-directory -s
print-img)}), and ensure the calling scripts (e.g., deploy_with_operator.sh) run
with errexit (set -e) or check for a non-empty OPERATOR_IMG and exit with a
clear error message if the make command fails; reference OPERATOR_IMG, the make
-C deploy/operator --no-print-directory -s print-img invocation, and
deploy_with_operator.sh when making these changes.

---

Nitpick comments:
In @.cursor/rules/releasing-operator.mdc:
- Around line 110-112: Replace the unsafe git push examples that use the short
force flag by changing both occurrences of "git push -f user
jumpstarter-operator-release-X.Y.Z" to use the safer form "git push
--force-with-lease user jumpstarter-operator-release-X.Y.Z"; update each example
line in the diff and any other similar push examples in the same file to use
--force-with-lease instead of -f.

In `@controller/deploy/operator/api/v1alpha1/jumpstarter_types.go`:
- Around line 187-190: The Image field comment still says “latest stable
version” but the kubebuilder default is pinned to 0.8.1; update the doc comment
above the Image string fields (e.g., the Image field in the Jumpstarter types
struct) to state that the default is pinned to
"quay.io/jumpstarter-dev/jumpstarter-controller:0.8.1" (or say “pinned to
v0.8.1”) instead of “latest stable version”; make the same wording change for
the other Image comment occurrence in this file so CRD descriptions reflect the
pinned default.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: bd9a005b-156d-41b7-be8a-0b55242050ce

📥 Commits

Reviewing files that changed from the base of the PR and between b37f0c2 and 59d6d3b.

📒 Files selected for processing (10)
  • .claude/rules/releasing-operator.md
  • .cursor/rules/releasing-operator.mdc
  • CLAUDE.md
  • controller/Makefile
  • controller/deploy/operator/Makefile
  • controller/deploy/operator/api/v1alpha1/jumpstarter_types.go
  • controller/deploy/operator/config/crd/bases/operator.jumpstarter.dev_jumpstarters.yaml
  • controller/deploy/operator/config/manager/kustomization.yaml
  • controller/deploy/operator/test/e2e/e2e_test.go
  • controller/hack/deploy_vars

Comment on lines +88 to +89
grep -E "containerImage|image: quay" bundle/manifests/jumpstarter-operator.clusterserviceversion.yaml
grep "default: quay" bundle/manifests/operator.jumpstarter.dev_jumpstarters.yaml
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Make the verification grep registry-agnostic.

The current check is tied to quay and can miss valid non-Quay image references when IMAGE_TAG_BASE is overridden.

💡 Suggested doc update
-grep -E "containerImage|image: quay" bundle/manifests/jumpstarter-operator.clusterserviceversion.yaml
+grep -E "containerImage|image:" bundle/manifests/jumpstarter-operator.clusterserviceversion.yaml
🤖 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 88 - 89, The verification
greps are hardcoded to "quay" and should be registry-agnostic: update the second
command and/or both checks so they don't require "quay". Replace the literal
grep "default: quay" with a generic pattern such as grep -E
'default:\s*[^[:space:]]+' or simply grep 'default:' to detect any default image
registry, and ensure the first grep continues to match image keys
(containerImage|image:) — update the commands shown (grep -E
"containerImage|image: ..." and grep "default: quay") accordingly so
IMAGE_TAG_BASE overrides are detected regardless of registry.

Comment on lines +326 to +327
@# Align CSV containerImage annotation with the manager image (base CSV still references :latest)
@perl -pi -e 's|quay.io/jumpstarter-dev/jumpstarter-operator:latest|$(IMG)|g' bundle/manifests/jumpstarter-operator.clusterserviceversion.yaml
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

CSV containerImage rewrite is too brittle due to hardcoded source literal.

This only replaces one exact old value. If the template image string changes, the step can silently no-op and leave incorrect containerImage metadata in bundles.

🔧 Suggested robust replacement
-	@# Align CSV containerImage annotation with the manager image (base CSV still references :latest)
-	`@perl` -pi -e 's|quay.io/jumpstarter-dev/jumpstarter-operator:latest|$(IMG)|g' bundle/manifests/jumpstarter-operator.clusterserviceversion.yaml
+	@# Align CSV containerImage annotation with the manager image, regardless of previous value
+	`@perl` -pi -e 's|^(\s*containerImage:\s*).*$|$1$(IMG)|' bundle/manifests/jumpstarter-operator.clusterserviceversion.yaml
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
@# Align CSV containerImage annotation with the manager image (base CSV still references :latest)
@perl -pi -e 's|quay.io/jumpstarter-dev/jumpstarter-operator:latest|$(IMG)|g' bundle/manifests/jumpstarter-operator.clusterserviceversion.yaml
@# Align CSV containerImage annotation with the manager image, regardless of previous value
`@perl` -pi -e 's|^(\s*containerImage:\s*).*$|$1$(IMG)|' bundle/manifests/jumpstarter-operator.clusterserviceversion.yaml
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@controller/deploy/operator/Makefile` around lines 326 - 327, The current
Makefile perl replacement hardcodes the old image literal
("quay.io/jumpstarter-dev/jumpstarter-operator:latest") which is brittle; change
the perl substitution in the Makefile so it targets the CSV's containerImage
field generically (match the YAML key "containerImage:" and replace whatever
value follows, including optional quotes/whitespace) and set that value to
$(IMG); update the existing perl command that references the literal and
bundle/manifests/jumpstarter-operator.clusterserviceversion.yaml to use a regex
like matching the containerImage line and substituting only the right-hand value
so future template-image changes don't silently skip replacement.

BASEDOMAIN="jumpstarter.${IP}.nip.io"
IMG=${IMG:-quay.io/jumpstarter-dev/jumpstarter-controller:latest}
OPERATOR_IMG=${OPERATOR_IMG:-quay.io/jumpstarter-dev/jumpstarter-operator:latest}
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")}
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot Mar 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "Current OPERATOR_IMG resolution:"
rg -n 'OPERATOR_IMG=' controller/hack/deploy_vars

echo
echo "Checking whether print-img target exists in operator Makefile:"
rg -n '(^\.PHONY:\s*print-img\b|^print-img:)' controller/deploy/operator/Makefile -C 2

Repository: jumpstarter-dev/jumpstarter

Length of output: 412


🏁 Script executed:

# Check if deploy_with_operator.sh and deploy_with_helm.sh exist and use OPERATOR_IMG
find controller -type f -name "deploy_with*.sh" 2>/dev/null

# Check how OPERATOR_IMG is used in those files
for file in controller/hack/deploy_with_operator.sh controller/hack/deploy_with_helm.sh; do
  if [ -f "$file" ]; then
    echo "=== $file ==="
    rg -n 'OPERATOR_IMG' "$file" -B 2 -A 2
  fi
done

# Check if there are any environment variables or setup required for make
echo "=== Checking Makefile dependencies ==="
rg -n 'IMG\s*=' controller/deploy/operator/Makefile | head -20

Repository: jumpstarter-dev/jumpstarter

Length of output: 1015


🏁 Script executed:

# Get the full IMG definition from the operator Makefile
rg -n '^IMG\s*=' controller/deploy/operator/Makefile -A 5

# Check if there are any prerequisites or dependencies for make to work
rg -n '^(IMG|REGISTRY|IMAGE_TAG)' controller/deploy/operator/Makefile | head -30

# Verify the structure around print-img to understand what could fail
sed -n '95,110p' controller/deploy/operator/Makefile

Repository: jumpstarter-dev/jumpstarter

Length of output: 663


🏁 Script executed:

# Find where VERSION is defined in the operator Makefile
rg -n '^VERSION\s*' controller/deploy/operator/Makefile

# Check if VERSION might be environment-dependent
head -100 controller/deploy/operator/Makefile | rg -n 'VERSION|IMG'

Repository: jumpstarter-dev/jumpstarter

Length of output: 1199


Avoid silent fallback to :latest for OPERATOR_IMG.

The make ... print-img command can fail for various reasons (missing dependencies, environment issues, make errors), and silently falling back to :latest masks these failures. This undermines release reproducibility and can quietly deploy the wrong operator image, particularly problematic when used by deploy_with_operator.sh to load images into the kind cluster.

Prefer fail-fast behavior instead:

Suggested fix
-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")}
+if [ -z "${OPERATOR_IMG:-}" ]; then
+    OPERATOR_IMG="$(make -C deploy/operator --no-print-directory -s print-img)"
+fi
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
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")}
if [ -z "${OPERATOR_IMG:-}" ]; then
OPERATOR_IMG="$(make -C deploy/operator --no-print-directory -s print-img)"
fi
🤖 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 current assignment for
OPERATOR_IMG silently falls back to quay.io/...:latest when the make command
fails; change it to fail-fast by removing the echo fallback so the make failure
propagates (e.g., use OPERATOR_IMG=${OPERATOR_IMG:-$(make -C deploy/operator
--no-print-directory -s print-img)}), and ensure the calling scripts (e.g.,
deploy_with_operator.sh) run with errexit (set -e) or check for a non-empty
OPERATOR_IMG and exit with a clear error message if the make command fails;
reference OPERATOR_IMG, the make -C deploy/operator --no-print-directory -s
print-img invocation, and deploy_with_operator.sh when making these changes.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 on this one, I think it's worth to log a warning in this case.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bkhizgiy, agreed — a warning on fallback is a good middle ground between fail-fast and silent degradation. Here's a revised suggestion that logs a warning to stderr when the make invocation fails:

if [ -z "${OPERATOR_IMG:-}" ]; then
    if ! OPERATOR_IMG="$(make -C deploy/operator --no-print-directory -s print-img 2>/dev/null)"; then
        echo "WARNING: Failed to determine OPERATOR_IMG via 'make print-img', falling back to quay.io/jumpstarter-dev/jumpstarter-operator:latest" >&2
        OPERATOR_IMG="quay.io/jumpstarter-dev/jumpstarter-operator:latest"
    fi
fi

This way:

  • If make print-img succeeds, OPERATOR_IMG is set to the computed value (e.g., quay.io/jumpstarter-dev/jumpstarter-operator:0.8.1).
  • If it fails (e.g., missing dependencies, wrong working directory), a visible warning is printed and the fallback kicks in — so callers at least know something went wrong rather than silently using :latest.

🧠 Learnings used
Learnt from: CR
Repo: jumpstarter-dev/jumpstarter PR: 0
File: .cursor/rules/working-with-operator.mdc:0-0
Timestamp: 2026-02-04T16:26:09.815Z
Learning: Applies to controller/deploy/operator/api/v1alpha1/jumpstarter_types.go : When modifying CRD type definitions in jumpstarter_types.go, regenerate code by running 'make manifests generate' from controller/deploy/operator directory

Learnt from: CR
Repo: jumpstarter-dev/jumpstarter PR: 0
File: .cursor/rules/working-with-operator.mdc:0-0
Timestamp: 2026-02-04T16:26:09.815Z
Learning: Applies to controller/deploy/operator/api/v1alpha1/*.go : Check kubebuilder marker constraints, default value validity, and run 'make manifests' after type changes to resolve CRD validation errors

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants