openshift-virtualization

by tjungbauer

Helm chartv1.0.3Apache-2.0Verified publisher

Configure the operator Openshift Virtualization (HyperConverged and HostPath Provisioner)

About this chart

openshift-virtualization

Description

Configure the operator Openshift Virtualization (HyperConverged and HostPath Provisioner)

This Helm Chart is configuring OpenShift Virtualization Operator. This means is is responsible to configure HyperConverged and HostPathProvisioner resources.

It does not create new VMs and template configurations. Moreover, additional Operators, such as NMState Operator, might be required for your whole setup. It can be used be the built in database, or an example and hardcoded postgres instance, or with your very own configuration.

NOTE: This is an evolving chart. I am trying to cover most settings, but especially the HyperConverged resource is quite big. If you miss any setting, please let me know or create a PR.

Be sure to follow the documentation for additional settings, supported features and more at, for example: https://docs.redhat.com/

Dependencies

This chart has the following dependencies:

RepositoryNameVersion
https://charts.stderr.at/tpl~1.0.27

It is best used with a full GitOps approach such as Argo CD does. For example, https://github.com/tjungbauer/openshift-clusterconfig-gitops

Maintainers

NameEmailUrl
tjungbauer[email protected]https://blog.stderr.at/

Sources

Source:

Source code: https://github.com/tjungbauer/helm-charts/tree/main/charts/openshift-virtualization

Parameters

Verify the subcharts for additional settings:

Values

KeyTypeDefaultDescription
hostPathProvisioner.additionalAnnotationsobject{}Additional annotations to add to the HostPathProvisioner resource
hostPathProvisioner.additionalLabelsobject{}Additional labels to add to the HostPathProvisioner resource
hostPathProvisioner.enabledboolfalseEnable HostPathProvisioner for local storage provisioning
hostPathProvisioner.featureGateslist[]Feature gates for HostPathProvisioner
hostPathProvisioner.imagePullPolicystringIfNotPresentImage pull policy for HostPathProvisioner containers Allowed values: Always, IfNotPresent, Never
hostPathProvisioner.namestringhostpath-provisionerName of the HostPathProvisioner resource
hostPathProvisioner.namespacestringopenshift-cnvNamespace where HostPathProvisioner is installed
hostPathProvisioner.pathConfigobject{"path":"/var/hpvolumes","useNamingPrefix":false}PathConfig describes the location and layout of PV storage on nodes. Deprecated
hostPathProvisioner.pathConfig.pathstring/var/hpvolumesThe path the directories for the PVs are created under Must be an absolute path starting with '/'
hostPathProvisioner.pathConfig.useNamingPrefixboolfalseUse the name of the PVC requesting the PV as part of the directory created
hostPathProvisioner.storagePoollist[]Storage pool configuration for the provisioner Can be either a string for simple configuration or a list for advanced configuration with PVC templates
hostPathProvisioner.storagePool[0]object"local"Name specifies an identifier that is used in the storage class arguments to identify the source to use.
hostPathProvisioner.storagePool[0].pathstring"/var/hpvolumes"the path to use on the host, this is a required field
hostPathProvisioner.storagePool[0].pvcTemplateobject{}PVCTemplate is the template of the PVC to create as the source volume
hostPathProvisioner.storagePool[0].pvcTemplate.accessModeslist[]accessModes contains the desired access modes the volume should have.
hostPathProvisioner.storagePool[0].pvcTemplate.dataSourceobject{}dataSource field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) * An existing PVC (PersistentVolumeClaim) If the provisioner or an external controller can support the specified data source, it will create a new volume based on the contents of the specified data source. When the AnyVolumeDataSource feature gate is enabled, dataSource contents will be copied to dataSourceRef, and dataSourceRef contents will be copied to dataSource when dataSourceRef.namespace is not specified. If the namespace is specified, then dataSourceRef will not be copied to dataSource.
hostPathProvisioner.storagePool[0].pvcTemplate.dataSourceRefobject{}dataSourceRef specifies the object from which to populate the volume with data, if a non-empty volume is desired. This may be any object from a non-empty API group (non core object) or a PersistentVolumeClaim object. When this field is specified, volume binding will only succeed if the type of the specified object matches some installed volume populator or dynamic provisioner. This field will replace the functionality of the dataSource field and as such if both fields are non-empty, they must have the same value. For backwards compatibility, when namespace isn't specified in dataSourceRef, both fields (dataSource and dataSourceRef) will be set to the same value automatically if one of them is empty and the other is non-empty. When namespace is specified in dataSourceRef, dataSource isn't set to the same value and must be empty. There are three important differences between dataSource and dataSourceRef: * While dataSource only allows two specific types of objects, dataSourceRef allows any non-core object, as well as PersistentVolumeClaim objects. * While dataSource ignores disallowed values (dropping them), dataSourceRef preserves all values, and generates an error if a disallowed value is specified. * While dataSource only allows local objects, dataSourceRef allows objects in any namespaces. (Beta) Using this field requires the AnyVolumeDataSource feature gate to be enabled. (Alpha) Using the namespace field of dataSourceRef requires the CrossNamespaceVolumeDataSource feature gate to be enabled.
hostPathProvisioner.storagePool[0].pvcTemplate.resourcesobjectrequests.storage: 50Giresources contains the desired resources the volume should have.
hostPathProvisioner.storagePool[0].pvcTemplate.selectorobject{}selector is a label query over volumes to consider for binding.
hostPathProvisioner.storagePool[0].pvcTemplate.storageClassNamestring""storageClassName is the name of the StorageClass required by the claim.
hostPathProvisioner.storagePool[0].pvcTemplate.volumeAttributesClassNamestring""volumeAttributesClassName may be used to set the VolumeAttributesClass used by this claim.
hostPathProvisioner.storagePool[0].pvcTemplate.volumeModestring""volumeMode defines what type of volume is required by the claim.
hostPathProvisioner.storagePool[0].pvcTemplate.volumeNamestring""volumeName is the binding reference to the PersistentVolume backing this claim.
hostPathProvisioner.workloadobject{"affinity":{},"nodeSelector":{},"tolerations":[]}Workload placement configuration for HostPathProvisioner pods
hostPathProvisioner.workload.affinityobject{}Affinity rules for HostPathProvisioner pods
hostPathProvisioner.workload.nodeSelectorobject{}Node selector for HostPathProvisioner pods
hostPathProvisioner.workload.tolerationslist[]Tolerations for HostPathProvisioner pods
virtualization.additionalAnnotationsobject{}Additional annotations to add to the HyperConverged resource
virtualization.additionalLabelsobject{}Additional labels to add to the HyperConverged resource
virtualization.applicationAwareConfigobject{}ApplicationAwareConfig set the AAQ configurations
virtualization.applicationAwareConfig.allowApplicationAwareClusterResourceQuotaboolfalseAllowApplicationAwareClusterResourceQuota if set to true, allows creation and management of ClusterAppsResourceQuota
virtualization.applicationAwareConfig.namespaceSelectorobject{}NamespaceSelector determines in which namespaces scheduling gate will be added to pods..
virtualization.applicationAwareConfig.vmiCalcConfigNamestring""VmiCalcConfigName determine how resource allocation will be done with ApplicationsResourceQuota. Allowed values: VmiPodUsage, VirtualResources, DedicatedVirtualResources or IgnoreVmiCalculator
virtualization.certConfigobject{"ca":{"duration":"48h0m0s","renewBefore":"24h0m0s"},"server":{"duration":"24h0m0s","renewBefore":"12h0m0s"}}certConfig holds the rotation policy for internal, self-signed certificates
virtualization.certConfig.caobject{"duration":"48h0m0s","renewBefore":"24h0m0s"}Certificate Authority configuration
virtualization.certConfig.ca.durationstring48h0m0sCA certificate duration
virtualization.certConfig.ca.renewBeforestring24h0m0sCA certificate renewal time before expiry
virtualization.certConfig.serverobject{"duration":"24h0m0s","renewBefore":"12h0m0s"}Server certificate configuration
virtualization.certConfig.server.durationstring24h0m0sServer certificate duration
virtualization.certConfig.server.renewBeforestring12h0m0sServer certificate renewal time before expiry
virtualization.commonBootImageNamespacestring""commonBootImageNamespaceCommonBootImageNamespace override the default namespace of the common boot images, in order to hide them. If not set, HCO won't set any namespace, letting SSP to use the default. If set, use the namespace to create the DataImportCronTemplates and the common image streams, with this namespace. This field is not set by default.
virtualization.commonInstancetypesDeploymentstringtrueCommonInstancetypesDeployment holds the configuration of common-instancetypes deployment within KubeVirt. Enabled controls the deployment of common-instancetypes resources, defaults to True.
virtualization.commonTemplatesNamespacestring"openshift"User can specify namespace in which common templates will be deployed. This will override default openshift namespace.
virtualization.defaultCPUModelstring""defines a cluster default for CPU model: default CPU model is set when VMI doesn't have any CPU model.
virtualization.defaultRuntimeClassstring""DefaultRuntimeClass defines a cluster default for the RuntimeClass to be used for VMIs pods if not set there. Default RuntimeClass can be changed when kubevirt is running, existing VMIs are not impacted till the next restart/live-migration when they are eventually going to consume the new default RuntimeClass.
virtualization.deployOVSboolfalseOvS Opt-In Label - Controls whether Open vSwitch (OvS) Container Network Interface (CNI) is deployed
virtualization.deployVmConsoleProxyboolfalseDeploy VM Console Proxy for remote console access.
virtualization.enableApplicationAwareQuotaboolfalseEnableApplicationAwareQuota if true, enables the Application Aware Quota feature
virtualization.enableCommonBootImageImportbooltrueEnable common boot image import from external registries Opt-in to automatic delivery/updates of the common data import cron templates. There are two sources for the data import cron templates: hard coded list of common templates, and custom templates that can be added to the dataImportCronTemplates field. This feature gates only control the common templates. It is possible to use custom templates by adding them to the dataImportCronTemplates field.
virtualization.enabledboolfalseEnable OpenShift Virtualization (CNV) configuration. This will configure the HyperConverged resource.
virtualization.evictionStrategystring""EvictionStrategy defines at the cluster level if the VirtualMachineInstance should be migrated instead of shut-off in case of a node drain. If the VirtualMachineInstance specific field is set it overrides the cluster level one. Allowed values: None no eviction strategy at cluster level. LiveMigrate migrate the VM on eviction; a not live migratable VM with no specific strategy will block the drain of the node util manually evicted. LiveMigrateIfPossible migrate the VM on eviction if live migration is possible, otherwise directly evict. External block the drain, track eviction and notify an external controller. Defaults to LiveMigrate with multiple worker nodes, None on single worker clusters.
virtualization.featureGatesobject{"alignCPUs":false,"deployKubeSecondaryDNS":false,"disableMDevConfiguration":false,"downwardMetrics":false,"persistentReservation":false}Feature gates for OpenShift Virtualization
virtualization.featureGates.alignCPUsboolfalseSet the alignCPUs feature gate to enable KubeVirt to request up to two additional dedicated CPUs in order to complete the total CPU cou

Deploy openshift-virtualization with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has openshift-virtualization on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartopenshift-virtualization is pinned at v1.0.3 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply