Skip to content

Commit 0c358ad

Browse files
committed
fix(cdi): drop the ExpandDisks gate from the CDI object
ExpandDisks is a KubeVirt feature gate. CDI declares no gate by that name and matches gate names exactly, so the entry was accepted and ignored. Disk expansion is a KubeVirt feature, GA there at the release the platform ships, so listing the gate on the CDI object points a reader tracing where expansion comes from at the wrong component. The feature-gate list is pinned whole in its own case, so a gate added beside the one upstream ships turns the suite red. Assisted-by: LLM Signed-off-by: Aleksei Sviridkin <[email protected]>
1 parent 99de79f commit 0c358ad

2 files changed

Lines changed: 17 additions & 10 deletions

File tree

‎packages/system/kubevirt-cdi/templates/cdi-cr.yaml‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ spec:
1212
{{- end }}
1313
featureGates:
1414
- HonorWaitForFirstConsumer
15-
- ExpandDisks
1615
# Resources for every worker pod CDI creates -- importer, uploader and
1716
# host-assisted cloner alike, not only the importer the name suggests. The
1817
# default below restates CDI's own built-in values, so an unset

‎packages/system/kubevirt-cdi/tests/local_templates_test.yaml‎

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,22 +20,14 @@ tests:
2020
# `contains` answers "is ours still here" and cannot answer "has anything
2121
# been added beside it", and an assert per leaf cannot answer "has a key
2222
# appeared". Both directions matter for a file whose whole maintenance model
23-
# is a hand reconciliation at each bump. Pinning featureGates whole also
24-
# pins HonorWaitForFirstConsumer, which is upstream's rather than ours; that
25-
# is a side effect of the shape, not a claim that the upstream half is
26-
# covered.
23+
# is a hand reconciliation at each bump.
2724
- it: keeps the local additions to the CDI object
2825
template: cdi-cr.yaml
2926
documentSelector:
3027
path: kind
3128
value: CDI
3229
matchMany: false
3330
asserts:
34-
- equal:
35-
path: spec.config.featureGates
36-
value:
37-
- HonorWaitForFirstConsumer
38-
- ExpandDisks
3931
- equal:
4032
path: spec.infra.tolerations
4133
value:
@@ -51,6 +43,22 @@ tests:
5143
cpu: 100m
5244
memory: 60M
5345

46+
# The list upstream ships, and nothing added to it. CDI looks a gate up by
47+
# exact name and ignores one it does not declare, so a KubeVirt gate such as
48+
# ExpandDisks listed here is accepted and has no effect, and nothing on the
49+
# cluster rejects it.
50+
- it: enables only the feature gate upstream ships
51+
template: cdi-cr.yaml
52+
documentSelector:
53+
path: kind
54+
value: CDI
55+
matchMany: false
56+
asserts:
57+
- equal:
58+
path: spec.config.featureGates
59+
value:
60+
- HonorWaitForFirstConsumer
61+
5462
# The default is the empty string, so the block renders nothing and an
5563
# assertion on the default value would pass against a template that had
5664
# stopped rendering the block. Setting it is what makes this able to fail.

0 commit comments

Comments
 (0)