Search in sources :

Example 1 with NodeAffinityBuilder

use of io.fabric8.kubernetes.api.model.NodeAffinityBuilder in project stackgres by ongres.

the class NodeAffinityFixture method build.

public NodeAffinity build() {
    NodeAffinity nodeAffinity = new NodeAffinity();
    io.fabric8.kubernetes.api.model.NodeAffinity k8sNodeAffinity = new NodeAffinityBuilder().withRequiredDuringSchedulingIgnoredDuringExecution(requireds).withPreferredDuringSchedulingIgnoredDuringExecution(preference).build();
    nodeAffinity.setPreferredDuringSchedulingIgnoredDuringExecution(k8sNodeAffinity.getPreferredDuringSchedulingIgnoredDuringExecution());
    nodeAffinity.setRequiredDuringSchedulingIgnoredDuringExecution(k8sNodeAffinity.getRequiredDuringSchedulingIgnoredDuringExecution());
    return nodeAffinity;
}
Also used : NodeAffinity(io.stackgres.common.crd.NodeAffinity) NodeAffinityBuilder(io.fabric8.kubernetes.api.model.NodeAffinityBuilder)

Aggregations

NodeAffinityBuilder (io.fabric8.kubernetes.api.model.NodeAffinityBuilder)1 NodeAffinity (io.stackgres.common.crd.NodeAffinity)1