use of org.eclipse.jkube.kit.config.resource.IngressRulePathConfig in project jkube by eclipse.
the class NetworkingV1IngressGenerator method getIngressRuleFromXmlConfig.
private static IngressRule getIngressRuleFromXmlConfig(IngressRuleConfig ingressRuleConfig) {
IngressRuleBuilder ingressRuleBuilder = new IngressRuleBuilder();
if (ingressRuleConfig.getHost() != null) {
ingressRuleBuilder.withHost(ingressRuleConfig.getHost());
}
if (ingressRuleConfig.getPaths() != null && !ingressRuleConfig.getPaths().isEmpty()) {
HTTPIngressRuleValueBuilder httpIngressPathBuilder = new HTTPIngressRuleValueBuilder();
for (IngressRulePathConfig ingressRulePathConfig : ingressRuleConfig.getPaths()) {
httpIngressPathBuilder.addToPaths(getHTTPIngressPath(ingressRulePathConfig));
}
ingressRuleBuilder.withHttp(httpIngressPathBuilder.build());
}
return ingressRuleBuilder.build();
}
Aggregations