Revert "additional-whitelist"

This reverts commit ac8e123815.
This commit is contained in:
Tejal Desai
2020-01-28 08:52:29 -08:00
parent 4919fb5bca
commit c8b19894bb
3 changed files with 50 additions and 80 deletions
+7 -1
View File
@@ -75,6 +75,12 @@ var RootCmd = &cobra.Command{
return errors.New("You must provide --destination if setting ImageNameDigestFile")
}
if additionalWhitelist == nil {
additionalWhitelist = []string{
"/var/run",
}
}
for _, path := range additionalWhitelist {
util.AddToWhitelist(path)
}
@@ -152,7 +158,7 @@ func addKanikoOptionsFlags() {
// We use nil as the default value so we can differentiate between the flag passed
// with an empty list and the flag not set
RootCmd.PersistentFlags().StringSliceVar(&additionalWhitelist, "additional-whitelist", []string{}, "Paths to whitelist. These will be ignored by kaniko to improve performance.")
RootCmd.PersistentFlags().StringSliceVar(&additionalWhitelist, "additional-whitelist", nil, "Paths to whitelist. These will be ignored be kaniko to improve performance.")
}
// addHiddenFlags marks certain flags as hidden from the executor help text