Skip to content

Commit 162b76f

Browse files
authored
Merge pull request #1655 from jackyalbo/jacky-5_19
[Backport 5.19] KMIP - Fix for empty StringData after calling KubeUpdate
2 parents 322634d + f1f5a7a commit 162b76f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pkg/util/kms/kms_kmip_storage.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,7 @@ func (k *KMIPSecretStorage) GetSecret(
264264

265265
lookfor := KMIPUniqueID // Addition to upgrade
266266
var activeKeyID string
267+
util.KubeCheck(k.secret)
267268
if strings.HasSuffix(secretID, "-root-master-key-backend") {
268269
lookfor = NewKMIPUniqueID
269270
exists := false
@@ -415,9 +416,10 @@ func (k *KMIPSecretStorage) DeleteSecret(
415416
lookfor = NewKMIPUniqueID
416417
}
417418
// Find the key ID
419+
util.KubeCheck(k.secret)
418420
uniqueIdentifier, exists := k.secret.StringData[lookfor]
419421
if !exists {
420-
log.Errorf("KMIPSecretStorage.DeleteSecret() No uniqueIdentifier in the secret")
422+
log.Errorf("KMIPSecretStorage.DeleteSecret() No uniqueIdentifier %v in the secret %v", lookfor, k.secret.Name)
421423
return secrets.ErrInvalidSecretId
422424
}
423425

0 commit comments

Comments
 (0)