public static String getURLFromIngressList(List<Ingress> ingressList, String namespace, String serviceName, ServicePort port) { for(Ingress item : ingressList) { String ns = getNamespace(item); if(Objects.equals(ns, namespace) && item.getSpec() != null) { return getURLFromIngressSpec(item.getSpec(), serviceName, port); } } return null; }
String serviceName = KubernetesHelper.getName(service); for (Ingress ingress : ingresses) { IngressSpec spec = ingress.getSpec(); if (spec == null) { break;
public IngressFluentImpl(Ingress instance){ this.withApiVersion(instance.getApiVersion()); this.withKind(instance.getKind()); this.withMetadata(instance.getMetadata()); this.withSpec(instance.getSpec()); this.withStatus(instance.getStatus()); }
public IngressBuilder(IngressFluent<?> fluent,Ingress instance,Boolean validationEnabled){ this.fluent = fluent; fluent.withApiVersion(instance.getApiVersion()); fluent.withKind(instance.getKind()); fluent.withMetadata(instance.getMetadata()); fluent.withSpec(instance.getSpec()); fluent.withStatus(instance.getStatus()); this.validationEnabled = validationEnabled; } public IngressBuilder(Ingress instance){
public IngressBuilder(Ingress instance,Boolean validationEnabled){ this.fluent = this; this.withApiVersion(instance.getApiVersion()); this.withKind(instance.getKind()); this.withMetadata(instance.getMetadata()); this.withSpec(instance.getSpec()); this.withStatus(instance.getStatus()); this.validationEnabled = validationEnabled; }
@Override Ingress applyResource(Ingress original, Ingress current) { return client .extensions() .ingresses() .inNamespace(getNamespace()) .withName(current.getMetadata().getName()) .edit() .withMetadata(current.getMetadata()) .withSpec(current.getSpec()) .done(); }
String ns = KubernetesHelper.getNamespace(item); if (Objects.equal(serviceNamespace, ns)) { IngressSpec spec = item.getSpec(); if (spec != null) { List<IngressRule> rules = spec.getRules();