From af28a4838716219d798b0b1ad6f7b031662cdce6 Mon Sep 17 00:00:00 2001 From: Sebastian Jackel Date: Wed, 29 Aug 2018 09:28:00 +0200 Subject: [PATCH] Rename DockerInsecure field to InsecurePush --- cmd/executor/cmd/root.go | 2 +- pkg/executor/push.go | 2 +- pkg/options/options.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/executor/cmd/root.go b/cmd/executor/cmd/root.go index f0bf594fb1..732f5353d7 100644 --- a/cmd/executor/cmd/root.go +++ b/cmd/executor/cmd/root.go @@ -85,7 +85,7 @@ func addKanikoOptionsFlags(cmd *cobra.Command) { RootCmd.PersistentFlags().VarP(&opts.Destinations, "destination", "d", "Registry the final image should be pushed to. Set it repeatedly for multiple destinations.") RootCmd.PersistentFlags().StringVarP(&opts.SnapshotMode, "snapshotMode", "", "full", "Change the file attributes inspected during snapshotting") RootCmd.PersistentFlags().VarP(&opts.BuildArgs, "build-arg", "", "This flag allows you to pass in ARG values at build time. Set it repeatedly for multiple values.") - RootCmd.PersistentFlags().BoolVarP(&opts.DockerInsecure, "insecure", "", false, "Push to insecure registry using plain HTTP") + RootCmd.PersistentFlags().BoolVarP(&opts.InsecurePush, "insecure", "", false, "Push to insecure registry using plain HTTP") RootCmd.PersistentFlags().BoolVarP(&opts.SkipTlsVerify, "skip-tls-verify", "", false, "Push to insecure registry ignoring TLS verify") RootCmd.PersistentFlags().StringVarP(&opts.TarPath, "tarPath", "", "", "Path to save the image in as a tarball instead of pushing") RootCmd.PersistentFlags().BoolVarP(&opts.SingleSnapshot, "single-snapshot", "", false, "Take a single snapshot at the end of the build.") diff --git a/pkg/executor/push.go b/pkg/executor/push.go index 35f1405047..f38d9ecc94 100644 --- a/pkg/executor/push.go +++ b/pkg/executor/push.go @@ -56,7 +56,7 @@ func DoPush(image v1.Image, opts *options.KanikoOptions) error { return errors.Wrap(err, "getting tag for destination") } - if opts.DockerInsecure { + if opts.InsecurePush { newReg, err := name.NewInsecureRegistry(destRef.Repository.Registry.Name(), name.WeakValidation) if err != nil { return errors.Wrap(err, "getting new insecure registry") diff --git a/pkg/options/options.go b/pkg/options/options.go index bffd9c9640..dbbea2afba 100644 --- a/pkg/options/options.go +++ b/pkg/options/options.go @@ -23,7 +23,7 @@ type KanikoOptions struct { SrcContext string SnapshotMode string Bucket string - DockerInsecure bool + InsecurePush bool SkipTlsVerify bool BuildArgs multiArg TarPath string