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;
}
Aggregations