mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-05 21:46:22 +01:00
24 lines
783 B
Plaintext
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
|
|
---- |