use of io.fabric8.openshift.api.model.RouteIngressConditionBuilder in project sandbox by 5733d9e2be6485d52ffa08870cabdee0.
the class OpenshiftNetworkingTestUtils method patchNetworkResource.
@Override
public void patchNetworkResource(String name, String namespace) {
Route route = client.routes().inNamespace(namespace).withName(name).get();
RouteTargetReference routeTargetReference = new RouteTargetReferenceBuilder().withName(name).withKind("Service").build();
RouteSpec routeSpec = new RouteSpecBuilder().withHost(NetworkingTestConstants.HOST_IP + "/" + name).withTo(routeTargetReference).build();
route.setSpec(routeSpec);
RouteIngress routeIngress = new RouteIngressBuilder().withConditions(new RouteIngressConditionBuilder().withType("Admitted").build()).build();
RouteStatus routeStatus = new RouteStatusBuilder().withIngress(routeIngress).build();
route.setStatus(routeStatus);
client.routes().inNamespace(namespace).createOrReplace(route);
}
use of io.fabric8.openshift.api.model.RouteIngressConditionBuilder in project sandbox by 5733d9e2be6485d52ffa08870cabdee0.
the class OpenshiftNetworkingTestUtils method patchNetworkResource.
@Override
public void patchNetworkResource(String name, String namespace) {
Route route = client.routes().inNamespace(namespace).withName(name).get();
RouteTargetReference routeTargetReference = new RouteTargetReferenceBuilder().withName(name).withKind("Service").build();
RouteSpec routeSpec = new RouteSpecBuilder().withHost(NetworkingTestConstants.HOST_IP + "/" + name).withTo(routeTargetReference).build();
route.setSpec(routeSpec);
RouteIngress routeIngress = new RouteIngressBuilder().withConditions(new RouteIngressConditionBuilder().withType("Admitted").build()).build();
RouteStatus routeStatus = new RouteStatusBuilder().withIngress(routeIngress).build();
route.setStatus(routeStatus);
client.routes().inNamespace(namespace).createOrReplace(route);
}
Aggregations