fix(vald-operator): bring Helm chart CI/Makefile parity with vald-helm-operator and vald-benchmark-operator#3560
Conversation
… and internal/encoding/json build: consolidate gopls and oapi-codegen into go.tools (#3558) Signed-off-by: kpango <kpango@vdaas.org>
…elm-operator and vald-benchmark-operator vald-operator (charts/operator/vald) was never wired into the Helm publish/lint/release automation, so it was never packaged and never appeared in the published Helm repo index (verified against gh-pages charts/index.yaml). - add helm/package/all, helm/docs/all (helm.mk) and k8s/manifest/all (k8s.mk) aggregate targets mirroring the existing helm/schema/all idiom, so new charts only need to be listed in one place - helm.yaml: package all 5 charts instead of 4, fixing the ArtifactHub publishing gap for vald-operator - helm-lint.yaml: collapse 3 near-duplicate per-chart lint jobs into a matrix job and add previously-missing lint coverage for vald-benchmark-operator - _release-pr.yaml / update-deps.yaml: bump vald-operator's chart version and regenerate its k8s manifests/docs on release and daily dependency updates, same as the other charts; also stage pkg/ since k8s/manifest/all now regenerates pkg/operator/vald's test golden file - k8s.mk: fix mv path bugs in k8s/manifest/operator/helm/update, k8s/manifest/operator/benchmark/update, k8s/operator/helm/deploy, k8s/operator/helm/delete, k8s/operator/benchmark/deploy and k8s/operator/benchmark/delete — helm template --output-dir names the output directory after Chart.yaml's name field (vald-helm-operator, vald-benchmark-operator), not the chart's source path, so these targets always failed. Verified against a real helm template run and confirmed the regenerated manifests byte-match the committed ones after the standard make license + yamlfmt cleanup pass. Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: kpango <kpango@vdaas.org>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. 🗂️ Base branches to auto review (1)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
|
[CHATOPS:HELP] ChatOps commands.
|
There was a problem hiding this comment.
Pull request overview
This PR wires the vald-operator Helm chart into the existing Helm packaging/linting/release automation and introduces aggregate Make targets to keep chart-related CI/Makefile workflows in parity across all Vald charts/operators.
Changes:
- Added aggregate Make targets (
helm/package/all,helm/docs/all,k8s/manifest/all) to centralize chart lists and simplify CI/release automation updates. - Updated GitHub Actions workflows to use the new aggregate targets and expanded Helm lint coverage to include operator charts via a matrix job.
- Fixed Helm
--output-dirpath assumptions ink8s.mkfor operator Helm/benchmark deploy/delete and manifest update targets.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| Makefile.d/k8s.mk | Adds k8s/manifest/all and fixes Helm template output-dir path handling for operator manifest generation and deploy/delete helpers. |
| Makefile.d/helm.mk | Adds helm/package/all and helm/docs/all aggregate targets to package/docs-generate all charts consistently. |
| .github/workflows/update-deps.yaml | Switches dependency-update automation to use the new aggregate manifest/docs targets. |
| .github/workflows/helm.yaml | Switches Helm packaging workflow to make helm/package/all so all charts are published. |
| .github/workflows/helm-lint.yaml | Refactors per-chart lint jobs into a matrix and extends lint coverage to additional operator charts. |
| .github/workflows/_release-pr.yaml | Updates release automation to bump vald-operator chart version and regenerate manifests/docs via aggregate targets; also stages pkg/. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -117,7 +126,7 @@ k8s/manifest/operator/benchmark/update: \ | |||
| --output-dir $(TEMP_DIR) \ | |||
| charts/operator/benchmark | |||
| mkdir -p $(ROOTDIR)/k8s/tools/benchmark | |||
| - name: vald-benchmark-operator | ||
| path: charts/operator/benchmark | ||
| schema_target: helm/schema/operator/benchmark |
…t matrix and release version bump
hack/helm/charts.yaml is now the single source of truth for which
Helm charts exist (name, path, schema target, whether values.yaml has
a bumpable image tag). Consumed by:
- helm-lint.yaml: a resolve-charts job (running in the same pinned
vald-dev-container as every other job in this workflow) reads the
file with yq and emits it as JSON; the lint-chart matrix job sources
its chart list from that job output instead of a hardcoded array.
- _release-pr.yaml: the 8 hardcoded per-chart sed lines for bumping
Chart.yaml version / values.yaml image tag are replaced with two
yq-driven loops over the same file.
Adding a new chart in the future now only requires one entry in
hack/helm/charts.yaml instead of editing both CI files. Verified the
yq queries reproduce the prior hardcoded behavior exactly (including
that vald-readreplica's values.yaml is a symlink to vald/values.yaml,
so it's correctly bumped transitively without its own bump_values_tag
entry), and that resolve-charts running inside the pinned dev
container avoids a second, independent yq-provisioning path.
Also passes matrix/loop values through env: instead of raw ${{ }}
interpolation in run: blocks, and writes the multi-line JSON output
via the heredoc-safe GITHUB_OUTPUT pattern, per code review.
Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: kpango <kpango@vdaas.org>
Deploying vald with
|
| Latest commit: |
fee9a99
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://a6afb5ed.vald.pages.dev |
| Branch Preview URL: | https://feature-vald-operator-helm-p.vald.pages.dev |
|
Follow-up commit: introduced Verified: Independently reviewed by |
…ce in k8s.mk
Replace the hardcoded Helm chart name segments (vald-helm-operator,
vald-benchmark-operator) that mv/kubectl commands relied on with a
name-agnostic glob, so k8s.mk no longer hardcodes any operator chart's
Chart.yaml name field and stays correct regardless of future chart
renames under the hierarchical charts/operator/{helm,vald,benchmark}
layout.
Doing this safely required removing the shared, memoized $(TEMP_DIR)
from every affected recipe (k8s/manifest/operator/{helm,vald,benchmark}/update,
k8s/operator/{helm,benchmark}/{deploy,delete}): a code review caught that
$(TEMP_DIR) is a single directory created once per `make` invocation
(Makefile:71), not per-recipe, so a glob wildcard against it would be
unsafe under `make -jN` — concurrent recipes could write into and
clean up the same directory. Each recipe now allocates its own private
`mktemp -d` directory, chained into one shell invocation with `set -e`
and a `trap ... EXIT` for cleanup so a failing step aborts the recipe
instead of being silently swallowed by the previous `;`-only chaining.
k8s/manifest/all (which aggregates these targets) is switched from
prerequisite-based to recursive $(MAKE)-based sequencing so its
sub-targets can never run in parallel regardless of an outer -jN flag.
Also relocates the single-source-of-truth chart list introduced in the
prior commit from hack/helm/charts.yaml to charts/charts.yaml (sits
alongside the actual chart directories it describes; confirmed no
existing tool - kubeval/conflint, kube-linter, helm-docs - globs
charts/ in a way that would misinterpret it), and drops the now-
redundant explicit path-trigger entry in helm-lint.yaml since
charts/charts.yaml is already covered by the existing charts/** glob.
Verified: ran the three rewritten k8s/manifest/operator/*/update
targets concurrently via `make -j3` and confirmed three genuinely
distinct temp directories with no cross-contamination; confirmed the
set -e/trap pattern aborts on failure while still cleaning up the temp
dir; regenerated manifests via the project-pinned helm v4.1.3 and the
standard make license + yamlfmt cleanup pass still byte-match the
committed baseline; actionlint and YAML syntax clean on all touched
workflow files.
Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: kpango <kpango@vdaas.org>
|
Follow-up commit addressing feedback that Makefile.d/k8s.mk still hardcoded old-style flat chart names (
Verified via |
|
/format |
|
[FORMAT] Updating license headers and formatting go codes triggered by kpango. |
Signed-off-by: Vdaas CI <vald@vdaas.org>
…/vald-operator/helm-parity
78dd7a7 to
1e3cb0c
Compare
1e3cb0c to
b751b4b
Compare
…/vald-operator/helm-parity Signed-off-by: Yusuke Kato <kpango@vdaas.org>
|
/format |
|
[FORMAT] Updating license headers and formatting go codes triggered by kpango. |
Signed-off-by: Vdaas CI <vald@vdaas.org>
Summary
vald-operator(charts/operator/vald) was never wired into the Helm publish/lint/release automation, so it was never packaged and never appeared in the published Helm repo index (verified against gh-pagescharts/index.yaml).helm/package/all,helm/docs/all(helm.mk) andk8s/manifest/all(k8s.mk) aggregate Makefile targets mirroring the existinghelm/schema/allidiom, so future charts only need to be listed in one place.helm.yaml: package all 5 charts instead of 4 — fixes the ArtifactHub publishing gap for vald-operator.helm-lint.yaml: collapsed 3 near-duplicate per-chart lint jobs into a matrix job and added previously-missing lint coverage for vald-benchmark-operator._release-pr.yaml/update-deps.yaml: bump vald-operator's chart version and regenerate its k8s manifests/docs on release and daily dependency updates, same as the other charts; also stagepkg/sincek8s/manifest/allnow regenerates vald-operator's Go test golden file.k8s.mk: fixedmvpath bugs ink8s/manifest/operator/helm/update,k8s/manifest/operator/benchmark/update,k8s/operator/helm/deploy,k8s/operator/helm/delete,k8s/operator/benchmark/deploy,k8s/operator/benchmark/delete—helm template --output-dirnames the output directory afterChart.yaml'sname:field (vald-helm-operator,vald-benchmark-operator), not the chart's source path, so these targets always failed before this fix.Verification
make helm/package/allruns end-to-end, producing all 5 chart packages includingvald-operator-*.tgz.helm lintpasses on all 4 charts (vald, vald-helm-operator, vald-operator, vald-benchmark-operator).k8s/operator/helmandk8s/operator/benchmarkmanifests with the project-pinned helm v4.1.3, ran the standardmake license+yamlfmtcleanup pass (same as CI does downstream), and confirmed the output byte-matches the committed manifests.actionlintclean on all 4 modified workflow files; YAML syntax validated.code-reviewerandvald-reviewersubagents; both flagged the samepkg/git-add gap (fixed) andcode-revieweradditionally caught the same mv-path bug in thek8s/operator/{helm,benchmark}/deploy|deletedev-convenience targets (fixed).Known/out-of-scope items (confirmed with requester)
charts/operator/vald/crds/valdoperatorrelease.yamlis a static controller-gen artifact with no regeneration mechanism left after the kubebuilder removal — flagged but not fixed here (owned by the operator's Go API type design, out of scope for this CI/Helm parity fix).artifacthub-repo.ymllives on thegh-pagesbranch (repo ownership/verification metadata) — out of scope for this branch.Manual follow-up required before/after merge
helm-lint.yaml's job IDs changed fromlint-vald-chart/lint-vald-helm-operator-chart/lint-vald-operator-chartto a single matrix joblint-chart. If GitHub branch protection on this or downstream branches lists the old job names as required status checks, please update them post-merge.Generated with Claude Code