public static String getURLFromIngressRules(List<HTTPIngressPath> paths, IngressSpec spec, String serviceName, ServicePort port, IngressRule rule) { for(HTTPIngressPath path : paths) { IngressBackend backend = path.getBackend(); if(backend != null) { String backendServiceName = backend.getServiceName(); if(serviceName.equals(backendServiceName) && portsMatch(port, backend.getServicePort())) { String pathPostFix = path.getPath(); if(spec.getTls() != null) { return getURLFromTLSHost(rule, pathPostFix); } String answer = rule.getHost(); if(answer != null && !answer.isEmpty()) { pathPostFix = fixPathPostFixIfEmpty(pathPostFix); return "http://" + URLUtils.pathJoin(answer, pathPostFix); } } } } return null; }
public IngressBackendBuilder(IngressBackendFluent<?> fluent,Boolean validationEnabled){ this(fluent, new IngressBackend(), validationEnabled); } public IngressBackendBuilder(IngressBackendFluent<?> fluent,IngressBackend instance){
break; if (Objects.equals(serviceName, backend.getServiceName())) { return true;
public IngressBackendBuilder(IngressBackendFluent<?> fluent,IngressBackend instance,Boolean validationEnabled){ this.fluent = fluent; fluent.withServiceName(instance.getServiceName()); fluent.withServicePort(instance.getServicePort()); this.validationEnabled = validationEnabled; } public IngressBackendBuilder(IngressBackend instance){
public IngressBackendBuilder(Boolean validationEnabled){ this(new IngressBackend(), validationEnabled); } public IngressBackendBuilder(IngressBackendFluent<?> fluent){
public IngressBackendBuilder(IngressBackend instance,Boolean validationEnabled){ this.fluent = this; this.withServiceName(instance.getServiceName()); this.withServicePort(instance.getServicePort()); this.validationEnabled = validationEnabled; }
public IngressBackend build(){ IngressBackend buildable = new IngressBackend(fluent.getServiceName(),fluent.getServicePort()); validate(buildable); return buildable; }
public IngressBackendFluentImpl(IngressBackend instance){ this.withServiceName(instance.getServiceName()); this.withServicePort(instance.getServicePort()); }
IngressBackend backend = path.getBackend(); if (backend != null) { String backendServiceName = backend.getServiceName(); if (serviceName.equals(backendServiceName) && portsMatch(port, backend.getServicePort())) { String pathPostfix = path.getPath(); if (tls != null) {