Skip to content

Adding Helm Parameter CI Tests#2868

Open
mdzraf wants to merge 1 commit intokubernetes-sigs:masterfrom
mdzraf:AddHelmParamCITests
Open

Adding Helm Parameter CI Tests#2868
mdzraf wants to merge 1 commit intokubernetes-sigs:masterfrom
mdzraf:AddHelmParamCITests

Conversation

@mdzraf
Copy link
Member

@mdzraf mdzraf commented Feb 17, 2026

What type of PR is this?

/kind feature

What is this PR about? / Why do we need it?

This PR adds individual tests for the various helm parameters that can be configured when deploying the driver.

How was this change tested?

Tested manually by running:

mkdir -p /tmp/e2e-results && export REPORT_DIR=/tmp/e2e-results  && make e2e/parameters-all

Also ran in CI under the existing single-az testing grid. It will have it's own test grid after this merges but put under single-az for reviewers to see results and JUnit outputs.

Does this PR introduce a user-facing change?

NONE

@k8s-ci-robot
Copy link
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. kind/feature Categorizes issue or PR as related to a new feature. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Feb 17, 2026
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign connorjc3 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 added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Feb 17, 2026
@github-actions
Copy link

Code Coverage Diff

This PR does not change the code coverage

@mdzraf mdzraf changed the title Adding Helm Parameter CI Tests [WIP] Adding Helm Parameter CI Tests Feb 17, 2026
@mdzraf mdzraf force-pushed the AddHelmParamCITests branch from b3ad7d8 to b074ab6 Compare February 17, 2026 18:16
@mdzraf
Copy link
Member Author

mdzraf commented Feb 17, 2026

/test pull-aws-ebs-csi-driver-e2e-single-az

@mdzraf
Copy link
Member Author

mdzraf commented Feb 17, 2026

/test pull-aws-ebs-csi-driver-verify

@mdzraf mdzraf force-pushed the AddHelmParamCITests branch from b074ab6 to 3334fde Compare February 17, 2026 20:27
@mdzraf
Copy link
Member Author

mdzraf commented Feb 17, 2026

/test pull-aws-ebs-csi-driver-e2e-single-az
/test pull-aws-ebs-csi-driver-verify

Comment on lines +57 to +65
param_set_legacy-compat() {
GINKGO_FOCUS="\[param:(useOldCSIDriver|legacyXFS)\]"
HELM_EXTRA_FLAGS="--set=useOldCSIDriver=true,node.legacyXFS=true"
}

param_set_selinux() {
GINKGO_FOCUS="\[param:selinux\]"
HELM_EXTRA_FLAGS="--set=node.selinux=true"
}
Copy link
Member Author

Choose a reason for hiding this comment

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

These are not in the PARAMETERS_ALL test for now, I will see if they need a separate cluster or not.

@mdzraf
Copy link
Member Author

mdzraf commented Feb 17, 2026

/hold

Have to reverse single-az makefile target before merging

@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 Feb 17, 2026
@mdzraf mdzraf force-pushed the AddHelmParamCITests branch from 3334fde to 976d61c Compare February 17, 2026 21:06
@mdzraf
Copy link
Member Author

mdzraf commented Feb 17, 2026

/test pull-aws-ebs-csi-driver-e2e-single-az
/test pull-aws-ebs-csi-driver-verify

@mdzraf mdzraf changed the title [WIP] Adding Helm Parameter CI Tests Adding Helm Parameter CI Tests Feb 17, 2026
@mdzraf mdzraf marked this pull request as ready for review February 17, 2026 21:11
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 17, 2026
@mdzraf
Copy link
Member Author

mdzraf commented Feb 18, 2026

Noticed some tests are being skipped, looking into it.

# standard - Behavioral params (tagging, metrics, logging, storage classes, etc.)
# other - Volume modification, volume attach limit, and metadata labeler
# debug - debugLogs=true overrides individual logLevel settings
# infra - Infrastructure/deployment params (resources, security, strategy, etc.)
Copy link
Member

Choose a reason for hiding this comment

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

Why is storage classes in standard and not in infra it is a cluster resource

Copy link
Member

@ElijahQuinones ElijahQuinones Feb 18, 2026

Choose a reason for hiding this comment

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

Also why are we dividing these into categories at all ? If we end up running them all anyways

@mdzraf mdzraf force-pushed the AddHelmParamCITests branch 2 times, most recently from 21ccf1e to 8437c58 Compare February 19, 2026 17:11
@mdzraf mdzraf force-pushed the AddHelmParamCITests branch from 8437c58 to 68a45c5 Compare February 19, 2026 17:40
Comment on lines +143 to +147
# THIS WILL BE REVERSED BEFORE MERGING. Only here because these tests do not
# yet have their own testgrid but reviewers need to see how JUnit output is after tests run for this PR.
.PHONY: e2e/single-az
e2e/single-az: bin/helm bin/ginkgo
AWS_AVAILABILITY_ZONES=us-west-2a \
TEST_PATH=./tests/e2e/... \
GINKGO_FOCUS="\[ebs-csi-e2e\] \[single-az\]" \
GINKGO_PARALLEL=5 \
HELM_EXTRA_FLAGS="--set=controller.volumeModificationFeature.enabled=true,sidecars.provisioner.additionalArgs[0]='--feature-gates=VolumeAttributesClass=true',sidecars.resizer.additionalArgs[0]='--feature-gates=VolumeAttributesClass=true',node.enableMetrics=true" \
./hack/e2e/run.sh
./hack/e2e/param-sets.sh run-all
Copy link
Member

Choose a reason for hiding this comment

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

Thanks for leaving a comment about it, I'm including it in the review so that we don't forget to revert this before the merge.

Comment on lines +106 to +115
# Merge per-set JUnit XMLs into a single file with duplicate skipped tests removed.
# Each Ginkgo run reports ALL specs (most as skipped), so the same skipped test appears
# in every per-set file. This merges all results into one file, keeping non-skipped results
# (passed/failed) over skipped duplicates, and emitting each skipped test only once.
merge_junit_results() {
local report_dir="${REPORT_DIR:-/logs/artifacts}"
local output="${report_dir}/junit-params.xml"

python3 - "$report_dir" "$output" <<'PYEOF'
import glob, sys, xml.etree.ElementTree as ET
Copy link
Member

Choose a reason for hiding this comment

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

I'd drop this merge script and let the JUnit files stand on their own.

Testgrid handles multiple files per job fine, and keeping them separate actually helps debugging since you can tell which param set a failure came from just by the filename. The skipped test noise is a not an issue,(the external test jobs already report 7000+ skips), but if we want to clean it up properly, the right move is putting these parameter tests in their own package so Ginkgo only discovers the specs we care about.

fi
}

# Run all standard parameter sets sequentially
Copy link
Member

Choose a reason for hiding this comment

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

Why are param sets running sequentially? can we parallelize?

Another thing, most of these tests don't need a live cluster. Things like "does the controller deployment have 3 replicas" or "does the node daemonset have this toleration" are assertions about rendered kubernetes objects, not runtime behavior. We could test the vast majority with helm template + assertions on the rendered YAML.

Comment on lines +36 to +38
param_set_standard() {
GINKGO_FOCUS="\[param:(extraCreateMetadata|k8sTagClusterId|extraVolumeTags|controllerMetrics|nodeMetrics|batching|defaultFsType|controllerLoggingFormat|nodeLoggingFormat|controllerLogLevel|nodeLogLevel|provisionerLogLevel|attacherLogLevel|snapshotterLogLevel|resizerLogLevel|nodeDriverRegistrarLogLevel|storageClasses|volumeSnapshotClasses|defaultStorageClass|snapshotterForceEnable|controllerUserAgentExtra|controllerEnablePrometheusAnnotations|nodeEnablePrometheusAnnotations|nodeKubeletPath|nodeTolerateAllTaints|controllerPodDisruptionBudget|provisionerLeaderElection|attacherLeaderElection|resizerLeaderElection|reservedVolumeAttachments|hostNetwork|nodeDisableMutation|nodeTerminationGracePeriod|nodeAllocatableUpdatePeriodSeconds)\]"
HELM_EXTRA_FLAGS="--set=controller.extraCreateMetadata=true,controller.k8sTagClusterId=e2e-param-test,controller.extraVolumeTags.TestKey=TestValue,controller.enableMetrics=true,node.enableMetrics=true,controller.batching=true,controller.defaultFsType=xfs,controller.loggingFormat=json,node.loggingFormat=json,controller.logLevel=5,node.logLevel=5,sidecars.provisioner.logLevel=5,sidecars.attacher.logLevel=5,sidecars.snapshotter.logLevel=5,sidecars.resizer.logLevel=5,sidecars.nodeDriverRegistrar.logLevel=5,defaultStorageClass.enabled=true,storageClasses[0].name=test-sc,storageClasses[0].parameters.type=gp3,volumeSnapshotClasses[0].name=test-vsc,volumeSnapshotClasses[0].deletionPolicy=Delete,sidecars.snapshotter.forceEnable=true,controller.userAgentExtra=e2e-test,controller.enablePrometheusAnnotations=true,node.enablePrometheusAnnotations=true,node.kubeletPath=/var/lib/kubelet,node.tolerateAllTaints=true,controller.podDisruptionBudget.enabled=true,sidecars.provisioner.leaderElection.enabled=true,sidecars.attacher.leaderElection.enabled=true,sidecars.resizer.leaderElection.enabled=true,node.reservedVolumeAttachments=2,node.hostNetwork=true,node.serviceAccount.disableMutation=true,node.terminationGracePeriodSeconds=60,nodeAllocatableUpdatePeriodSeconds=30"
Copy link
Member

Choose a reason for hiding this comment

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

Say someone adds a new helm value controller.foo=bar, here's what they have to do:

  1. Write the go test with the right [param:foo] tag
  2. Figure out which param set it belongs in (standard? infra? other? new one?)
  3. Add foo to the GINKGO_FOCUS regex for that param set
  4. Add controller.foo=bar to the HELM_EXTRA_FLAGS string for that param set
  5. Hardcode "bar" in the go test assertion and hope it matches what they put in step 4
  6. Hope they didn't typo anything in this massive 1000+ character strings

we need to simplify this, and have a single source of truth for what to deploy and what to assert. I suggest defining the test values once, in one place, such as by using a values yaml file per param set and have the go tests read expected values from it (or a shared const).

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. kind/feature Categorizes issue or PR as related to a new feature. release-note-none Denotes a PR that doesn't merit a release note. 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.

4 participants