Refactoring map of updated secrets to include secret

This commit is contained in:
jillianwilson
2021-02-26 10:45:30 -04:00
parent 10b7db3057
commit 0824aa0837
11 changed files with 47 additions and 37 deletions

View File

@@ -4,6 +4,7 @@ import (
"regexp"
appsv1 "k8s.io/api/apps/v1"
corev1 "k8s.io/api/core/v1"
)
const (
@@ -42,7 +43,7 @@ func FilterAnnotations(annotations map[string]string, regex *regexp.Regexp) map[
return filteredAnnotations
}
func AreAnnotationsUsingSecrets(annotations map[string]string, secrets map[string]bool) bool {
func AreAnnotationsUsingSecrets(annotations map[string]string, secrets map[string]*corev1.Secret) bool {
_, ok := secrets[annotations[NameAnnotation]]
if ok {
return true