From 994a412d0b761c92812a23dac1898eec2f1eb8a1 Mon Sep 17 00:00:00 2001 From: Tejal Desai Date: Tue, 2 Jun 2020 16:08:46 -0700 Subject: [PATCH] some more renames --- cmd/executor/cmd/root.go | 6 +++--- deploy/Dockerfile_debug | 2 +- integration/integration_test.go | 6 +++--- pkg/config/options.go | 2 +- pkg/util/fs_util.go | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/cmd/executor/cmd/root.go b/cmd/executor/cmd/root.go index a31cd0168..77afc92dd 100644 --- a/cmd/executor/cmd/root.go +++ b/cmd/executor/cmd/root.go @@ -83,8 +83,8 @@ var RootCmd = &cobra.Command{ if len(opts.Destinations) == 0 && opts.ImageNameDigestFile != "" { return errors.New("You must provide --destination if setting ImageNameDigestFile") } - // Update skipped paths - util.UpdateInitialIgnoreList(opts.SkipVarRun) + // Update ignored paths + util.UpdateInitialIgnoreList(opts.IgnoreVarRun) } return nil }, @@ -160,7 +160,7 @@ func addKanikoOptionsFlags() { opts.RegistriesCertificates = make(map[string]string) RootCmd.PersistentFlags().VarP(&opts.RegistriesCertificates, "registry-certificate", "", "Use the provided certificate for TLS communication with the given registry. Expected format is 'my.registry.url=/path/to/the/server/certificate'.") RootCmd.PersistentFlags().StringVarP(&opts.RegistryMirror, "registry-mirror", "", "", "Registry mirror to use has pull-through cache instead of docker.io.") - RootCmd.PersistentFlags().BoolVarP(&opts.SkipVarRun, "whitelist-var-run", "", true, "Ignore /var/run directory when taking image snapshot. Set it to false to preserve /var/run/ in destination image. (Default true).") + RootCmd.PersistentFlags().BoolVarP(&opts.IgnoreVarRun, "whitelist-var-run", "", true, "Ignore /var/run directory when taking image snapshot. Set it to false to preserve /var/run/ in destination image. (Default true).") RootCmd.PersistentFlags().VarP(&opts.Labels, "label", "", "Set metadata for an image. Set it repeatedly for multiple labels.") RootCmd.PersistentFlags().BoolVarP(&opts.SkipUnusedStages, "skip-unused-stages", "", false, "Build only used stages if defined to true. Otherwise it builds by default all stages, even the unnecessaries ones until it reaches the target stage / end of Dockerfile") } diff --git a/deploy/Dockerfile_debug b/deploy/Dockerfile_debug index 66ca8d4b5..02da41550 100644 --- a/deploy/Dockerfile_debug +++ b/deploy/Dockerfile_debug @@ -46,7 +46,7 @@ COPY --from=0 /usr/local/bin/docker-credential-gcr /kaniko/docker-credential-gcr COPY --from=0 /go/src/github.com/awslabs/amazon-ecr-credential-helper/bin/linux-amd64/docker-credential-ecr-login /kaniko/docker-credential-ecr-login COPY --from=0 /usr/local/bin/docker-credential-acr-linux /kaniko/docker-credential-acr COPY --from=1 /distroless/bazel-bin/experimental/busybox/busybox/ /busybox/ -# Declare /busybox as a volume to get it automatically in the path to skip +# Declare /busybox as a volume to get it automatically in the path to ignore VOLUME /busybox COPY files/ca-certificates.crt /kaniko/ssl/certs/ COPY --from=0 /kaniko/.docker /kaniko/.docker diff --git a/integration/integration_test.go b/integration/integration_test.go index 979274eb1..73881fc69 100644 --- a/integration/integration_test.go +++ b/integration/integration_test.go @@ -588,14 +588,14 @@ func filterMetaDiff(metaDiff []string) []string { func filterFileDiff(f []fileDiff) []fileDiff { var newDiffs []fileDiff for _, diff := range f { - isSkipped := false + isIgnored := false for _, p := range allowedDiffPaths { if util.HasFilepathPrefix(diff.Name, p, false) { - isSkipped = true + isIgnored = true break } } - if !isSkipped { + if !isIgnored { newDiffs = append(newDiffs, diff) } } diff --git a/pkg/config/options.go b/pkg/config/options.go index 7732f206f..576d42f09 100644 --- a/pkg/config/options.go +++ b/pkg/config/options.go @@ -55,7 +55,7 @@ type KanikoOptions struct { NoPush bool Cache bool Cleanup bool - SkipVarRun bool + IgnoreVarRun bool SkipUnusedStages bool } diff --git a/pkg/util/fs_util.go b/pkg/util/fs_util.go index e390c7e3a..d957e64be 100644 --- a/pkg/util/fs_util.go +++ b/pkg/util/fs_util.go @@ -55,13 +55,13 @@ var initialIgnoreList = []IgnoreListEntry{ PrefixMatchOnly: false, }, { - // similarly, we skip /etc/mtab, since there is no way to know if the file was mounted or came + // similarly, we ignore /etc/mtab, since there is no way to know if the file was mounted or came // from the base image Path: "/etc/mtab", PrefixMatchOnly: false, }, { - // we skip /tmp/apt-key-gpghome, since the apt keys are added temporarily in this directory. + // we ingore /tmp/apt-key-gpghome, since the apt keys are added temporarily in this directory. // from the base image Path: "/tmp/apt-key-gpghome", PrefixMatchOnly: true,