Skip to content

[WIP] feat: add helm unit tests - #167

Open
sats-23 wants to merge 1 commit into
kubernetes-sigs:mainfrom
sats-23:issue157
Open

[WIP] feat: add helm unit tests#167
sats-23 wants to merge 1 commit into
kubernetes-sigs:mainfrom
sats-23:issue157

Conversation

@sats-23

@sats-23 sats-23 commented May 11, 2026

Copy link
Copy Markdown

Fixes #157

Signed-off-by: Sathvik <Sathvik.S@ibm.com>
@netlify

netlify Bot commented May 11, 2026

Copy link
Copy Markdown

Deploy Preview for mcp-lifecycle-operator ready!

Name Link
🔨 Latest commit c4db5ba
🔍 Latest deploy log https://app.netlify.com/projects/mcp-lifecycle-operator/deploys/6a01caa68de65d0008af56f0
😎 Deploy Preview https://deploy-preview-167--mcp-lifecycle-operator.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@k8s-ci-robot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: sats-23
Once this PR has been reviewed and has the lgtm label, please assign arangogutierrez for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot
k8s-ci-robot requested review from matzew and mrunalp May 11, 2026 12:25
@k8s-ci-robot k8s-ci-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels May 11, 2026
@aliok

aliok commented May 12, 2026

Copy link
Copy Markdown
Member

/hold

Let's keep this PR as draft until #155 is merged.

Changing the title of the PR to WIP.

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 12, 2026
@aliok aliok changed the title feat: add helm unit tests [WIP] feat: add helm unit tests May 12, 2026
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 12, 2026

@ArangoGutierrez ArangoGutierrez 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.

The tests themselves are in good shape — real helm-unittest suites with literal expected values, sensible per-resource organization, and a thorough README. The problem is everything bundled around them: this PR ships its own kubebuilder-helm-plugin chart (PROJECT change, new dist/chart templates, committed dist/install.yaml), which collides with #155 — the chart that's been through extensive review — in both layout and value paths (manager.image.* vs image.*, crd.enable/crd.keep vs the separate CRDs chart). Whichever merges first invalidates the other.

Suggest slimming this to: dist/chart/tests/, the helm-test Makefile targets, and a CI hook that runs them — rebased onto #155's chart once it lands (the template paths and value keys in the suites will need updating to match). The helm-deploy/rollback/status targets and the committed install.yaml read as separate concerns from #157.

Two Makefile issues inline. For the rebased version, assertions on the securityContext hardening fields and probe ports would round out the coverage nicely.

Comment thread Makefile
.PHONY: helm-test-debug
helm-test-debug: install-helm-unittest ## Run helm-unittest tests with debug output and rendered templates.
$(HELM) unittest $(HELM_CHART_DIR) -d --debug
$(HELM) rollback $(HELM_RELEASE) --namespace $(HELM_NAMESPACE)

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.

This helm rollback line belongs to the helm-rollback target up on line 353, which currently has no recipe at all. As written, make helm-rollback is a no-op and make helm-test-debug runs the unit tests and then rolls back a live Helm release — surprising side effect for a test target.

Comment thread Makefile
install-helm: ## Install the latest version of Helm.
@command -v $(HELM) >/dev/null 2>&1 || { \
echo "Installing Helm..." && \
curl -fsSL https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-4 | bash; \

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.

Piping an unpinned script from helm's main branch into bash isn't great supply-chain posture for a kubernetes-sigs repo — pin a release tag (and ideally verify a checksum), or simply require helm as a prerequisite and fail with a message, like most targets do for kubectl. Same theme on line 364: --verify=false on the plugin install deserves at least a comment explaining why verification is off.

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

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Helm chart unit tests

4 participants