From 05d6c2f0a9c8427e0539ed935f662a3956dbb53e Mon Sep 17 00:00:00 2001 From: Devang Gaur Date: Fri, 8 Nov 2019 19:31:25 +0530 Subject: [PATCH] Fixed IngressEnricher and RouteEnricher --- .../maven/core/config/ResourceConfig.java | 23 ++-- .../config/profiles-lookup-dir/profiles.yaml | 3 +- doc/src/main/asciidoc/inc/_profiles.adoc | 1 + .../standard/DefaultNamespaceEnricher.java | 9 +- .../enricher/standard/IngressEnricher.java | 111 ++++++++++++--- .../standard/openshift/RouteEnricher.java | 127 ++++++++++++++---- .../expected/openshift.yml | 1 - .../plugin/enricher/EnricherManager.java | 11 +- .../maven/plugin/mojo/build/ApplyMojo.java | 2 +- .../maven/plugin/mojo/build/ResourceMojo.java | 11 ++ .../META-INF/fabric8/profiles-default.yml | 8 +- samples/spring-boot-with-yaml/pom.xml | 3 +- 12 files changed, 235 insertions(+), 75 deletions(-) diff --git a/core/src/main/java/io/fabric8/maven/core/config/ResourceConfig.java b/core/src/main/java/io/fabric8/maven/core/config/ResourceConfig.java index de676d0b9a..70bca8f602 100644 --- a/core/src/main/java/io/fabric8/maven/core/config/ResourceConfig.java +++ b/core/src/main/java/io/fabric8/maven/core/config/ResourceConfig.java @@ -92,7 +92,10 @@ public class ResourceConfig { @Parameter private List serviceAccounts; - private List ingressRules; + /** + * Host/domain for Route/Ingress. + */ + private String routeDomain; public Optional> getEnv() { return Optional.ofNullable(env); @@ -167,9 +170,11 @@ public ConfigMap getConfigMap() { public List getRemotes() { return remotes; } + public List getCrdContexts() { return customResourceDefinitions; } - public List getIngressRules() { return ingressRules; } + public String getRouteDomain() { return routeDomain; } + // ============================================================================================= public static class Builder { @@ -197,7 +202,7 @@ public Builder(ResourceConfig config) { this.config.metrics = config.getMetrics(); this.config.namespace = config.getNamespace(); this.config.remotes = config.getRemotes(); - this.config.ingressRules = config.getIngressRules(); + this.config.routeDomain= config.getRouteDomain(); } } @@ -256,11 +261,6 @@ public Builder withRemotes(List remotes) { return this; } - public Builder withIngressRules(List ingressRules) { - config.ingressRules = ingressRules; - return this; - } - public Builder withNamespace(String s) { config.namespace = s; return this; @@ -271,6 +271,11 @@ public Builder withCustomResourceDefinitions(List customResourceDefiniti return this; } + public Builder withRouteDomain(String routeDomain) { + config.routeDomain = routeDomain; + return this; + } + public ResourceConfig build() { return config; } @@ -302,4 +307,4 @@ public ResourceConfig build() { // fabric8.namespaceEnvVar // fabric8.provider -} +} \ No newline at end of file diff --git a/core/src/test/resources/fabric8/config/profiles-lookup-dir/profiles.yaml b/core/src/test/resources/fabric8/config/profiles-lookup-dir/profiles.yaml index fe38d3083b..0094914738 100644 --- a/core/src/test/resources/fabric8/config/profiles-lookup-dir/profiles.yaml +++ b/core/src/test/resources/fabric8/config/profiles-lookup-dir/profiles.yaml @@ -41,10 +41,11 @@ - fmp-image - fmp-project-label - fmp-debug - - fmp-namespace - fmp-metadata - fmp-controller-from-configuration - fmp-openshift-deploymentconfig - fmp-openshift-project - fmp-openshift-service-expose - fmp-openshift-route + - fmp-ingress + - fmp-namespace \ No newline at end of file diff --git a/doc/src/main/asciidoc/inc/_profiles.adoc b/doc/src/main/asciidoc/inc/_profiles.adoc index 403a9f62cc..3449880049 100644 --- a/doc/src/main/asciidoc/inc/_profiles.adoc +++ b/doc/src/main/asciidoc/inc/_profiles.adoc @@ -229,6 +229,7 @@ A profile can also extend another profile to avoid repetition e.g of generators - fmp-openshift-project - fmp-openshift-service-expose - fmp-openshift-route + - fmp-ingress ---- one then would not need to repeat all generators as they are inherited from the `default` profile. diff --git a/enricher/standard/src/main/java/io/fabric8/maven/enricher/standard/DefaultNamespaceEnricher.java b/enricher/standard/src/main/java/io/fabric8/maven/enricher/standard/DefaultNamespaceEnricher.java index 09570e27be..60f80bd532 100644 --- a/enricher/standard/src/main/java/io/fabric8/maven/enricher/standard/DefaultNamespaceEnricher.java +++ b/enricher/standard/src/main/java/io/fabric8/maven/enricher/standard/DefaultNamespaceEnricher.java @@ -29,6 +29,7 @@ import io.fabric8.maven.enricher.api.MavenEnricherContext; import io.fabric8.openshift.api.model.Project; import io.fabric8.openshift.api.model.ProjectBuilder; +import io.fabric8.openshift.api.model.ProjectStatus; import java.util.Arrays; @@ -132,14 +133,18 @@ public void visit(ObjectMetaBuilder metaBuilder) { builder.accept(new TypedVisitor() { @Override public void visit(NamespaceBuilder builder) { - builder.withNewStatus("active").editMetadata().withNamespace(null).endMetadata().build(); + if (builder.getStatus().equals("active")) { + builder.editOrNewStatus().endStatus().build(); + } } }); builder.accept(new TypedVisitor() { @Override public void visit(ProjectBuilder builder) { - builder.withNewStatus("active").editMetadata().withNamespace(null).endMetadata().build(); + if (builder.getStatus().equals(new ProjectStatus("active"))) { + builder.editOrNewStatus().endStatus().build(); + } } }); } diff --git a/enricher/standard/src/main/java/io/fabric8/maven/enricher/standard/IngressEnricher.java b/enricher/standard/src/main/java/io/fabric8/maven/enricher/standard/IngressEnricher.java index bcf8ec18ab..cac58ae62f 100644 --- a/enricher/standard/src/main/java/io/fabric8/maven/enricher/standard/IngressEnricher.java +++ b/enricher/standard/src/main/java/io/fabric8/maven/enricher/standard/IngressEnricher.java @@ -23,19 +23,24 @@ import io.fabric8.kubernetes.api.model.ServiceBuilder; import io.fabric8.kubernetes.api.model.ServicePort; import io.fabric8.kubernetes.api.model.ServiceSpec; -import io.fabric8.kubernetes.api.model.extensions.Ingress; +import io.fabric8.kubernetes.api.model.extensions.HTTPIngressPath; +import io.fabric8.kubernetes.api.model.extensions.HTTPIngressPathBuilder; import io.fabric8.kubernetes.api.model.extensions.IngressBackendBuilder; import io.fabric8.kubernetes.api.model.extensions.IngressBuilder; import io.fabric8.kubernetes.api.model.extensions.IngressSpecBuilder; import io.fabric8.maven.core.config.PlatformMode; import io.fabric8.maven.core.config.ResourceConfig; +import io.fabric8.maven.core.util.FileUtil; import io.fabric8.maven.core.util.kubernetes.Fabric8Annotations; +import io.fabric8.maven.core.util.kubernetes.KubernetesHelper; import io.fabric8.maven.enricher.api.BaseEnricher; import io.fabric8.maven.enricher.api.MavenEnricherContext; +import org.apache.commons.lang3.StringUtils; import java.util.ArrayList; import java.util.List; import java.util.Map; +import java.util.Objects; import java.util.concurrent.atomic.AtomicBoolean; /** @@ -48,42 +53,63 @@ public IngressEnricher(MavenEnricherContext buildContext) { super(buildContext, "fmp-ingress"); } + private String routeDomainPostfix; + @Override public void create(PlatformMode platformMode, final KubernetesListBuilder listBuilder) { + ResourceConfig resourceConfig = getConfiguration().getResource().orElse(null); + + if (resourceConfig != null && resourceConfig.getRouteDomain() != null) { + routeDomainPostfix = resourceConfig.getRouteDomain(); + } + if (platformMode == PlatformMode.kubernetes) { - final List ingresses = new ArrayList<>(); listBuilder.accept(new TypedVisitor() { @Override public void visit(ServiceBuilder serviceBuilder) { addIngress(listBuilder, serviceBuilder); } }); - } } private void addIngress(KubernetesListBuilder listBuilder, ServiceBuilder serviceBuilder) { - ObjectMeta metadata = serviceBuilder.getMetadata(); - if (metadata != null && isExposedService(serviceBuilder)) { - String name = metadata.getName(); - if (!hasIngress(listBuilder, name)) { + ObjectMeta serviceMetadata = serviceBuilder.getMetadata(); + if (serviceMetadata != null && isExposedService(serviceMetadata) && shouldCreateExternalURLForService(serviceBuilder)) { + String serviceName = serviceMetadata.getName(); + if (!hasIngress(listBuilder, serviceName)) { Integer servicePort = getServicePort(serviceBuilder); if (servicePort != null) { - ResourceConfig resourceConfig = getConfiguration().getResource().orElse(null); IngressBuilder ingressBuilder = new IngressBuilder(). - withMetadata(serviceBuilder.getMetadata()). + withMetadata(serviceMetadata). withNewSpec(). - endSpec(); - IngressSpecBuilder specBuilder = new IngressSpecBuilder().withBackend(new IngressBackendBuilder(). - withNewServiceName(name). - withNewServicePort(getServicePort(serviceBuilder)). - build()); - if (resourceConfig != null) { - specBuilder.addAllToRules(resourceConfig.getIngressRules()); + // removing `expose : true` label from metadata. + ingressBuilder.withNewMetadataLike(removeExposeLabel(ingressBuilder.getMetadata())); + + if (StringUtils.isNotBlank(routeDomainPostfix)) { + routeDomainPostfix = serviceName + "." + FileUtil.stripPrefix(routeDomainPostfix, "."); + ingressBuilder = ingressBuilder.withSpec(new IngressSpecBuilder().addNewRule(). + withHost(routeDomainPostfix). + withNewHttp(). + withPaths(new HTTPIngressPathBuilder() + .withNewBackend() + .withServiceName(serviceName) + .withServicePort(KubernetesHelper.createIntOrString(getServicePort(serviceBuilder))) + .endBackend() + .build()) + .endHttp(). + endRule().build()); + } else { + ingressBuilder.withSpec(new IngressSpecBuilder().withBackend(new IngressBackendBuilder(). + withNewServiceName(serviceName) + .withNewServicePort(getServicePort(serviceBuilder)) + .build()).build()); } + + listBuilder.addToIngressItems(ingressBuilder.build()); } } } @@ -126,13 +152,23 @@ public void visit(IngressBuilder builder) { return answer.get(); } - private boolean isExposedService(ServiceBuilder serviceBuilder) { - Service service = serviceBuilder.build(); - return isExposedService(service); + private ObjectMeta removeExposeLabel(ObjectMeta metadata) { + Map labels = null; + if (metadata != null) { + labels = metadata.getLabels(); + if (labels != null) { + if ("true".equals(labels.get("expose"))) { + labels.remove("expose"); + } + if("true".equals(labels.get(Fabric8Annotations.SERVICE_EXPOSE_URL.value()))) { + labels.remove(Fabric8Annotations.SERVICE_EXPOSE_URL.value()); + } + } + } + return metadata; } - private boolean isExposedService(Service service) { - ObjectMeta metadata = service.getMetadata(); + private boolean isExposedService(ObjectMeta metadata) { if (metadata != null) { Map labels = metadata.getLabels(); if (labels != null) { @@ -141,8 +177,39 @@ private boolean isExposedService(Service service) { } } } else { - log.info("No Metadata for service! " + service); + log.info("No Metadata for service! " + metadata.getName()); } return false; } + + /** + * Should we try to create an external URL for the given service? + *

+ * By default lets ignore the kubernetes services and any service which does not expose ports 80 and 443 + * + * @return true if we should create an Ingress for this service. + */ + private boolean shouldCreateExternalURLForService(ServiceBuilder service) { + String serviceName = service.getMetadata().getName(); + if ("kubernetes".equals(serviceName) || "kubernetes-ro".equals(serviceName)) { + return false; + } + ServiceSpec spec = service.getSpec(); + List ports = spec.getPorts(); + log.debug("Service " + serviceName + " has ports: " + ports); + if (ports.size() == 1) { + String type = null; + if (spec != null) { + type = spec.getType(); + if (Objects.equals(type, "LoadBalancer")) { + return true; + } + } + log.info("Not generating Ingress for service " + serviceName + " type is not LoadBalancer: " + type); + return false; + } else { + log.info("Not generating Ingress for service " + serviceName + " as only single port services are supported. Has ports: " + ports); + return false; + } + } } \ No newline at end of file diff --git a/enricher/standard/src/main/java/io/fabric8/maven/enricher/standard/openshift/RouteEnricher.java b/enricher/standard/src/main/java/io/fabric8/maven/enricher/standard/openshift/RouteEnricher.java index 4f9bd0e82c..9911a8fa51 100644 --- a/enricher/standard/src/main/java/io/fabric8/maven/enricher/standard/openshift/RouteEnricher.java +++ b/enricher/standard/src/main/java/io/fabric8/maven/enricher/standard/openshift/RouteEnricher.java @@ -17,25 +17,31 @@ package io.fabric8.maven.enricher.standard.openshift; import java.util.ArrayList; +import java.util.HashSet; import java.util.List; import java.util.Map; +import java.util.Set; import java.util.concurrent.atomic.AtomicBoolean; import io.fabric8.kubernetes.api.builder.TypedVisitor; import io.fabric8.kubernetes.api.model.IntOrString; import io.fabric8.kubernetes.api.model.KubernetesListBuilder; import io.fabric8.kubernetes.api.model.ObjectMeta; +import io.fabric8.kubernetes.api.model.ObjectMetaBuilder; import io.fabric8.kubernetes.api.model.Service; import io.fabric8.kubernetes.api.model.ServiceBuilder; import io.fabric8.kubernetes.api.model.ServicePort; import io.fabric8.kubernetes.api.model.ServiceSpec; import io.fabric8.maven.core.config.PlatformMode; +import io.fabric8.maven.core.config.ResourceConfig; +import io.fabric8.maven.core.util.FileUtil; import io.fabric8.maven.core.util.kubernetes.Fabric8Annotations; import io.fabric8.maven.enricher.api.BaseEnricher; import io.fabric8.maven.enricher.api.MavenEnricherContext; import io.fabric8.openshift.api.model.Route; import io.fabric8.openshift.api.model.RouteBuilder; import io.fabric8.openshift.api.model.RoutePort; +import org.apache.commons.lang3.StringUtils; /** * Enricher which generates a Route for each exposed Service @@ -48,8 +54,16 @@ public RouteEnricher(MavenEnricherContext buildContext) { this.generateRoute = getValueFromConfig(GENERATE_ROUTE, true); } + private String routeDomainPostfix; + @Override public void create(PlatformMode platformMode, final KubernetesListBuilder listBuilder) { + ResourceConfig resourceConfig = getConfiguration().getResource().orElse(null); + + if (resourceConfig != null && resourceConfig.getRouteDomain() != null) { + routeDomainPostfix = resourceConfig.getRouteDomain(); + } + if(platformMode == PlatformMode.openshift && generateRoute.equals(Boolean.TRUE)) { final List routes = new ArrayList<>(); listBuilder.accept(new TypedVisitor() { @@ -68,25 +82,6 @@ public void visit(ServiceBuilder serviceBuilder) { } } - private void addRoute(KubernetesListBuilder listBuilder, ServiceBuilder serviceBuilder, List routes) { - ObjectMeta metadata = serviceBuilder.getMetadata(); - if (metadata != null && isExposedService(serviceBuilder)) { - String name = metadata.getName(); - if (!hasRoute(listBuilder, name)) { - RoutePort routePort = createRoutePort(serviceBuilder); - if (routePort != null) { - // TODO one day lets support multiple ports on a Route when the model supports it - routes.add(new RouteBuilder(). - withMetadata(serviceBuilder.getMetadata()). - withNewSpec(). - withPort(routePort). - withNewTo().withKind("Service").withName(name).endTo(). - endSpec(). - build()); - } - } - } - } private RoutePort createRoutePort(ServiceBuilder serviceBuilder) { RoutePort routePort = null; @@ -107,6 +102,77 @@ private RoutePort createRoutePort(ServiceBuilder serviceBuilder) { return routePort; } + private String prepareHostForRoute(String routeDomainPostfix, String name) { + String ret = FileUtil.stripPostfix(name,"-service"); + ret = FileUtil.stripPostfix(ret,"."); + ret += "."; + ret += FileUtil.stripPrefix(routeDomainPostfix, "."); + return ret; + } + + private Set getPorts(ServiceBuilder service) { + Set answer = new HashSet<>(); + if (service != null) { + ServiceSpec spec = getOrCreateSpec(service); + for (ServicePort port : spec.getPorts()) { + answer.add(port.getPort()); + } + } + return answer; + } + + public static ServiceSpec getOrCreateSpec(ServiceBuilder entity) { + ServiceSpec spec = entity.getSpec(); + if (spec == null) { + spec = new ServiceSpec(); + entity.editOrNewSpec().endSpec(); + } + return spec; + } + + private boolean hasExactlyOneServicePort(ServiceBuilder service, String id) { + Set ports = getPorts(service); + if (ports.size() != 1) { + log.info("Not generating route for service " + id + " as only single port services are supported. Has ports: " + + ports); + return false; + } else { + return true; + } + } + + private void addRoute(KubernetesListBuilder listBuilder, ServiceBuilder serviceBuilder, List routes) { + ObjectMeta serviceMetadata = serviceBuilder.getMetadata(); + + if (serviceMetadata != null && StringUtils.isNotBlank(serviceMetadata.getName()) + && hasExactlyOneServicePort(serviceBuilder, serviceMetadata.getName()) && isExposedService(serviceMetadata)) { + String name = serviceMetadata.getName(); + if (!hasRoute(listBuilder, name)) { + if (StringUtils.isNotBlank(routeDomainPostfix)) { + routeDomainPostfix = prepareHostForRoute(routeDomainPostfix, name); + } else { + routeDomainPostfix = ""; + } + + RoutePort routePort = createRoutePort(serviceBuilder); + if (routePort != null) { + // TODO one day lets support multiple ports on a Route when the model supports it + RouteBuilder routeBuilder = new RouteBuilder(). + withMetadata(serviceMetadata). + withNewSpec(). + withPort(routePort). + withNewTo().withKind("Service").withName(name).endTo(). + withHost(routeDomainPostfix.isEmpty() ? null : routeDomainPostfix). + endSpec(); + + // removing `expose : true` label from metadata. + routeBuilder.withNewMetadataLike(removeExposeLabel(routeBuilder.getMetadata())); + routes.add(routeBuilder.build()); + } + } + } + } + /** * Returns true if we already have a route created for the given name */ @@ -125,13 +191,23 @@ public void visit(RouteBuilder builder) { return answer.get(); } - protected boolean isExposedService(ServiceBuilder serviceBuilder) { - Service service = serviceBuilder.build(); - return isExposedService(service); + private ObjectMeta removeExposeLabel(ObjectMeta metadata) { + Map labels = null; + if (metadata != null) { + labels = metadata.getLabels(); + if (labels != null) { + if ("true".equals(labels.get("expose"))) { + labels.remove("expose"); + } + if("true".equals(labels.get(Fabric8Annotations.SERVICE_EXPOSE_URL.value()))) { + labels.remove(Fabric8Annotations.SERVICE_EXPOSE_URL.value()); + } + } + } + return metadata; } - protected boolean isExposedService(Service service) { - ObjectMeta metadata = service.getMetadata(); + private boolean isExposedService(ObjectMeta metadata) { if (metadata != null) { Map labels = metadata.getLabels(); if (labels != null) { @@ -140,8 +216,9 @@ protected boolean isExposedService(Service service) { } } } else { - log.info("No Metadata for service! " + service); + log.info("No Metadata for service! " + metadata.getName()); } return false; } + } diff --git a/it/src/it/simple-with-route-flag-true/expected/openshift.yml b/it/src/it/simple-with-route-flag-true/expected/openshift.yml index a6416e5a61..a2e6cd559a 100644 --- a/it/src/it/simple-with-route-flag-true/expected/openshift.yml +++ b/it/src/it/simple-with-route-flag-true/expected/openshift.yml @@ -118,7 +118,6 @@ items: kind: Route metadata: labels: - expose: "true" app: fabric8-maven-sample-zero-config provider: fabric8 version: 3.5-SNAPSHOT diff --git a/plugin/src/main/java/io/fabric8/maven/plugin/enricher/EnricherManager.java b/plugin/src/main/java/io/fabric8/maven/plugin/enricher/EnricherManager.java index eb82a9bec3..f9550e5d4c 100644 --- a/plugin/src/main/java/io/fabric8/maven/plugin/enricher/EnricherManager.java +++ b/plugin/src/main/java/io/fabric8/maven/plugin/enricher/EnricherManager.java @@ -60,7 +60,6 @@ public EnricherManager(ResourceConfig resourceConfig, EnricherContext enricherCo "META-INF/fabric8/enricher"); logEnrichers(filterEnrichers(defaultEnricherConfig, enrichers)); - } public void createDefaultResources(PlatformMode platformMode, final KubernetesListBuilder builder) { @@ -79,17 +78,13 @@ public void enrich(PlatformMode platformMode, KubernetesListBuilder builder) { enrich(platformMode, defaultEnricherConfig, builder); } - public void enrich(PlatformMode platformMode, ProcessorConfig config, KubernetesListBuilder builder) { - enrich(platformMode, config, builder, enrichers); - } - /** * Allow enricher to add Metadata to the resources. - * + * @param platformMode + * @param enricherConfig * @param builder builder to customize - * @param enricherList list of enrichers */ - private void enrich(PlatformMode platformMode, final ProcessorConfig enricherConfig, final KubernetesListBuilder builder, final List enricherList) { + public void enrich(PlatformMode platformMode, final ProcessorConfig enricherConfig, final KubernetesListBuilder builder) { loop(enricherConfig, enricher -> { enricher.enrich(platformMode, builder); return null; diff --git a/plugin/src/main/java/io/fabric8/maven/plugin/mojo/build/ApplyMojo.java b/plugin/src/main/java/io/fabric8/maven/plugin/mojo/build/ApplyMojo.java index 5d40825eaa..9a694841ff 100644 --- a/plugin/src/main/java/io/fabric8/maven/plugin/mojo/build/ApplyMojo.java +++ b/plugin/src/main/java/io/fabric8/maven/plugin/mojo/build/ApplyMojo.java @@ -400,7 +400,7 @@ private Ingress createIngressForService(String routeDomainPostfix, String namesp return ingress; } ingress = new IngressBuilder(). - withNewMetadata().withName(ingressId).withNamespace(namespace).endMetadata(). + withNewMetadata().withName(serviceName).withNamespace(namespace).endMetadata(). withNewSpec(). addNewRule(). withHost(host). diff --git a/plugin/src/main/java/io/fabric8/maven/plugin/mojo/build/ResourceMojo.java b/plugin/src/main/java/io/fabric8/maven/plugin/mojo/build/ResourceMojo.java index d08d6cba95..5e5a877e18 100644 --- a/plugin/src/main/java/io/fabric8/maven/plugin/mojo/build/ResourceMojo.java +++ b/plugin/src/main/java/io/fabric8/maven/plugin/mojo/build/ResourceMojo.java @@ -195,6 +195,13 @@ public class ResourceMojo extends AbstractFabric8Mojo { @Parameter(property = "fabric8.gitRemote") private String gitRemote; + + /** + * The domain added to the service ID when creating OpenShift routes + */ + @Parameter(property = "fabric8.domain") + private String routeDomain; + @Parameter private ProcessorConfig enricher; @@ -446,6 +453,10 @@ private KubernetesList generateResources(PlatformMode platformMode) if (namespace != null && !namespace.isEmpty()) { resources = new ResourceConfig.Builder(resources).withNamespace(namespace).build(); } + + if (routeDomain != null && !routeDomain.isEmpty() ) { + resources = new ResourceConfig.Builder(resources).withRouteDomain(routeDomain).build(); + } // Manager for calling enrichers. MavenEnricherContext.Builder ctxBuilder = new MavenEnricherContext.Builder() .project(project) diff --git a/plugin/src/main/resources/META-INF/fabric8/profiles-default.yml b/plugin/src/main/resources/META-INF/fabric8/profiles-default.yml index d0974d2e03..e4299d5bdb 100644 --- a/plugin/src/main/resources/META-INF/fabric8/profiles-default.yml +++ b/plugin/src/main/resources/META-INF/fabric8/profiles-default.yml @@ -27,7 +27,6 @@ - fmp-controller - fmp-controller-from-configuration - fmp-service - - fmp-namespace - fmp-image - fmp-portname - fmp-project-label @@ -44,8 +43,8 @@ - fmp-configmap-file - fmp-secret-file - # Route exposure - fmp-openshift-service-expose + - fmp-ingress - fmp-openshift-route - fmp-openshift-deploymentconfig - fmp-openshift-project @@ -68,6 +67,7 @@ - fmp-docker-registry-secret - fmp-triggers-annotation - fmp-openshift-imageChangeTrigger + - fmp-namespace generator: # The order given in "includes" is the order in which generators are called @@ -117,14 +117,14 @@ - fmp-image - fmp-project-label - fmp-debug - - fmp-namespace - fmp-metadata - fmp-controller-from-configuration - fmp-openshift-deploymentconfig - fmp-openshift-project - fmp-openshift-service-expose - fmp-openshift-route - + - fmp-ingress + - fmp-namespace # Only dependencies, no build, use other resources raw - name: aggregate generator: diff --git a/samples/spring-boot-with-yaml/pom.xml b/samples/spring-boot-with-yaml/pom.xml index 63a33920d2..3425752296 100644 --- a/samples/spring-boot-with-yaml/pom.xml +++ b/samples/spring-boot-with-yaml/pom.xml @@ -37,7 +37,7 @@ - 11 + 8 @@ -82,7 +82,6 @@ fabric8-maven-plugin 4.4-SNAPSHOT - spring-boot-ns