From 611940c840453baa868245eea948455b99b8c3ea Mon Sep 17 00:00:00 2001 From: Domenico Luciani Date: Wed, 5 Jul 2023 15:44:05 +0200 Subject: [PATCH] Add the support to the new --insecure-registry parameter in the creator command Signed-off-by: Domenico Luciani --- cmd/lifecycle/cli/flags.go | 5 +++++ cmd/lifecycle/creator.go | 1 + 2 files changed, 6 insertions(+) diff --git a/cmd/lifecycle/cli/flags.go b/cmd/lifecycle/cli/flags.go index a469a60bd..b581d2894 100644 --- a/cmd/lifecycle/cli/flags.go +++ b/cmd/lifecycle/cli/flags.go @@ -168,6 +168,11 @@ func FlagForceRebase(force *bool) { flagSet.BoolVar(force, "force", *force, "execute rebase even if operation is unsafe") } +// FlagInsecureRegistry sets insecure-registry parameter as available +func FlagInsecureRegistry(insecureRegistry *string) { + flagSet.StringVar(insecureRegistry, "insecure-registry", *insecureRegistry, "to use an 'insecure' registry") +} + // deprecated func DeprecatedFlagRunImage(deprecatedRunImage *string) { diff --git a/cmd/lifecycle/creator.go b/cmd/lifecycle/creator.go index fd48fc2ee..b2e638c12 100644 --- a/cmd/lifecycle/creator.go +++ b/cmd/lifecycle/creator.go @@ -59,6 +59,7 @@ func (c *createCmd) DefineFlags() { cli.FlagTags(&c.AdditionalTags) cli.FlagUID(&c.UID) cli.FlagUseDaemon(&c.UseDaemon) + cli.FlagInsecureRegistry(&c.InsecureRegistry) } // Args validates arguments and flags, and fills in default values.