Search in sources :

Example 1 with RouteIngress

use of io.fabric8.openshift.api.model.RouteIngress 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);
}
Also used : RouteSpecBuilder(io.fabric8.openshift.api.model.RouteSpecBuilder) RouteTargetReference(io.fabric8.openshift.api.model.RouteTargetReference) RouteIngressBuilder(io.fabric8.openshift.api.model.RouteIngressBuilder) RouteTargetReferenceBuilder(io.fabric8.openshift.api.model.RouteTargetReferenceBuilder) RouteIngress(io.fabric8.openshift.api.model.RouteIngress) RouteSpec(io.fabric8.openshift.api.model.RouteSpec) RouteIngressConditionBuilder(io.fabric8.openshift.api.model.RouteIngressConditionBuilder) RouteStatus(io.fabric8.openshift.api.model.RouteStatus) RouteStatusBuilder(io.fabric8.openshift.api.model.RouteStatusBuilder) Route(io.fabric8.openshift.api.model.Route)

Example 2 with RouteIngress

use of io.fabric8.openshift.api.model.RouteIngress 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);
}
Also used : RouteSpecBuilder(io.fabric8.openshift.api.model.RouteSpecBuilder) RouteTargetReference(io.fabric8.openshift.api.model.RouteTargetReference) RouteIngressBuilder(io.fabric8.openshift.api.model.RouteIngressBuilder) RouteTargetReferenceBuilder(io.fabric8.openshift.api.model.RouteTargetReferenceBuilder) RouteIngress(io.fabric8.openshift.api.model.RouteIngress) RouteSpec(io.fabric8.openshift.api.model.RouteSpec) RouteIngressConditionBuilder(io.fabric8.openshift.api.model.RouteIngressConditionBuilder) RouteStatus(io.fabric8.openshift.api.model.RouteStatus) RouteStatusBuilder(io.fabric8.openshift.api.model.RouteStatusBuilder) Route(io.fabric8.openshift.api.model.Route)

Aggregations

Route (io.fabric8.openshift.api.model.Route)2 RouteIngress (io.fabric8.openshift.api.model.RouteIngress)2 RouteIngressBuilder (io.fabric8.openshift.api.model.RouteIngressBuilder)2 RouteIngressConditionBuilder (io.fabric8.openshift.api.model.RouteIngressConditionBuilder)2 RouteSpec (io.fabric8.openshift.api.model.RouteSpec)2 RouteSpecBuilder (io.fabric8.openshift.api.model.RouteSpecBuilder)2 RouteStatus (io.fabric8.openshift.api.model.RouteStatus)2 RouteStatusBuilder (io.fabric8.openshift.api.model.RouteStatusBuilder)2 RouteTargetReference (io.fabric8.openshift.api.model.RouteTargetReference)2 RouteTargetReferenceBuilder (io.fabric8.openshift.api.model.RouteTargetReferenceBuilder)2