CNV-93096: Fix wrong condition for the CPUManager feature gate - #321
CNV-93096: Fix wrong condition for the CPUManager feature gate#321nunnatsa wants to merge 1 commit into
Conversation
|
❌ Generated Files Verification Failed One or more generated files in this PR are out of sync:
Please regenerate the files locally and commit the changes. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
13e34c7 to
6d7fd25
Compare
|
❌ Generated Files Verification Failed One or more generated files in this PR are out of sync:
Please regenerate the files locally and commit the changes. |
73e631d to
7b98f64
Compare
|
❌ Generated Files Verification Failed One or more generated files in this PR are out of sync:
Please regenerate the files locally and commit the changes. |
7b98f64 to
78a8ae2
Compare
|
❌ Generated Files Verification Failed One or more generated files in this PR are out of sync:
Please regenerate the files locally and commit the changes. |
78a8ae2 to
45823f8
Compare
| | `pci-passthrough` | | MachineConfig | Opt-in: hardware + annotation condition | | ||
| | `kubelet-perf-settings` | | KubeletConfig | Always-on baseline | | ||
| | `kubelet-cpu-manager` | | KubeletConfig | Opt-in: CPUManager feature gate | | ||
| | `kubelet-cpu-manager` | | KubeletConfig | Always-on baseline | |
There was a problem hiding this comment.
Opt-in: CPUManager KubeVirt feature gate (on by default) ?
| @@ -0,0 +1,42 @@ | |||
| package resources | |||
| @@ -0,0 +1,235 @@ | |||
| package resources_test | |||
| rules := StaticRules() | ||
| if len(rules) != 8 { | ||
| if len(rules) != 9 { | ||
| t.Errorf("expected 8 static rules, got %d", len(rules)) |
There was a problem hiding this comment.
now 9 also in the error message (or make it dynamic for the future).
| Topology *TopologyContext // Cluster topology info (HCP, compact, node counts) | ||
| Images map[string]string // Container images from RELATED_IMAGE_* env vars | ||
| Params map[string]string // Per-asset parameters from metadata template_params | ||
| KubeVirtFeatureGates []string // Full KubeVirt object, templates access directly |
| @@ -0,0 +1 @@ | |||
| ../../../assets No newline at end of file | |||
There was a problem hiding this comment.
I don't really like the symlink approach, I think it could become fragile. Can we avoid it if it's just for loader := NewLoaderFromFS(real.EmbeddedFS) and directly use the production embedded ones ?
There was a problem hiding this comment.
I'll drop the whole thing
|
|
||
| // Build constructs a RenderContext from the current HCO state | ||
| func (b *RenderContextBuilder) Build(ctx context.Context, hco *unstructured.Unstructured) (*pkgcontext.RenderContext, error) { | ||
| func (b *RenderContextBuilder) Build(ctx context.Context, hco *unstructured.Unstructured, kvFG []string) (*pkgcontext.RenderContext, error) { |
There was a problem hiding this comment.
I find the kvFG []string parameter on RenderContextBuilder.Build() a bit awkward. Build() already collects cluster state (nodes, topology, infra CRs), so KubeVirt feature gates fit better there than as a controller-owned input. Could we move getKubeVirtFGs into RenderContextBuilder (soft-fail to nil on error) and have updateConditionEvaluator read renderCtx.KubeVirtFeatureGates (so just r.updateConditionEvaluator(hco, renderCtx) instead of r.updateConditionEvaluator(hco, kvFGs, renderCtx)) ?
842852e to
1875258
Compare
The CPUManager is not HCO's feature gate, but KubeVirt's. Added new condition type for KV FGs, and use it to replace the existing condition for kubelet-cpu-manager. Signed-off-by: Nahshon Unna Tsameret <nunnatsa@redhat.com>
cbeb070 to
71b7158
Compare
|
/cherry-pick release-5.0 |
|
@nunnatsa: once the present PR merges, I will cherry-pick it on top of DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
/cherry-pick release-4.23 |
|
@nunnatsa: once the present PR merges, I will cherry-pick it on top of DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
/hold trying to watch the KubeVirt CRD |
The CPUManager is not HCO's feature gate, but KubeVirt's.
Added new condition type for KV FGs, and use it to replace the existing
condition for kubelet-cpu-manager.