openshift-virtualization
by tjungbauer
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:
| Repository | Name | Version |
|---|---|---|
| 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
| Name | Url | |
|---|---|---|
| tjungbauer | [email protected] | https://blog.stderr.at/ |
Sources
Source:
- https://github.com/tjungbauer/helm-charts
- https://charts.stderr.at/
- https://github.com/tjungbauer/openshift-clusterconfig-gitops
Source code: https://github.com/tjungbauer/helm-charts/tree/main/charts/openshift-virtualization
Parameters
Verify the subcharts for additional settings:
Values
| Key | Type | Default | Description |
|---|---|---|---|
| hostPathProvisioner.additionalAnnotations | object | {} | Additional annotations to add to the HostPathProvisioner resource |
| hostPathProvisioner.additionalLabels | object | {} | Additional labels to add to the HostPathProvisioner resource |
| hostPathProvisioner.enabled | bool | false | Enable HostPathProvisioner for local storage provisioning |
| hostPathProvisioner.featureGates | list | [] | Feature gates for HostPathProvisioner |
| hostPathProvisioner.imagePullPolicy | string | IfNotPresent | Image pull policy for HostPathProvisioner containers Allowed values: Always, IfNotPresent, Never |
| hostPathProvisioner.name | string | hostpath-provisioner | Name of the HostPathProvisioner resource |
| hostPathProvisioner.namespace | string | openshift-cnv | Namespace where HostPathProvisioner is installed |
| hostPathProvisioner.pathConfig | object | {"path":"/var/hpvolumes","useNamingPrefix":false} | PathConfig describes the location and layout of PV storage on nodes. Deprecated |
| hostPathProvisioner.pathConfig.path | string | /var/hpvolumes | The path the directories for the PVs are created under Must be an absolute path starting with '/' |
| hostPathProvisioner.pathConfig.useNamingPrefix | bool | false | Use the name of the PVC requesting the PV as part of the directory created |
| hostPathProvisioner.storagePool | list | [] | 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].path | string | "/var/hpvolumes" | the path to use on the host, this is a required field |
| hostPathProvisioner.storagePool[0].pvcTemplate | object | {} | PVCTemplate is the template of the PVC to create as the source volume |
| hostPathProvisioner.storagePool[0].pvcTemplate.accessModes | list | [] | accessModes contains the desired access modes the volume should have. |
| hostPathProvisioner.storagePool[0].pvcTemplate.dataSource | object | {} | 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.dataSourceRef | object | {} | 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.resources | object | requests.storage: 50Gi | resources contains the desired resources the volume should have. |
| hostPathProvisioner.storagePool[0].pvcTemplate.selector | object | {} | selector is a label query over volumes to consider for binding. |
| hostPathProvisioner.storagePool[0].pvcTemplate.storageClassName | string | "" | storageClassName is the name of the StorageClass required by the claim. |
| hostPathProvisioner.storagePool[0].pvcTemplate.volumeAttributesClassName | string | "" | volumeAttributesClassName may be used to set the VolumeAttributesClass used by this claim. |
| hostPathProvisioner.storagePool[0].pvcTemplate.volumeMode | string | "" | volumeMode defines what type of volume is required by the claim. |
| hostPathProvisioner.storagePool[0].pvcTemplate.volumeName | string | "" | volumeName is the binding reference to the PersistentVolume backing this claim. |
| hostPathProvisioner.workload | object | {"affinity":{},"nodeSelector":{},"tolerations":[]} | Workload placement configuration for HostPathProvisioner pods |
| hostPathProvisioner.workload.affinity | object | {} | Affinity rules for HostPathProvisioner pods |
| hostPathProvisioner.workload.nodeSelector | object | {} | Node selector for HostPathProvisioner pods |
| hostPathProvisioner.workload.tolerations | list | [] | Tolerations for HostPathProvisioner pods |
| virtualization.additionalAnnotations | object | {} | Additional annotations to add to the HyperConverged resource |
| virtualization.additionalLabels | object | {} | Additional labels to add to the HyperConverged resource |
| virtualization.applicationAwareConfig | object | {} | ApplicationAwareConfig set the AAQ configurations |
| virtualization.applicationAwareConfig.allowApplicationAwareClusterResourceQuota | bool | false | AllowApplicationAwareClusterResourceQuota if set to true, allows creation and management of ClusterAppsResourceQuota |
| virtualization.applicationAwareConfig.namespaceSelector | object | {} | NamespaceSelector determines in which namespaces scheduling gate will be added to pods.. |
| virtualization.applicationAwareConfig.vmiCalcConfigName | string | "" | VmiCalcConfigName determine how resource allocation will be done with ApplicationsResourceQuota. Allowed values: VmiPodUsage, VirtualResources, DedicatedVirtualResources or IgnoreVmiCalculator |
| virtualization.certConfig | object | {"ca":{"duration":"48h0m0s","renewBefore":"24h0m0s"},"server":{"duration":"24h0m0s","renewBefore":"12h0m0s"}} | certConfig holds the rotation policy for internal, self-signed certificates |
| virtualization.certConfig.ca | object | {"duration":"48h0m0s","renewBefore":"24h0m0s"} | Certificate Authority configuration |
| virtualization.certConfig.ca.duration | string | 48h0m0s | CA certificate duration |
| virtualization.certConfig.ca.renewBefore | string | 24h0m0s | CA certificate renewal time before expiry |
| virtualization.certConfig.server | object | {"duration":"24h0m0s","renewBefore":"12h0m0s"} | Server certificate configuration |
| virtualization.certConfig.server.duration | string | 24h0m0s | Server certificate duration |
| virtualization.certConfig.server.renewBefore | string | 12h0m0s | Server certificate renewal time before expiry |
| virtualization.commonBootImageNamespace | string | "" | 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.commonInstancetypesDeployment | string | true | CommonInstancetypesDeployment holds the configuration of common-instancetypes deployment within KubeVirt. Enabled controls the deployment of common-instancetypes resources, defaults to True. |
| virtualization.commonTemplatesNamespace | string | "openshift" | User can specify namespace in which common templates will be deployed. This will override default openshift namespace. |
| virtualization.defaultCPUModel | string | "" | defines a cluster default for CPU model: default CPU model is set when VMI doesn't have any CPU model. |
| virtualization.defaultRuntimeClass | string | "" | 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.deployOVS | bool | false | OvS Opt-In Label - Controls whether Open vSwitch (OvS) Container Network Interface (CNI) is deployed |
| virtualization.deployVmConsoleProxy | bool | false | Deploy VM Console Proxy for remote console access. |
| virtualization.enableApplicationAwareQuota | bool | false | EnableApplicationAwareQuota if true, enables the Application Aware Quota feature |
| virtualization.enableCommonBootImageImport | bool | true | Enable 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.enabled | bool | false | Enable OpenShift Virtualization (CNV) configuration. This will configure the HyperConverged resource. |
| virtualization.evictionStrategy | string | "" | 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.featureGates | object | {"alignCPUs":false,"deployKubeSecondaryDNS":false,"disableMDevConfiguration":false,"downwardMetrics":false,"persistentReservation":false} | Feature gates for OpenShift Virtualization |
| virtualization.featureGates.alignCPUs | bool | false | Set 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.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartopenshift-virtualization is pinned at v1.0.3 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- 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