policy: allow explicitly selecting NilPolicy

this makes it easier to temporarily disable keel on a resource

Signed-off-by: Mate Ory <mate.ory@banzaicloud.com>
pull/322/head
Mate Ory 2018-12-06 14:17:54 +01:00
parent 2a210558db
commit 7f6851e854
No known key found for this signature in database
GPG Key ID: 508C1818CF296DBF
1 changed files with 2 additions and 0 deletions

View File

@ -92,6 +92,8 @@ func GetPolicy(policyName string, options *Options) Policy {
return ParseSemverPolicy(policyName)
case "force":
return NewForcePolicy(options.MatchTag)
case "", "never":
return &NilPolicy{}
}
log.Infof("policy.GetPolicy: unknown policy '%s', please check your configuration", policyName)