-
Notifications
You must be signed in to change notification settings - Fork 38.9k
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 service add create ExternalName service implementation #34789
Conversation
b3ed6fc
to
e1cfdc8
Compare
Can you add a test to test-cmd? |
) | ||
|
||
// NewCmdCreateServiceExternalName is a macro command for creating a ExternalName service | ||
func NewCmdCreteServiceExternalName(f cmdutil.Factory, cmdOut io.Writer) *cobra.Command { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NewCmdCreateServiceExternalName
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
stupid error :(
e1cfdc8
to
6a4c555
Compare
tests add, comment addressed @smarterclayton @fabianofranz ptal. |
b840153
to
8780e55
Compare
@fabianofranz @smarterclayton rebased, ptal. |
Jenkins Kubemark GCE e2e failed for commit 8780e55a43d0397feac1969d983097cc3edb7fbd. Full PR test history. The magic incantation to run this job again is |
Jenkins GCE e2e failed for commit 8780e55a43d0397feac1969d983097cc3edb7fbd. Full PR test history. The magic incantation to run this job again is |
Jenkins GCI GKE smoke e2e failed for commit 8780e55a43d0397feac1969d983097cc3edb7fbd. Full PR test history. The magic incantation to run this job again is |
Jenkins GCI GCE e2e failed for commit 8780e55a43d0397feac1969d983097cc3edb7fbd. Full PR test history. The magic incantation to run this job again is |
Jenkins GCE etcd3 e2e failed for commit 8780e55a43d0397feac1969d983097cc3edb7fbd. Full PR test history. The magic incantation to run this job again is |
Jenkins GKE smoke e2e failed for commit 8780e55a43d0397feac1969d983097cc3edb7fbd. Full PR test history. The magic incantation to run this job again is |
Jenkins GCE Node e2e failed for commit 8780e55a43d0397feac1969d983097cc3edb7fbd. Full PR test history. The magic incantation to run this job again is |
d77d938
to
c10c683
Compare
Jenkins verification failed for commit c10c6835ce4c96304fb5bfaf784e4a389e80fcd7. Full PR test history. The magic incantation to run this job again is |
c10c683
to
39ae786
Compare
@fabianofranz I just go back to this, please help review this :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just minor nits otherwise LGTM. Just note that this might be out of 1.5 feature freeze.
cmdutil.AddPrinterFlags(cmd) | ||
cmdutil.AddGeneratorFlags(cmd, cmdutil.ServiceExternalNameGeneratorV1Name) | ||
addPortFlags(cmd) | ||
cmd.Flags().String("external-name", "", "external name of service") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
--external-name
is required, correct? In which case it needs cmd.MarkFlagRequired
for completions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
|
||
var ( | ||
serviceExternalNameLong = templates.LongDesc(` | ||
Create an ExternalName service with the specified name.`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it make sense to mention here what ExternalName services can be used for? Like "can be used for CNAME", etc. This may not be very clear for used in a first sight.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
Create an ExternalName service with the specified name.`) | ||
|
||
serviceExternalNameExample = templates.Examples(` | ||
# Create a new ExternalName service named bar.com |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In fact it is named "my-ns", "bar.com" being the external name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
39ae786
to
d66bcbf
Compare
@fabianofranz update, please take a look. |
@fabianofranz That's ok if we cannot include this in 1.5 |
@adohe needs a release note since it introduces a new command. ;) |
Release note:
@fabianofranz ptal |
LGTM, waiting for post-1.5. |
Applying 1.6 and lgtm labels per Fabiano's comment. |
@soltysh Could you tell me how to add some release note here? I already add some, but seems bot didn't notice this. |
You need to do:
in the PR description. |
@smarterclayton I think @soltysh already helped add this, thanks all the same. :) |
@k8s-bot test this |
Automatic merge from submit-queue |
@kubernetes/kubectl create service add ExternalName support, refer #34731 for more detail.
This change is![Reviewable](https://camo.githubusercontent.com/2d899f4291d07d3cd2fa4aaae1e3b243f164c23fce87d30a589ace0d496a444c/68747470733a2f2f72657669657761626c652e6b756265726e657465732e696f2f7265766965775f627574746f6e2e737667)