Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/helm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,9 @@ jobs:
- name: Generate Helm chart
run: make helm

- name: Install Helm chart
- name: Install Helm charts
run: |
helm dependency build ./chart/bootc-operator
helm install bootc-operator ./chart/bootc-operator \
--kubeconfig $(pwd)/kubeconfig-e2e \
--create-namespace --namespace bootc-operator \
Expand Down
12 changes: 10 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -131,18 +131,26 @@ jobs:
TAG: ${{ steps.version.outputs.tag }}
run: make release-manifest IMG="${IMAGE}:${TAG}"

- name: Package and push Helm chart
- name: Package and push Helm charts
env:
VERSION: ${{ steps.version.outputs.version }}
TAG: ${{ steps.version.outputs.tag }}
ACTOR: ${{ github.actor }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
make helm
helm registry login -u "${ACTOR}" -p "${GH_TOKEN}" ghcr.io

./bin/yq -i ".version = \"${VERSION}\"" chart/bootc-operator-crds/Chart.yaml
./bin/yq -i ".appVersion = \"${TAG}\"" chart/bootc-operator-crds/Chart.yaml
helm package chart/bootc-operator-crds
helm push "bootc-operator-crds-${VERSION}.tgz" oci://ghcr.io/${{ github.repository }}/charts

./bin/yq -i ".version = \"${VERSION}\"" chart/bootc-operator/Chart.yaml
./bin/yq -i ".appVersion = \"${TAG}\"" chart/bootc-operator/Chart.yaml
./bin/yq -i ".dependencies[0].version = \"${VERSION}\"" chart/bootc-operator/Chart.yaml
helm dependency build chart/bootc-operator
helm package chart/bootc-operator
helm registry login -u "${ACTOR}" -p "${GH_TOKEN}" ghcr.io
helm push "bootc-operator-${VERSION}.tgz" oci://ghcr.io/${{ github.repository }}/charts

- name: Create release
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ kubeconfig-*
docs/book/
user-docs
chart/bootc-operator/crds/
chart/bootc-operator/charts/
chart/bootc-operator/Chart.lock
chart/bootc-operator-crds/templates/
chart/bootc-operator/templates/controller-clusterrole.yaml
chart/bootc-operator/templates/daemon-clusterrole.yaml
chart/bootc-operator/templates/leader-election-role.yaml
Expand Down
6 changes: 6 additions & 0 deletions chart/bootc-operator-crds/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.DS_Store
.git/
.gitignore
*.swp
*.bak
*.tmp
14 changes: 14 additions & 0 deletions chart/bootc-operator-crds/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: v2
name: bootc-operator-crds
description: CRDs for the bootc-operator
type: application
version: 0.1.0
appVersion: "v0.1.1"
kubeVersion: ">= 1.34.0"
home: https://github.com/bootc-dev/bootc-operator
sources:
- https://github.com/bootc-dev/bootc-operator
keywords:
- bootc
- operator
- crd
5 changes: 5 additions & 0 deletions chart/bootc-operator/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,8 @@ keywords:
- operator
- os-update
- node-management
dependencies:
- name: bootc-operator-crds
version: "0.1.0"
repository: "file://../bootc-operator-crds"
condition: crds.install
3 changes: 3 additions & 0 deletions chart/bootc-operator/values.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
crds:
install: true

image:
repository: ghcr.io/bootc-dev/bootc-operator
tag: ""
Expand Down
38 changes: 36 additions & 2 deletions docs/src/helm.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@

## Install

The operator chart includes the CRDs as a
[dependency](https://helm.sh/docs/helm/helm_dependency/). CRDs are
installed in a sub-chart (instead of the `crds/` directory) so that
`helm upgrade` can update them.

Install from the OCI registry:

```bash
Expand All @@ -18,17 +23,26 @@ To install a specific version:

```bash
helm install bootc-operator oci://ghcr.io/bootc-dev/bootc-operator/charts/bootc-operator \
--version 0.1.0 \
--create-namespace --namespace bootc-operator
--version 0.1.0 --create-namespace --namespace bootc-operator
```

Alternatively, install from a local checkout:

```bash
helm dependency build ./chart/bootc-operator
helm install bootc-operator ./chart/bootc-operator \
--create-namespace --namespace bootc-operator
```

To manage CRDs separately (e.g. with a GitOps tool), disable the
dependency and install the CRD chart on its own:

```bash
helm install bootc-operator-crds oci://ghcr.io/bootc-dev/bootc-operator/charts/bootc-operator-crds
helm install bootc-operator oci://ghcr.io/bootc-dev/bootc-operator/charts/bootc-operator \
--create-namespace --namespace bootc-operator --set crds.install=false
```

By default the chart uses the image
`ghcr.io/bootc-dev/bootc-operator:<appVersion>` where `appVersion` is
defined in `Chart.yaml`.
Expand Down Expand Up @@ -88,6 +102,25 @@ kubectl create secret generic my-pull-secret \
--type=kubernetes.io/dockerconfigjson
```

## Upgrade

```bash
helm upgrade bootc-operator oci://ghcr.io/bootc-dev/bootc-operator/charts/bootc-operator \
--version <version> --namespace bootc-operator
```

Replace `<version>` with the chart version (e.g. `0.2.0`). The CRD
sub-chart is upgraded automatically.

## Uninstall

```bash
helm uninstall bootc-operator --namespace bootc-operator
```

> **Warning**: uninstalling the chart also removes the CRDs and all
> their instances cluster-wide.

Comment on lines +121 to +123

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.

could we have this documented for roll back as well, same will happen for that when we change crd.install from true to false to previous chart without running helm unistall?

@alicefr alicefr Oct 16, 2026 •

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Not every project support rollbacks. In fact, it might be disruptive if we add new required fields to the api and to rollback to the previous version. Can we leave rollback out of scope?

## Regenerating the chart

Most Helm templates are generated from the kustomize manifests. After
Expand All @@ -102,6 +135,7 @@ make helm

| Key | Default | Description |
|-----|---------|-------------|
| `crds.install` | `true` | Install the CRD sub-chart |
| `image.repository` | `ghcr.io/bootc-dev/bootc-operator` | Operator image repository |
| `image.tag` | `""` (uses `appVersion`) | Operator image tag |
| `image.pullPolicy` | not set | Kubernetes image pull policy |
Expand Down
7 changes: 4 additions & 3 deletions hack/sync-helm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,15 @@ set -euo pipefail

REPO_ROOT="$(cd "$(dirname "$0")/.." && pwd)"
CHART_DIR="$REPO_ROOT/chart/bootc-operator"
CRD_CHART_DIR="$REPO_ROOT/chart/bootc-operator-crds"
CONFIG_DIR="$REPO_ROOT/config"
YQ="${YQ:-yq}"

command -v "$YQ" >/dev/null 2>&1 || { echo "error: yq required (run: make yq)" >&2; exit 1; }

# --- CRDs ---
mkdir -p "$CHART_DIR/crds"
cp "$CONFIG_DIR"/crd/bases/*.yaml "$CHART_DIR/crds/"
# --- CRDs (separate chart) ---
mkdir -p "$CRD_CHART_DIR/templates"
cp "$CONFIG_DIR"/crd/bases/*.yaml "$CRD_CHART_DIR/templates/"
echo "Synced CRDs"

# --- RBAC ---
Expand Down
Loading