Skip to content
This repository has been archived by the owner on Jun 19, 2024. It is now read-only.

Allow generating service without a route #1209

Closed
chmouel opened this issue Feb 21, 2018 · 5 comments
Closed

Allow generating service without a route #1209

chmouel opened this issue Feb 21, 2018 · 5 comments
Assignees
Labels
cat/bug Bug which needs fixing group/osio Related to openshift.io
Milestone

Comments

@chmouel
Copy link

chmouel commented Feb 21, 2018

Currently when generating a service with f-m-p it would generate a Route along the way which is not needed, it would be useful to have a flag so it the Route doesn't get generated along the Service.

@piyush-garg
Copy link
Collaborator

Hey @chmouel

You need to do some little changes in pom.xml and probably it should work.

            <plugin>
                <groupId>io.fabric8</groupId>
                <artifactId>fabric8-maven-plugin</artifactId>
                <version>3.5-SNAPSHOT</version>
                <configuration>
                    <enricher>
                        <excludes>
                            <exclude>f8-expose</exclude>
                        </excludes>
                    </enricher>
                </configuration>
            </plugin>

Can you please try this configuration. Please let us know if this doesn't resolve your problem.

Thanks

@chmouel
Copy link
Author

chmouel commented Feb 21, 2018

Ah that's neat but i can't seem to make it works, i have this :

image

but after running a mvn clean install -DskipTests=true the Route for content-repository still gets generated :

image

@piyush-garg
Copy link
Collaborator

piyush-garg commented Feb 21, 2018

Hi @chmouel,

The file you are showing is the resource file which is getting generated. When you hit fabric8: resource, it generates :

  • deployment and service for kubernetes.
  • deploymentConfig, service, and route for OpenShift

The above configuration I provided will generate all the resource yaml, no change in that behavior but I will not create a route resource on your OpenShift cluster when you hit fabric8: deploy goal. If you hit fabric8: deploy goal without this configuration it will generate a route on your cluster.

Above configuration is wrt to resources on the cluster, not the yaml.

I think this will resolve your problem. Let us know if you have some other doubt.

Thanks

@hrishin hrishin added prio/p0 Highest priority SEV1 and removed prio/p0 Highest priority labels Feb 22, 2018
@hrishin hrishin added this to the Sprint 145 H milestone Feb 22, 2018
@hrishin hrishin added the group/osio Related to openshift.io label Feb 22, 2018
@hrishin
Copy link
Member

hrishin commented Feb 22, 2018

Even making https://github.com/fabric8-services/fabric8-tenant-jenkins/blob/master/apps/content-repository/src/main/fabric8/content-repository-svc.yml#L14 to false generating the route resource.

The requirement here is to not generate route resource at all.

@hrishin hrishin added the cat/bug Bug which needs fixing label Feb 22, 2018
piyush-garg added a commit to piyush-garg/fabric8-maven-plugin that referenced this issue Feb 23, 2018
fabric8.openshift.generateRoute which of set to false no route.yaml
will be generated and if set true or not set it will generate route.yml
fabric8io#1209
@piyush-garg
Copy link
Collaborator

As #1211 is merged, I am closing this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cat/bug Bug which needs fixing group/osio Related to openshift.io
Projects
None yet
Development

No branches or pull requests

3 participants