Skip to content

Commit ba30951

Browse files
committed
Compare decryption annotation case-insensitive
1 parent 28f712e commit ba30951

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

internal/decryptor/decryptor.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -189,10 +189,8 @@ func New(client client.Client, kustomization *kustomizev1.Kustomization, opts ..
189189

190190
// IsDecryptionDisabled checks if the given object has the decrypt: disabled annotation set
191191
func IsDecryptionDisabled(annotations map[string]string) bool {
192-
if annotations != nil && annotations[fmt.Sprintf("%s/decrypt", kustomizev1.GroupVersion.Group)] == kustomizev1.DisabledValue {
193-
return true
194-
}
195-
return false
192+
return annotations != nil &&
193+
strings.EqualFold(annotations[fmt.Sprintf("%s/decrypt", kustomizev1.GroupVersion.Group)], kustomizev1.DisabledValue)
196194
}
197195

198196
// IsEncryptedSecret checks if the given object is a Kubernetes Secret encrypted

0 commit comments

Comments
 (0)