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

Support multiple hostnames on expose label in service for Kubernetes #1092

Merged
merged 2 commits into from
Jan 31, 2019

Conversation

huikaihoo
Copy link
Contributor

Support multiple hostnames [separated by semicolon] on expose label (kompose.service.expose) in service for Kubernetes.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jan 3, 2019
@cdrage
Copy link
Member

cdrage commented Jan 30, 2019

I believe we should use comma (,) rather than semicolon (;).

I rarely see semicolons be used.

Could you also test against using, for example, spaces in between? example.com, examplefoobar.com, etc?

Copy link
Member

@cdrage cdrage left a comment

Choose a reason for hiding this comment

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

Few concerns, otherwise the code + tests look great!

@@ -324,6 +324,8 @@ func (k *Kubernetes) InitDS(name string, service kobject.ServiceConfig) *extensi

func (k *Kubernetes) initIngress(name string, service kobject.ServiceConfig, port int32) *extensions.Ingress {

hosts := strings.Split(service.ExposeService, ";")
Copy link
Member

Choose a reason for hiding this comment

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

We should also use some form of checking (making sure spaces are removed, that someone doesn't add: ,, for example..

@cdrage
Copy link
Member

cdrage commented Jan 30, 2019

Oh! Could you add some documentation too for when this is merged? We should indicate to the users that multiple values are allowed.

… / trailing spaces and repeated commas; Updated test cases and documents.
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To fully approve this pull request, please assign additional approvers.
We suggest the following additional approver: surajssd

If they are not already assigned, you can assign the PR to them by writing /assign @surajssd in a comment when ready.

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@huikaihoo
Copy link
Contributor Author

Updated. Please take a look at it.

@cdrage
Copy link
Member

cdrage commented Jan 31, 2019

Awesome on the tests! 👍 and the code LGTM.

Thanks for the contribution!

@cdrage
Copy link
Member

cdrage commented Jan 31, 2019

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 31, 2019
@cdrage cdrage merged commit 40c1b8c into kubernetes:master Jan 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants