Skip to content

feat: publish the Helm chart on release - #35

Open
blaipr wants to merge 1 commit into
ctrliq:develfrom
blaipr:feat/publish-helm-chart
Open

feat: publish the Helm chart on release#35
blaipr wants to merge 1 commit into
ctrliq:develfrom
blaipr:feat/publish-helm-chart

Conversation

@blaipr

@blaipr blaipr commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

Addresses ctrliq/ascender-install#181, which asks for an official Helm repository for the operator. Issues were disabled here when it was filed, so the request landed on the installer repo.

Problem

The chart machinery is all here already, inherited from awx-operator: .helm/starter, and the helm-chart, helm-package and helm-index targets in the Makefile. Nothing calls it. The chart is still named awx-operator and points at the upstream repository, and no workflow publishes it, so there is no repository to helm repo add and the operator can only be installed with kustomize.

Change

Releases now publish the chart:

  • .github/workflows/publish-helm.yaml runs when a release is published, or on demand for a given tag. It packages the chart at the release version, attaches the tarball to the release, and refreshes index.yaml on the gh-pages branch. The branch is created on the first run when it does not exist yet.
  • The Makefile chart variables name the chart ascender-operator, and the three places that spelled awx-operator out use $(CHART_NAME) instead. helm-index now depends on the helm target so it can be run on its own.
  • The chart README and the Helm install guide point at this repository and the chart it publishes.

The chart index lists each version with the URL of the tarball attached to that release, which is the layout the chart README already describes. Nothing about the generated manifests changes: namePrefix stays awx-operator-, so resource names inside the chart are the same as with kustomize.

Once this merges, the repository needs GitHub Pages pointed at the gh-pages branch, root folder, and the chart is then available with:

helm repo add ascender-operator https://ctrliq.github.io/ascender-operator/
helm install -n ascender --create-namespace my-ascender-operator ascender-operator/ascender-operator

Older releases have no chart attached, so helm-index skips them and the index starts at the first release published with this workflow.

Testing

Run locally against this branch with VERSION=0.0.0-test:

  • make helm-chart generates charts/ascender-operator with the CRDs in crds/ and the operator manifests in templates/
  • make helm-package produces ascender-operator-0.0.0-test.tgz, and helm lint passes on the chart
  • helm template renders the deployment with image: ghcr.io/ctrliq/ascender-operator:0.0.0-test
  • make helm-index CHART_OWNER=ctrliq skips the existing releases that carry no chart and writes an index whose entry URL is https://github.com/ctrliq/ascender-operator/releases/download/0.0.0-test/ascender-operator-0.0.0-test.tgz

The workflow itself has not run, since that needs a release in this repository.

@ciq-it-service-account

ciq-it-service-account commented Aug 23, 2026

Copy link
Copy Markdown

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues
Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@cigamit

cigamit commented Aug 23, 2026

Copy link
Copy Markdown
Collaborator

How is the internal one different from this?
https://github.com/ansible-community/awx-operator-helm

I was working on converting that one over here
https://github.com/cigamit/ascender-operator-helm
I wasn't going to move it to the ciq repo until I verified it all worked (and just haven't had time yet).

@cigamit cigamit self-assigned this Aug 23, 2026
@cigamit cigamit added the question Further information is requested label Aug 23, 2026
@blaipr

blaipr commented Aug 26, 2026

Copy link
Copy Markdown
Contributor Author

Hi @cigamit, thanks for the pointer.

They are the same chart. ascender-operator already carries the chart build from ansible/awx-operator: .helm/starter, plus helm-chart-generate, helm-package and helm-index in the Makefile. .helm/starter/README.md on devel is still the upstream one word for word. ansible-community/awx-operator-helm is that same chart after upstream split it out in July 2024, which is why the READMEs match.

So this PR does not write a chart. It rebrands what the generator already emits, which is the whole 7 line Makefile diff, and adds the missing publish-helm.yaml: on a release it packages the chart, attaches the tarball, and keeps index.yaml on gh-pages so helm repo add works.

The kind: AWX in the templates and the AWX.spec names left in the README are not leftovers. watches.yaml still watches awx.ansible.com/v1beta1, kind: AWX, so renaming them would break the chart.

That leaves a choice rather than a difference: generate the chart here, or move your fork into ctrliq and maintain it there. Doing both is the only bad option. Your call, and you have the fork in flight. If you would rather it live there, I will close this. If it is a way off, this makes the chart in devel correct and installable meanwhile, and does not block moving it out later.

@cigamit
cigamit requested a lite review from Copilot September 4, 2026 03:30
@cigamit cigamit added enhancement New feature or request and removed question Further information is requested labels Sep 4, 2026

Copilot AI 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.

🟡 Changes recommended

The new publish workflow is not idempotent on reruns (can fail when there’s nothing to commit), and there are documentation/workflow clarity issues that should be corrected before approval.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR adds an automated Helm chart publishing flow so each GitHub Release publishes a packaged chart asset and updates a Helm index.yaml served from the repo’s gh-pages branch, making the operator installable via helm repo add.

Changes:

  • Adds a GitHub Actions workflow to package/upload the chart on release and regenerate/publish the Helm index on gh-pages.
  • Renames Helm chart variables/paths from awx-operator to ascender-operator in the Makefile and ensures helm-index can run standalone.
  • Updates Helm installation documentation and starter README links to point at this repository and chart.
File summaries
File Description
.github/workflows/publish-helm.yaml New release/dispatch workflow to package the chart, upload it to the release, and publish updated index.yaml to gh-pages.
Makefile Renames chart variables and updates Helm chart generation/packaging/index targets to use $(CHART_NAME).
docs/installation/helm-install-on-existing-cluster.md Updates helm repo/install examples and explains how the chart index is produced from release assets.
.helm/starter/README.md Updates chart README wording and links to refer to Ascender Operator and this repository.
Review details
  • Files reviewed: 4/4 changed files
  • Comments generated: 3
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .github/workflows/publish-helm.yaml Outdated
Comment on lines +71 to +73
git add index.yaml
git commit -m "Update index.yaml for release ${TAG_NAME}"
git push origin gh-pages
run: |
echo "TAG_NAME=${{ github.event.release.tag_name }}" >> $GITHUB_ENV

- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
$ helm install -n ascender --create-namespace my-ascender-operator ascender-operator/ascender-operator
NAME: my-ascender-operator
LAST DEPLOYED: Thu Feb 17 22:09:05 2022
NAMESPACE: default
@cigamit cigamit added the Needs Triage Something isn't right and needs to be looked into. label Sep 4, 2026
@cigamit

cigamit commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

gh-pages branch has been created. Github Pages has been configured to point to the branch. Just waiting on this PR to be corrected and we should be ready to go.

https://ctrliq.github.io/ascender-operator/

The chart machinery inherited from awx-operator was never wired to a workflow
here, so the chart could only be built by hand and there was no repository to
install it from.

A release now packages the chart, attaches it to the release, and refreshes
index.yaml on the gh-pages branch, which makes the repository servable from
GitHub Pages at https://ctrliq.github.io/ascender-operator. The chart is named
ascender-operator and its image is the one this repository publishes.
@blaipr
blaipr force-pushed the feat/publish-helm-chart branch from 87d8415 to 1735587 Compare September 4, 2026 14:50
@blaipr

blaipr commented Sep 4, 2026

Copy link
Copy Markdown
Contributor Author

Rebased on devel and pushed the review fixes.

  • The gh-pages commit is guarded, so a rerun with an unchanged index skips the commit and push instead of failing.
  • The docs sample output says NAMESPACE: ascender, matching the install command above it.
  • The actions/checkout pin is correct as it stands: refs/tags/v6.0.2 resolves to de0fac2e, and it is the pin devel.yaml, promote.yaml and stage.yml already carry.

Ran the steps locally against a clone of this repository's gh-pages branch, with Helm 3.8 (what the Makefile downloads) and Helm 3.19 (what ubuntu-latest ships, so what CI will use):

  • make helm-package VERSION=0.0.0-test writes the tarball at the path the upload step expects, helm lint is clean, and the deployment renders ghcr.io/ctrliq/ascender-operator:0.0.0-test.
  • make helm-index CHART_OWNER=ctrliq indexes it at https://github.com/ctrliq/ascender-operator/releases/download/0.0.0-test/ascender-operator-0.0.0-test.tgz, and skips the releases that carry no chart.

IMPORTANT

@cigamit: one thing on the branch. gh-pages holds index.yml, and Helm fetches index.yaml, so nothing reads it. The workflow writes index.yaml on the first release, and index.yml can go whenever.

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

Labels

enhancement New feature or request Needs Triage Something isn't right and needs to be looked into.

Development

Successfully merging this pull request may close these issues.

4 participants