mirror of
https://github.com/rancher/dynamiclistener.git
synced 2025-07-01 09:01:47 +00:00
Merge pull request #35 from dramich/panic
Update IsStatic to check for nil annotations
This commit is contained in:
commit
86af265dcd
@ -179,7 +179,10 @@ func populateCN(secret *v1.Secret, cn ...string) *v1.Secret {
|
||||
// IsStatic returns true if the Secret has an attribute indicating that it contains
|
||||
// a static (aka user-provided) certificate, which should not be modified.
|
||||
func IsStatic(secret *v1.Secret) bool {
|
||||
return secret.Annotations[Static] == "true"
|
||||
if secret.Annotations != nil {
|
||||
return secret.Annotations[Static] == "true"
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// NeedsUpdate returns true if any of the CNs are not currently present on the
|
||||
|
Loading…
Reference in New Issue
Block a user