Skip to content

Commit

Permalink
Add KANIKO_REGISTRY_MIRROR env var (#1875)
Browse files Browse the repository at this point in the history
  • Loading branch information
imjasonh authored Jan 14, 2022
1 parent 0f986a4 commit 1a6b8ce
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cmd/executor/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,11 @@ func addKanikoOptionsFlags() {
RootCmd.PersistentFlags().BoolVarP(&opts.CacheCopyLayers, "cache-copy-layers", "", false, "Caches copy layers")
RootCmd.PersistentFlags().VarP(&opts.IgnorePaths, "ignore-path", "", "Ignore these paths when taking a snapshot. Set it repeatedly for multiple paths.")
RootCmd.PersistentFlags().BoolVarP(&opts.ForceBuildMetadata, "force-build-metadata", "", false, "Force add metadata layers to build image")

// Allow setting --registry-mirror using an environment variable.
if val, ok := os.LookupEnv("KANIKO_REGISTRY_MIRROR"); ok {
opts.RegistryMirrors.Set(val)
}
}

// addHiddenFlags marks certain flags as hidden from the executor help text
Expand Down

0 comments on commit 1a6b8ce

Please sign in to comment.