feat(kubevirt): add additionalSpec for unmapped spec fields#240
Open
Hector295 wants to merge 1 commit intosuse-edge:mainfrom
Open
feat(kubevirt): add additionalSpec for unmapped spec fields#240Hector295 wants to merge 1 commit intosuse-edge:mainfrom
Hector295 wants to merge 1 commit intosuse-edge:mainfrom
Conversation
Signed-off-by: hector <hectorvc0295@gmail.com>
Author
|
Hi @atanasdinov , could you please review this PR when you have a moment? |
Author
|
@atanasdinov @hardys - just a friendly reminder on this one when you have time. Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The KubeVirt CR spec has many fields. Rather than mapping every field explicitly, this adds an
additionalSpecescape hatch that:mergeOverwriteto combine with explicitly mapped fieldsadditionalSpecvalues when there are conflictsExample:
$ cat values.yaml kubevirt: monitorAccount: rancher-monitoring-prometheus monitorNamespace: cattle-monitoring-system additionalSpec: serviceMonitorNamespace: cattle-monitoring-system infra: nodePlacement: tolerations: - key: "node-role.kubernetes.io/etcd" operator: "Exists" effect: "NoExecute" configuration: developerConfiguration: featureGates: ["ExpandDisks"] $ helm template kubevirt assets/kubevirt/kubevirt-0.6.2.tgz -f values.yaml | grep -A22 "# Source: kubevirt/templates/kubevirt.yaml" # Source: kubevirt/templates/kubevirt.yaml apiVersion: kubevirt.io/v1 kind: KubeVirt metadata: name: kubevirt namespace: default spec: configuration: developerConfiguration: featureGates: - ExpandDisks imagePullPolicy: IfNotPresent infra: nodePlacement: tolerations: - effect: NoExecute key: node-role.kubernetes.io/etcd operator: Exists monitorAccount: rancher-monitoring-prometheus monitorNamespace: cattle-monitoring-system serviceMonitorNamespace: cattle-monitoring-system