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; }
public IngressBuilder(Boolean validationEnabled){ this(new Ingress(), validationEnabled); } public IngressBuilder(IngressFluent<?> fluent){
public IngressFluentImpl(Ingress instance){ this.withApiVersion(instance.getApiVersion()); this.withKind(instance.getKind()); this.withMetadata(instance.getMetadata()); this.withSpec(instance.getSpec()); this.withStatus(instance.getStatus()); }
@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(); }
.build(); Map<String, String> labelsFromIngress = ingress.getMetadata().getLabels(); Map<String, String> labelsToSet = new LinkedHashMap<>(); ingress.getMetadata().setLabels(labelsToSet);
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){
Ingress ingress = (Ingress) resource; Ingress result = client.extensions().ingresses().inNamespace(namespace).create(ingress); log.info("Created Ingress : " + result.getMetadata().getName() + " in Namespace : " + result.getMetadata().getNamespace() + " in " + cmsType); } else { log.info("There exist an ingress with the same name in " + cmsType + ". Ingress name : "
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; }
String serviceName = KubernetesHelper.getName(service); for (Ingress ingress : ingresses) { IngressSpec spec = ingress.getSpec(); if (spec == null) { break;
Ingress ingress = (Ingress) resource; Ingress result = client.extensions().ingresses().inNamespace(namespace).create(ingress); log.info("Created Ingress : " + result.getMetadata().getName() + " in Namespace : " + result.getMetadata().getNamespace() + " in " + cmsType); } else { log.info("There exist an ingress with the same name in " + cmsType + ". Ingress name : "
public IngressBuilder(IngressFluent<?> fluent,Boolean validationEnabled){ this(fluent, new Ingress(), validationEnabled); } public IngressBuilder(IngressFluent<?> fluent,Ingress instance){
String ns = KubernetesHelper.getNamespace(item); if (Objects.equal(serviceNamespace, ns)) { IngressSpec spec = item.getSpec(); if (spec != null) { List<IngressRule> rules = spec.getRules();
public Ingress build(){ Ingress buildable = new Ingress(fluent.getApiVersion(),fluent.getKind(),fluent.getMetadata(),fluent.getSpec(),fluent.getStatus()); validate(buildable); return buildable; }