From 6027abb96369a30e6ccd3f747f4029e36232c0af Mon Sep 17 00:00:00 2001 From: Todd Malsbary Date: Thu, 9 Sep 2021 11:24:45 -0700 Subject: Fix KubeVirt and SR-IOV addon interaction SR-IOV wants to drain the nodes during reconciliation of SriovNetwork resources, while KubeVirt wants to keep at least one instance running at all times via a PodDisruptionBudget. KubeVirt's behavior is not customizable, so split the addons into different composite apps that allow finer control of the instantiation order. Issue-ID: MULTICLOUD-1324 Signed-off-by: Todd Malsbary Change-Id: I15c5cec3ef524b0b1d60dc201e04157272cbe376 --- kud/deployment_infra/emco/examples/README.md | 34 ++++++++++++++++++++++------ 1 file changed, 27 insertions(+), 7 deletions(-) (limited to 'kud/deployment_infra/emco/examples/README.md') diff --git a/kud/deployment_infra/emco/examples/README.md b/kud/deployment_infra/emco/examples/README.md index 203b83fd..dcf9edde 100644 --- a/kud/deployment_infra/emco/examples/README.md +++ b/kud/deployment_infra/emco/examples/README.md @@ -15,6 +15,8 @@ needs to be installed and configured for the edge cluster. 5. SR-IOV Network 6. QuickAssist Technology (QAT) Device Plugin 7. CPU Manager for Kubernetes +8. KubeVirt and CDI Operators +9. KubeVirt and CDI Instances ## Setup environment to deploy addons @@ -38,22 +40,40 @@ required to be done only once. `$ emcoctl apply -f 01-cluster.yaml -v values.yaml` `$ emcoctl apply -f 02-project.yaml -v values.yaml` -## Deploying addons +## Create addons project -This deploys the applications listed in the `Addons` and -`AddonResources` values. +This creates the project with the addons listed `CompositeApps` value. `$ emcoctl apply -f 03-addons-app.yaml -v values.yaml` - `$ emcoctl apply -f 04-addon-resources-app.yaml -v values.yaml` + +## Instantiate the addons + +This instantiates each composite app listed in the `CompositeApps` +value. + +NOTE: The ordering is important when both the sriov-network and +kubevirt addons are enabled. The sriov-network addon will trigger a +drain of the nodes and kubevirt will prevent the drain from +completing, so kubevirt must be instantiated after sriov-network has +completed the drain. + + `$ emcoctl apply projects/kud/composite-apps/addons/v1/deployment-intent-groups/deployment/instantiate` + `$ emcoctl apply projects/kud/composite-apps/networks/v1/deployment-intent-groups/deployment/instantiate` + `$ emcoctl apply projects/kud/composite-apps/kubevirt/v1/deployment-intent-groups/deployment/instantiate` ## Cleanup -1. Delete addons. +1. Terminate addons. + + `$ emcoctl apply projects/kud/composite-apps/kubevirt/v1/deployment-intent-groups/deployment/terminate` + `$ emcoctl apply projects/kud/composite-apps/networks/v1/deployment-intent-groups/deployment/terminate` + `$ emcoctl apply projects/kud/composite-apps/addons/v1/deployment-intent-groups/deployment/terminate` + +2. Delete addons. - `$ emcoctl delete -f 04-addon-resources-app.yaml -v values.yaml` `$ emcoctl delete -f 03-addons-app.yaml -v values.yaml` -2. Cleanup prerequisites. +3. Cleanup prerequisites. `$ emcoctl delete -f 02-project.yaml -v values.yaml` `$ emcoctl delete -f 01-cluster.yaml -v values.yaml` -- cgit 1.2.3-korg