Add KANIKO_REGISTRY_MIRROR env var (#1875)
This commit is contained in:
parent
0f986a423f
commit
1a6b8ce37b
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue