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

add port name #915

Merged
merged 6 commits into from
Jul 10, 2020
Merged

add port name #915

merged 6 commits into from
Jul 10, 2020

Conversation

itsmurugappan
Copy link
Contributor

Description

Add provision to specify port name

Changes

  • Change port field from int32 to string
  • Accept port field as portname:port
  • Set the container port option accordingly

Reference

Fixes #912

@googlebot googlebot added the cla: yes Indicates the PR's author has signed the CLA. label Jul 2, 2020
Copy link
Contributor

@knative-prow-robot knative-prow-robot left a comment

Choose a reason for hiding this comment

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

@itsmurugappan: 0 warnings.

In response to this:

Description

Add provision to specify port name

Changes

  • Change port field from int32 to string
  • Accept port field as portname:port
  • Set the container port option accordingly

Reference

Fixes #912

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@knative-prow-robot knative-prow-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jul 2, 2020
@itsmurugappan
Copy link
Contributor Author

/test pull-knative-client-integration-tests

1 similar comment
@itsmurugappan
Copy link
Contributor Author

/test pull-knative-client-integration-tests

docs/cmd/kn_service_create.md Outdated Show resolved Hide resolved
pkg/kn/commands/service/create.go Outdated Show resolved Hide resolved
pkg/serving/config_changes.go Outdated Show resolved Hide resolved
pkg/serving/config_changes.go Outdated Show resolved Hide resolved
pkg/serving/config_changes.go Outdated Show resolved Hide resolved
Copy link
Contributor

@maximilien maximilien left a comment

Choose a reason for hiding this comment

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

Definitely address the errors in parsing ports values as @navidshaikh mentions.

Also, it feels weird that some of the comments use 8080 and some use port 80. Is there a specific reason? I’d use 8080 since that’s less “dangerous” and anyone using 80 should know their risk...

Copy link
Collaborator

@navidshaikh navidshaikh left a comment

Choose a reason for hiding this comment

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

suggested input verification and additional test cases, rest lgtm

pkg/kn/commands/service/create.go Show resolved Hide resolved
pkg/serving/config_changes.go Outdated Show resolved Hide resolved
@knative-prow-robot knative-prow-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jul 9, 2020
pkg/serving/config_changes.go Outdated Show resolved Hide resolved
Copy link
Contributor

@rhuss rhuss left a comment

Choose a reason for hiding this comment

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

Looks good with some minor suggestions (error message with context, reduced complexity)

Feel free to change or use /unhold to get the PR merged immediately.

/hold
/lgtm

pkg/serving/config_changes.go Outdated Show resolved Hide resolved
pkg/serving/config_changes.go Outdated Show resolved Hide resolved
pkg/serving/config_changes.go Outdated Show resolved Hide resolved
@knative-prow-robot knative-prow-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 9, 2020
@knative-prow-robot knative-prow-robot added lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Jul 9, 2020
@knative-prow-robot knative-prow-robot removed the lgtm Indicates that a PR is ready to be merged. label Jul 9, 2020
@knative-metrics-robot
Copy link

The following is the coverage report on the affected files.
Say /test pull-knative-client-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/serving/config_changes.go 75.8% 76.3% 0.6

@itsmurugappan
Copy link
Contributor Author

@googlebot rescan

@itsmurugappan
Copy link
Contributor Author

/unhold

@knative-prow-robot knative-prow-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 10, 2020
@rhuss
Copy link
Contributor

rhuss commented Jul 10, 2020

Thanks a lot !

/lgtm
/approve

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Jul 10, 2020
@knative-prow-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: itsmurugappan, rhuss

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

@knative-prow-robot knative-prow-robot merged commit b04d115 into knative:master Jul 10, 2020
@@ -40,6 +40,12 @@ type VolumeSourceType int
const (
ConfigMapVolumeSourceType VolumeSourceType = iota
SecretVolumeSourceType
PortFormatErr = "The port specification '%s' is not valid. Please provide in the format 'NAME:PORT', where 'NAME' is optional. Examples: '--port h2c:8080' , '--port 8080'."
Copy link
Collaborator

Choose a reason for hiding this comment

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

error text should begin with lower case

@itsmurugappan itsmurugappan deleted the port branch July 12, 2020 19:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cla: yes Indicates the PR's author has signed the CLA. lgtm 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.

Add Port Name to kn service create options
8 participants