Search in sources :

Example 1 with IngressStatusBuilder

use of io.fabric8.kubernetes.api.model.networking.v1.IngressStatusBuilder in project sandbox by 5733d9e2be6485d52ffa08870cabdee0.

the class KubernetesNetworkingTestUtils method patchNetworkResource.

@Override
public void patchNetworkResource(String name, String namespace) {
    Ingress i = client.network().v1().ingresses().inNamespace(namespace).withName(name).get();
    IngressStatus ingressStatus = new IngressStatusBuilder().withLoadBalancer(new LoadBalancerStatusBuilder().withIngress(new LoadBalancerIngressBuilder().withHostname(name).withIp(NetworkingTestConstants.HOST_IP).build()).build()).build();
    i.setStatus(ingressStatus);
    client.network().v1().ingresses().inNamespace(namespace).createOrReplace(i);
}
Also used : IngressStatusBuilder(io.fabric8.kubernetes.api.model.networking.v1.IngressStatusBuilder) IngressStatus(io.fabric8.kubernetes.api.model.networking.v1.IngressStatus) Ingress(io.fabric8.kubernetes.api.model.networking.v1.Ingress) LoadBalancerIngressBuilder(io.fabric8.kubernetes.api.model.LoadBalancerIngressBuilder) LoadBalancerStatusBuilder(io.fabric8.kubernetes.api.model.LoadBalancerStatusBuilder)

Example 2 with IngressStatusBuilder

use of io.fabric8.kubernetes.api.model.networking.v1.IngressStatusBuilder in project sandbox by 5733d9e2be6485d52ffa08870cabdee0.

the class KubernetesNetworkingTestUtils method patchNetworkResource.

@Override
public void patchNetworkResource(String name, String namespace) {
    Ingress i = client.network().v1().ingresses().inNamespace(namespace).withName(name).get();
    IngressStatus ingressStatus = new IngressStatusBuilder().withLoadBalancer(new LoadBalancerStatusBuilder().withIngress(new LoadBalancerIngressBuilder().withHostname(name).withIp(NetworkingTestConstants.HOST_IP).build()).build()).build();
    i.setStatus(ingressStatus);
    client.network().v1().ingresses().inNamespace(namespace).createOrReplace(i);
}
Also used : IngressStatusBuilder(io.fabric8.kubernetes.api.model.networking.v1.IngressStatusBuilder) IngressStatus(io.fabric8.kubernetes.api.model.networking.v1.IngressStatus) Ingress(io.fabric8.kubernetes.api.model.networking.v1.Ingress) LoadBalancerIngressBuilder(io.fabric8.kubernetes.api.model.LoadBalancerIngressBuilder) LoadBalancerStatusBuilder(io.fabric8.kubernetes.api.model.LoadBalancerStatusBuilder)

Aggregations

LoadBalancerIngressBuilder (io.fabric8.kubernetes.api.model.LoadBalancerIngressBuilder)2 LoadBalancerStatusBuilder (io.fabric8.kubernetes.api.model.LoadBalancerStatusBuilder)2 Ingress (io.fabric8.kubernetes.api.model.networking.v1.Ingress)2 IngressStatus (io.fabric8.kubernetes.api.model.networking.v1.IngressStatus)2 IngressStatusBuilder (io.fabric8.kubernetes.api.model.networking.v1.IngressStatusBuilder)2