Skip to content

Add Helm chart and GH Action to publish it as an OCI artifact to GHCR - #4

Merged
colinjlacy merged 2 commits into
runtimeconditions:mainfrom
itvi-1234:add-helm-chart-oci-publish
Sep 15, 2026
Merged

colinjlacy merged 2 commits into
runtimeconditions:mainfrom
itvi-1234:add-helm-chart-oci-publish

Conversation

@itvi-1234

@itvi-1234 itvi-1234 commented Sep 13, 2026 •

Copy link
Copy Markdown
Member

Minimal chart wrapping the CRD.

  • charts/runtime-conditions-crd/ - CRD lives under crds/ (Helm's special directory for CRDs: installed before templates, not templated). Also carries the same admin/editor/viewer convenience ClusterRoles as config/rbac/, gated behind rbac.create (default true).
  • make manifests now also copies the generated CRD into the chart's crds/ dir, so it can't silently drift from config/crd/bases.
  • .github/workflows/helm-publish.yml packages the chart and pushes it to oci://ghcr.io/runtimeconditions/charts on push to main (when charts/ changes) or manual dispatch.

Verified with helm lint, helm template --include-crds, and helm package locally.

Signed-off-by: itvi-1234 <rjsumit71@gmail.com>
@itvi-1234
itvi-1234 force-pushed the add-helm-chart-oci-publish branch from ae6ee09 to 454331a Compare September 13, 2026 17:31

@colinjlacy colinjlacy left a comment

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.

Really awesome! I've never done this, so it's cool to see it come together! Just a minor change to help us maintain this going forward, and then we can merge.

metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.21.0
controller-gen.kubebuilder.io/version: v0.20.1

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.

Curious why these went down in version number. Not a problem if it's necessary, just not something you usually see.

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.

It looks like we're duplicating this file, which is likely to introduce drift. Could we instead copy the original as part of the CI pipeline? The Chart.yaml can stay, an we can have a CI job that copies the raw Kubernetes file into the the right folder before the build. That way we only have one version of this file to maintain.

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.

Same with this file, see above comment.

…pies

Signed-off-by: itvi-1234 <rjsumit71@gmail.com>

@colinjlacy colinjlacy left a comment

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.

I'm still unclear as to why the dependencies went down a minor version, but that's not really a big deal. Worst that happens is we bump it back up later.

Nicely done!!!

Comment thread Makefile
manifests: controller-gen ## Generate the CustomResourceDefinition.
"$(CONTROLLER_GEN)" crd paths="./..." output:crd:artifacts:config=config/crd/bases

.PHONY: helm-chart

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.

Rockstar 🥳

@colinjlacy
colinjlacy merged commit fc67537 into runtimeconditions:main Sep 15, 2026
2 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