mirror of
https://github.com/GoogleContainerTools/kaniko
synced 2026-10-18 18:58:32 +02:00
Added skip-push-permission flag (#2657)
Added skip-push-permission flag to conditionally disable push permission check on build start to accommodate for slow network policies
This commit is contained in:
@@ -80,7 +80,9 @@ var (
|
||||
func CheckPushPermissions(opts *config.KanikoOptions) error {
|
||||
targets := opts.Destinations
|
||||
// When no push and no push cache are set, we don't need to check permissions
|
||||
if opts.NoPush && opts.NoPushCache {
|
||||
if opts.SkipPushPermissionCheck {
|
||||
targets = []string{}
|
||||
} else if opts.NoPush && opts.NoPushCache {
|
||||
targets = []string{}
|
||||
} else if opts.NoPush && !opts.NoPushCache {
|
||||
// When no push is set, we want to check permissions for the cache repo
|
||||
|
||||
Reference in New Issue
Block a user