Re: [kubernetes/kubernetes] kubectl create ingress command (#44534)

5 views
Skip to first unread message

Fabiano Franz

unread,
Apr 28, 2017, 1:21:25 PM4/28/17
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

@kubernetes/sig-cli-misc


You are receiving this because you are on a team that was mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

Fabiano Franz

unread,
May 4, 2017, 10:37:30 AM5/4/17
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

@fabianofranz commented on this pull request.


In pkg/kubectl/cmd/create_ingress.go:

> +func NewCmdCreateIngress(f cmdutil.Factory, cmdOut io.Writer) *cobra.Command {
+	cmd := &cobra.Command{
+		Use:     "ingress NAME --host=host.example.com [--tls-acme] [--dry-run]",
+		Short:   i18n.T("Create an Ingress with the specified name."),
+		Long:    ingressLong,
+		Example: ingressExample,
+		Run: func(cmd *cobra.Command, args []string) {
+			err := CreateIngress(f, cmdOut, cmd, args)
+			cmdutil.CheckErr(err)
+		},
+	}
+	cmdutil.AddApplyAnnotationFlags(cmd)
+	cmdutil.AddValidateFlags(cmd)
+	cmdutil.AddPrinterFlags(cmd)
+	cmdutil.AddGeneratorFlags(cmd, cmdutil.IngressV1Beta1GeneratorName)
+	cmd.Flags().StringSlice("host", []string{}, "Host name for the ingress record")

Looks like this flag is required, so it needs cmd.MarkFlagRequired.

Fabiano Franz

unread,
May 4, 2017, 10:40:27 AM5/4/17
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

@fabianofranz commented on this pull request.


In pkg/kubectl/cmd/create_ingress.go:

> +	cmd := &cobra.Command{
+		Use:     "ingress NAME --host=host.example.com [--tls-acme] [--dry-run]",
+		Short:   i18n.T("Create an Ingress with the specified name."),
+		Long:    ingressLong,
+		Example: ingressExample,
+		Run: func(cmd *cobra.Command, args []string) {
+			err := CreateIngress(f, cmdOut, cmd, args)
+			cmdutil.CheckErr(err)
+		},
+	}
+	cmdutil.AddApplyAnnotationFlags(cmd)
+	cmdutil.AddValidateFlags(cmd)
+	cmdutil.AddPrinterFlags(cmd)
+	cmdutil.AddGeneratorFlags(cmd, cmdutil.IngressV1Beta1GeneratorName)
+	cmd.Flags().StringSlice("host", []string{}, "Host name for the ingress record")
+	cmd.Flags().Bool("tls-acme", false, "Enables ACME (LetEncrypt) support for automatic TLS")

Let’s Encrypt

Fabiano Franz

unread,
May 4, 2017, 10:42:42 AM5/4/17
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

@justinsb Sorry about the delay! Just a couple minor comments, make sure you squash then this is good to go.

Justin Santa Barbara

unread,
May 7, 2017, 11:30:52 PM5/7/17
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

Thanks @fabianofranz - should be all fixed up & squashed

Fabiano Franz

unread,
May 8, 2017, 11:58:33 AM5/8/17
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

@fabianofranz commented on this pull request.


In pkg/kubectl/cmd/create_ingress.go:

> +
+	"github.com/spf13/cobra"
+
+	"k8s.io/apimachinery/pkg/util/intstr"
+	"k8s.io/kubernetes/pkg/kubectl"
+	"k8s.io/kubernetes/pkg/kubectl/cmd/templates"
+	cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util"
+	"k8s.io/kubernetes/pkg/util/i18n"
+)
+
+var (
+	ingressLong = templates.LongDesc(i18n.T(`
+    Create an ingress with the specified name.`))
+
+	ingressExample = templates.Examples(i18n.T(`
+    # Create a new ingress named my-ingress supporting TLS with LetsEncrypt

Let’s Encrypt

Fabiano Franz

unread,
May 8, 2017, 11:59:19 AM5/8/17
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

should be all fixed up & squashed

not yet, forgot to git push? ;)

k8s-ci-robot

unread,
May 9, 2017, 10:38:52 AM5/9/17
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

@justinsb: The following test(s) failed:

Test name Commit Details Rerun command
Jenkins Bazel Build 27067d1 link @k8s-bot bazel test this

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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. I understand the commands that are listed here.

Justin Santa Barbara

unread,
May 9, 2017, 10:54:48 AM5/9/17
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

@k8s-bot bazel test this

Weird git error

Justin Santa Barbara

unread,
May 9, 2017, 11:32:54 AM5/9/17
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

Thanks @fabianofranz - I had indeed failed to push! Should be fixed now!

Fabiano Franz

unread,
May 9, 2017, 12:34:28 PM5/9/17
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

LGTM from a CLI perspective, @smarterclayton mind taking a conceptual look at this?

Justin Santa Barbara

unread,
May 10, 2017, 10:03:13 AM5/10/17
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

/assign @smarterclayton

Justin Santa Barbara

unread,
May 23, 2017, 10:39:15 PM5/23/17
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

Kubernetes Submit Queue

unread,
May 23, 2017, 10:39:44 PM5/23/17
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

@justinsb PR needs rebase

k8s-ci-robot

unread,
May 23, 2017, 11:29:09 PM5/23/17
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

@justinsb: The following test(s) failed:

Test name Commit Details Rerun command
pull-kubernetes-federation-e2e-gce 6e5966a link @k8s-bot pull-kubernetes-federation-e2e-gce test this

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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. I understand the commands that are listed here.

k8s-ci-robot

unread,
May 24, 2017, 12:06:09 AM5/24/17
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

@justinsb: The following test(s) failed:

Test name Commit Details Rerun command
pull-kubernetes-federation-e2e-gce 6e5966a link @k8s-bot pull-kubernetes-federation-e2e-gce test this
pull-kubernetes-e2e-kops-aws 6e5966a link @k8s-bot pull-kubernetes-e2e-kops-aws test this

Justin Santa Barbara

unread,
Jun 1, 2017, 12:16:04 AM6/1/17
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

@k8s-bot pull-kubernetes-e2e-kops-aws test this

@k8s-bot pull-kubernetes-federation-e2e-gce test this

k8s-ci-robot

unread,
Jun 1, 2017, 1:01:19 AM6/1/17
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

@justinsb: The following test(s) failed:

Test name Commit Details Rerun command
pull-kubernetes-federation-e2e-gce 6e5966a link @k8s-bot pull-kubernetes-federation-e2e-gce test this

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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. I understand the commands that are listed here.

Justin Santa Barbara

unread,
Jun 1, 2017, 1:57:20 AM6/1/17
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

@k8s-bot pull-kubernetes-federation-e2e-gce test this

grodrigues3

unread,
Jun 6, 2017, 2:32:59 PM6/6/17
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

@justinsb this looks like a feature that was not lgtm'd prior to code freeze. Removing from the milestone.

Justin Santa Barbara

unread,
Jun 13, 2017, 2:07:33 AM6/13/17
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

k8s-ci-robot

unread,
Jun 13, 2017, 2:13:56 AM6/13/17
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

@justinsb: The following test failed, say /retest to rerun them all:

Test name Commit Details Rerun command
pull-kubernetes-bazel 9cea83f link @k8s-bot pull-kubernetes-bazel test this

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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. I understand the commands that are listed here.

Peter Zhao

unread,
Jun 13, 2017, 2:22:41 AM6/13/17
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

@xiangpengzhao commented on this pull request.

pull-kubernetes-bazel failed.


In pkg/kubectl/cmd/create_ingress_test.go:

> +	t.CachedIngress = obj.(*extensions.Ingress)
+	return nil
+}
+
+func (t *testIngressPrinter) AfterPrint(output io.Writer, res string) error {
+	return nil
+}
+
+func (t *testIngressPrinter) HandledResources() []string {
+	return []string{}
+}
+
+func TestCreateIngress(t *testing.T) {
+	f, tf, _, _ := cmdtesting.NewAPIFactory()
+	printer := &testIngressPrinter{}
+	tf.Printer = printer
I0613 06:12:09.973] pkg/kubectl/cmd/create_ingress_test.go:53: cannot use printer (type *testIngressPrinter) as type printers.ResourcePrinter in assignment:
I0613 06:12:09.974] 	*testIngressPrinter does not implement printers.ResourcePrinter (missing IsGeneric method)

k8s-ci-robot

unread,
Jun 13, 2017, 2:29:52 AM6/13/17
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

@justinsb: The following tests failed, say /retest to rerun them all:

Test name Commit Details Rerun command
pull-kubernetes-bazel 9cea83f link @k8s-bot pull-kubernetes-bazel test this
pull-kubernetes-unit 9cea83f link @k8s-bot pull-kubernetes-unit test this

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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. I understand the commands that are listed here.

Justin Santa Barbara

unread,
Jul 10, 2017, 7:55:21 PM7/10/17
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

@smarterclayton appears to have turned off all github notifications.

/unassign smarterclayton

Justin Santa Barbara

unread,
Jul 10, 2017, 7:58:14 PM7/10/17
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

/unassign ghodds
/unassign ericchiang

Justin Santa Barbara

unread,
Jul 10, 2017, 7:58:21 PM7/10/17
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

/unassign ghodss

Nathan L Smith

unread,
Jul 13, 2017, 12:16:10 AM7/13/17
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

I would like to shadow this code review

Kubernetes Submit Queue

unread,
Aug 10, 2017, 4:05:11 AM8/10/17
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

@justinsb PR needs rebase

Kubernetes Submit Queue

unread,
Aug 12, 2017, 4:05:46 AM8/12/17
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

This PR hasn't been active in 30 days. It will be closed in 59 days (Oct 11, 2017).

cc @fabianofranz @justinsb

You can add 'keep-open' label to prevent this from happening, or add a comment to keep it open another 90 days

Kubernetes Submit Queue

unread,
Sep 11, 2017, 3:28:24 PM9/11/17
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

This PR hasn't been active in 60 days. It will be closed in 29 days (Oct 11, 2017).

Kubernetes Submit Queue

unread,
Oct 11, 2017, 4:03:56 AM10/11/17
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

This PR hasn't been active in 90 days. Closing this PR. Please reopen if you would like to work towards merging this change, if/when the PR is ready for the next round of review.

cc @fabianofranz @justinsb

You can add 'keep-open' label to prevent this from happening again, or add a comment to keep it open another 90 days

Kubernetes Submit Queue

unread,
Oct 11, 2017, 4:04:01 AM10/11/17
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

Closed #44534.

k8s-ci-robot

unread,
Oct 8, 2018, 11:13:10 PM10/8/18
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

If they are not already assigned, you can assign the PR to them by writing /assign @smarterclayton 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

Justin Santa Barbara

unread,
Oct 8, 2018, 11:13:26 PM10/8/18
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

Reopened #44534.

k8s-ci-robot

unread,
Oct 8, 2018, 11:15:16 PM10/8/18
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

@justinsb: The following tests failed, say /retest to rerun them all:

Test name Commit Details Rerun command
pull-kubernetes-bazel-build 0b3038c link /test pull-kubernetes-bazel-build
pull-kubernetes-bazel-test 0b3038c link /test pull-kubernetes-bazel-test
pull-kubernetes-integration 0b3038c link /test pull-kubernetes-integration

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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. I understand the commands that are listed here.

k8s-ci-robot

unread,
Oct 8, 2018, 11:15:23 PM10/8/18
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

@justinsb: The following tests failed, say /retest to rerun them all:

Test name Commit Details Rerun command
pull-kubernetes-bazel-build 0b3038c link /test pull-kubernetes-bazel-build
pull-kubernetes-bazel-test 0b3038c link /test pull-kubernetes-bazel-test

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

k8s-ci-robot

unread,
Oct 8, 2018, 11:15:28 PM10/8/18
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

@justinsb: The following test failed, say /retest to rerun them all:

Test name Commit Details Rerun command
pull-kubernetes-bazel-build 0b3038c link /test pull-kubernetes-bazel-build

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

k8s-ci-robot

unread,
Oct 8, 2018, 11:15:32 PM10/8/18
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

@justinsb: The following tests failed, say /retest to rerun them all:

Test name Commit Details Rerun command
pull-kubernetes-bazel-build 0b3038c link /test pull-kubernetes-bazel-build
pull-kubernetes-bazel-test 0b3038c link /test pull-kubernetes-bazel-test
pull-kubernetes-integration 0b3038c link /test pull-kubernetes-integration
pull-kubernetes-e2e-kops-aws 0b3038c link /test pull-kubernetes-e2e-kops-aws

k8s-ci-robot

unread,
Oct 8, 2018, 11:15:48 PM10/8/18
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

@justinsb: The following tests failed, say /retest to rerun them all:

Test name Commit Details Rerun command
pull-kubernetes-bazel-build 0b3038c link /test pull-kubernetes-bazel-build
pull-kubernetes-bazel-test 0b3038c link /test pull-kubernetes-bazel-test
pull-kubernetes-integration 0b3038c link /test pull-kubernetes-integration
pull-kubernetes-e2e-kops-aws 0b3038c link /test pull-kubernetes-e2e-kops-aws
pull-kubernetes-e2e-gce 0b3038c link /test pull-kubernetes-e2e-gce
pull-kubernetes-e2e-gce-device-plugin-gpu 0b3038c link /test pull-kubernetes-e2e-gce-device-plugin-gpu
pull-kubernetes-node-e2e 0b3038c link /test pull-kubernetes-node-e2e

k8s-ci-robot

unread,
Oct 8, 2018, 11:15:55 PM10/8/18
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

k8s-ci-robot

unread,
Oct 8, 2018, 11:16:33 PM10/8/18
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention
pull-kubernetes-e2e-gce-device-plugin-gpu 0b3038c link /test pull-kubernetes-e2e-gce-device-plugin-gpu

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

k8s-ci-robot

unread,
Oct 8, 2018, 11:16:39 PM10/8/18
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention
pull-kubernetes-node-e2e 0b3038c link /test pull-kubernetes-node-e2e
pull-kubernetes-e2e-gce-100-performance 0b3038c link /test pull-kubernetes-e2e-gce-100-performance
pull-kubernetes-kubemark-e2e-gce-big 0b3038c link /test pull-kubernetes-kubemark-e2e-gce-big
pull-kubernetes-typecheck 0b3038c link /test pull-kubernetes-typecheck

k8s-ci-robot

unread,
Oct 8, 2018, 11:16:40 PM10/8/18
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention
pull-kubernetes-verify 0b3038c link /test pull-kubernetes-verify

k8s-ci-robot

unread,
Oct 8, 2018, 11:17:30 PM10/8/18
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

k8s-ci-robot

unread,
Oct 8, 2018, 11:17:34 PM10/8/18
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention
pull-kubernetes-kubemark-e2e-gce-big 0b3038c link /test pull-kubernetes-kubemark-e2e-gce-big

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

fejta-bot

unread,
Jan 6, 2019, 10:24:23 PM1/6/19
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

fejta-bot

unread,
Feb 5, 2019, 10:44:04 PM2/5/19
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.

/lifecycle rotten

Jordan Liggitt

unread,
Feb 26, 2019, 10:01:02 AM2/26/19
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

given the in progress move to networking.k8s.io, and the impending removal of extensions/v1beta1, let's avoid adding new uses of extensions/v1beta1, especially in clients like kubectl that have longer skew support

Jordan Liggitt

unread,
Mar 15, 2019, 12:14:08 PM3/15/19
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

closing this for now, can revisit once ingress v1 plans are completed in 1.15

/closew

Jordan Liggitt

unread,
Mar 15, 2019, 12:14:43 PM3/15/19
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

Closed #44534.

Reply all
Reply to author
Forward
0 new messages