Merge pull request #293 from ceph/devel

Syncing latest changes from upstream devel for ceph-csi
This commit is contained in:
openshift-merge-bot[bot] 2024-04-15 14:34:12 +00:00 committed by GitHub
commit 693809fd93
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -18,7 +18,6 @@ package kms
import ( import (
"context" "context"
"encoding/base64"
"errors" "errors"
"fmt" "fmt"
@ -106,19 +105,11 @@ func initAzureKeyVaultKMS(args ProviderInitArgs) (EncryptionKMS, error) {
return nil, fmt.Errorf("failed to get secrets for %T, %w", kms, err) return nil, fmt.Errorf("failed to get secrets for %T, %w", kms, err)
} }
var encodedClientCertificate string err = setConfigString(&kms.clientCertificate, secrets, azureClientCertificate)
err = setConfigString(&encodedClientCertificate, secrets, azureClientCertificate)
if err != nil { if err != nil {
return nil, err return nil, err
} }
clientCertificate, err := base64.StdEncoding.DecodeString(encodedClientCertificate)
if err != nil {
return nil, fmt.Errorf("failed to decode client certificate: %w", err)
}
kms.clientCertificate = string(clientCertificate)
return kms, nil return kms, nil
} }