Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create routes in openshift with the same pattern than the urls provided by naming strategy #5879

Merged
merged 2 commits into from
Aug 3, 2017

Conversation

benoitf
Copy link
Contributor

@benoitf benoitf commented Aug 2, 2017

What does this PR do?

For now, routes are created by "hardcoding" some name of services like "tomcat" for 8080
Then we need to add labels in each docker image to set "tomcat" service name for exposing 8080 port.
So for example we have "vertx" dockerfile exposing a "Tomcat-" url while there is no tomcat.

This PR is generating routes by taking care of labels if they're defined without hardcoding the value.

Note: once this PR is merged, we will be able to modify Dockerfile and change "tomcat" label to something more specific (or generic) for the stack.

What issues does this PR fix or reference?

redhat-developer/rh-che#92

Changelog

Create OpenShift routes according to the url naming strategy used.

Release Notes

BugFix

Docs PR

BugFix

Change-Id: Ie8e0a09d0be8f6d042f542a76c146e2bbe266fc7
Signed-off-by: Florent BENOIT fbenoit@redhat.com

example : vertx in the URL

image

image

…ed by the naming strategy.

Also it will be able to handle service name described through labels on Docker image.

It means that for one image 8080 port can be tomcat, but for another image it can be named "vertx" or default value if not specified

Change-Id: Ie8e0a09d0be8f6d042f542a76c146e2bbe266fc7
Signed-off-by: Florent BENOIT <fbenoit@redhat.com>
@benoitf benoitf added kind/bug Outline of a bug - must adhere to the bug report template. status/code-review This issue has a pull request posted for it and is awaiting code review completion by the community. team/californication labels Aug 2, 2017
@benoitf benoitf self-assigned this Aug 2, 2017
Copy link
Contributor

@amisevsk amisevsk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Great addition @benoitf!

@codenvy-ci
Copy link

Copy link
Contributor

@l0rd l0rd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM Thanks @benoitf

* the mapping for known port labels
* @param exposedPorts
* the ports that are exposed
* @return
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you forgot to specify what's returned in the javadoc

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed, thanks

… provided by the naming strategy. Also it will be able to handle service name described through labels on Docker image.

Change-Id: Ic2d2b7666d7485869ad1b4836c79dd04ff0115ed
Signed-off-by: Florent BENOIT <fbenoit@redhat.com>
@benoitf benoitf merged commit 5bbbf9c into master Aug 3, 2017
@benoitf benoitf deleted the rh-che-92 branch August 3, 2017 06:52
@benoitf benoitf removed the status/code-review This issue has a pull request posted for it and is awaiting code review completion by the community. label Aug 3, 2017
@benoitf benoitf added this to the 5.16.0 milestone Aug 3, 2017
benoitf added a commit that referenced this pull request Aug 3, 2017
…ed by naming strategy (#5879)

* Create routes in openshift with the same pattern than the urls provided by the naming strategy.
Also it will be able to handle service name described through labels on Docker image.

It means that for one image 8080 port can be tomcat, but for another image it can be named "vertx" or default value if not specified

Change-Id: Ie8e0a09d0be8f6d042f542a76c146e2bbe266fc7
Signed-off-by: Florent BENOIT <fbenoit@redhat.com>
benoitf added a commit that referenced this pull request Aug 3, 2017
…ed by naming strategy (#5879)

* Create routes in openshift with the same pattern than the urls provided by the naming strategy.
Also it will be able to handle service name described through labels on Docker image.

It means that for one image 8080 port can be tomcat, but for another image it can be named "vertx" or default value if not specified

Change-Id: Ie8e0a09d0be8f6d042f542a76c146e2bbe266fc7
Signed-off-by: Florent BENOIT <fbenoit@redhat.com>
dmytro-ndp pushed a commit to dmytro-ndp/che that referenced this pull request Aug 16, 2017
…ed by naming strategy (eclipse-che#5879)

* Create routes in openshift with the same pattern than the urls provided by the naming strategy.
Also it will be able to handle service name described through labels on Docker image.

It means that for one image 8080 port can be tomcat, but for another image it can be named "vertx" or default value if not specified

Change-Id: Ie8e0a09d0be8f6d042f542a76c146e2bbe266fc7
Signed-off-by: Florent BENOIT <fbenoit@redhat.com>
JPinkney pushed a commit to JPinkney/che that referenced this pull request Aug 17, 2017
…ed by naming strategy (eclipse-che#5879)

* Create routes in openshift with the same pattern than the urls provided by the naming strategy.
Also it will be able to handle service name described through labels on Docker image.

It means that for one image 8080 port can be tomcat, but for another image it can be named "vertx" or default value if not specified

Change-Id: Ie8e0a09d0be8f6d042f542a76c146e2bbe266fc7
Signed-off-by: Florent BENOIT <fbenoit@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Outline of a bug - must adhere to the bug report template.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants