1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-06 06:46:26 +01:00
Files
openshift-docs/modules/virt-example-node-placement-node-selector-hpp.adoc
2021-02-10 15:38:53 -05:00

24 lines
783 B
Plaintext

// Module included in the following assemblies:
//
// * virt/install/virt-specifying-nodes-for-virtualization-components.adoc
[id="virt-example-node-placement-node-selector-hpp_{context}"]
= Example: Node placement with nodeSelector in the HostPathProvisioner object
In this example, `nodeSelector` is configured so that workloads are placed on nodes labeled with `example.io/example-workloads-key = example-workloads-value`.
[source,yaml]
----
apiVersion: hostpathprovisioner.kubevirt.io/v1beta1
kind: HostPathProvisioner
metadata:
name: hostpath-provisioner
spec:
imagePullPolicy: IfNotPresent
pathConfig:
path: "</path/to/backing/directory>"
useNamingPrefix: false
workload:
nodeSelector:
example.io/example-workloads-key: example-workloads-value
----