Skip to content

RavenDB-26535 Kubernetes Operator: Release Process#31

Merged
poissoncorp merged 3 commits into
mainfrom
RavenDB-26535
May 11, 2026
Merged

RavenDB-26535 Kubernetes Operator: Release Process#31
poissoncorp merged 3 commits into
mainfrom
RavenDB-26535

Conversation

@poissoncorp
Copy link
Copy Markdown
Contributor

@poissoncorp poissoncorp commented May 5, 2026

This PR brings up the operator's CD. Click Prepare Release in the Actions tab, merge the auto-generated PR, and it ships a multi-arch image, GitHub Release, and OLM bundle. The flow is complex and error-prone (mostly OLM - every new field needs tags), so plenty of room for manual mistakes - that's why I picked to go for a standardized process & CD automation.

How the pipeline fits together

Workflow / Skill When it runs What it does
pre-release-report skill Run by user (via AI agent) before triggering a release Checks every Go field has the right OLM annotation, sample CRs still parse, writes a pre-release report.
release-artifacts-ci.yml Tests for PRs affecting CD Builds the bundle, installs it into a kind cluster the same way OperatorHub would (catalog → Subscription → CSV), waits until the operator pod comes up healthy, and apply-validates the sample CRs. Catches "the bundle is broken" on the PR that breaks it.
prepare-release.yml Manual clickable job Bumps versions everywhere, regenerates the OLM bundle, packages the helm chart, opens a PR labeled release:auto.
release.yml Fires after merge of a release:auto PR Verifies DockerHub login and GitHub-token permissions up front, builds the image, tests it on kind, then pushes multi-arch, tags vX.Y.Z, drafts a Release.

How the OLM bundle is built

The bundle is generated from the Go types in api/v1/. Each field carries +operator-sdk:csv:... annotations; operator-sdk reads those plus the operator-level metadata in config/manifests/bases/...csv.yaml (description, icon, keywords, links, maintainers, minKubeVersion) and emits the CSV.

  • Adding a new field? Add the annotation. The skill checks you didn't miss any.
  • Operator-level metadata? Edit the base file. operator-sdk preserves it across regeneration.
  • make release-bundle runs the full pipeline (operator-sdk generate → relocate into the nested per-version layout → post-process the CSV for OperatorHub conventions).
  • make bundle and make build-installer clean up after themselves on exit (revert the kustomize image-tag rewrite), so you can run them locally without dirtying your working tree.
  • We lose descriptions, not sure if it's a big deal (cc @TheGoldenPlatypus).

How we know it works

Three layers of confidence, before anything ships:

  • At every PR (release-artifacts-ci.yml): the bundle pipeline runs end-to-end against the real Makefile version, including a kind-based OLM install - the same path an OperatorHub user takes.
  • At every release (release.yml): a 30-second pre-flight checks DockerHub and GitHub credentials before any expensive build. A kind smoke installs the released install.yaml. Push, tag, and Release happen only after smoke passes.
  • Before opening the release PR (make verify-samples): strict-unmarshals every sample CR against the current Go types. Catches stale samples after a CRD field rename. Lives in test/samples/; no envtest required.

Fixes to things broken on main

  • config/samples/kustomization.yaml referenced a non-existent file (v1 migration leftover).
  • bundle-build had a broken docker context.
  • Committed 1.0.0 CSV regenerated from markers + base; channels alphastable.

Releasing in 7 steps

  1. Run the pre-release-report skill.
  2. Open, review, and merge the PR with the skill's commits.
  3. Trigger prepare-release from the Actions tab with the target version.
  4. Review the auto-generated PR.
  5. Merge it with the release:auto label still attached → release.yml auto-fires (tests, pushes the image, tags, drafts the Release).
  6. Open the OperatorHub PR: copy bundle/ravendb-operator/<version>/ → fork's operators/ravendb-operator/<version>/. Copy bundle/ravendb-operator/ci.yaml if it changed.
  7. Draft the GitHub announcement request (template WIP).

Good foundation for future releases.

@poissoncorp poissoncorp force-pushed the RavenDB-26535 branch 2 times, most recently from c690ad9 to a166ab8 Compare May 6, 2026 18:43
@poissoncorp
Copy link
Copy Markdown
Contributor Author

@TheGoldenPlatypus i'd say it's ready to review. Fixed the description by hand, so it's actually useful. Enjoy & ask me anything! :)

Comment thread Makefile
build-installer: manifests generate kustomize ## Generate a consolidated YAML with CRDs and deployment.
mkdir -p dist
cd config/manager && $(KUSTOMIZE) edit set image controller=${IMG}
@trap 'git checkout -- config/manager/kustomization.yaml 2>/dev/null || true' EXIT; \
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.

smart

Comment thread CLAUDE.md
@@ -0,0 +1,67 @@
# RavenDB Operator — Claude context
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.

love it, I also have mega one locally. might merge both into one in the future

Comment thread .github/kind-config.yaml
# Enable per-host containerd registry config via /etc/containerd/certs.d.
# We populate certs.d/localhost:5000/hosts.toml after cluster startup so pulls of
# `localhost:5000/...` redirect to http://kind-registry:5000 (the registry container
# attached to the kind Docker network). Standard kind+local-registry pattern:
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.

nice - our very own local registery

@poissoncorp poissoncorp merged commit c001d21 into main May 11, 2026
10 checks passed
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