mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-12-18 11:00:25 +00:00
rbd: remove kp-metadata register functions of HPCS/Key Protect
This commit removes `kp-metadata` registration from existing HPCS or Key Protect code as per the plan. Fix #2816 Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
This commit is contained in:
parent
7654a56367
commit
ad6a3d7575
@ -23,7 +23,6 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/ceph/ceph-csi/internal/util/k8s"
|
"github.com/ceph/ceph-csi/internal/util/k8s"
|
||||||
"github.com/ceph/ceph-csi/internal/util/log"
|
|
||||||
|
|
||||||
kp "github.com/IBM/keyprotect-go-client"
|
kp "github.com/IBM/keyprotect-go-client"
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
@ -31,7 +30,6 @@ import (
|
|||||||
|
|
||||||
const (
|
const (
|
||||||
kmsTypeKeyProtectMetadata = "ibmkeyprotect"
|
kmsTypeKeyProtectMetadata = "ibmkeyprotect"
|
||||||
kmsTypeKeyProtectMetadataOld = "kp-metadata"
|
|
||||||
// keyProtectMetadataDefaultSecretsName is the default name of the Kubernetes Secret
|
// keyProtectMetadataDefaultSecretsName is the default name of the Kubernetes Secret
|
||||||
// that contains the credentials to access the Key Protect KMS. The name of
|
// that contains the credentials to access the Key Protect KMS. The name of
|
||||||
// the Secret can be configured by setting the `IBM_KP_SECRET_NAME`
|
// the Secret can be configured by setting the `IBM_KP_SECRET_NAME`
|
||||||
@ -63,21 +61,6 @@ var _ = RegisterProvider(Provider{
|
|||||||
Initializer: initKeyProtectKMS,
|
Initializer: initKeyProtectKMS,
|
||||||
})
|
})
|
||||||
|
|
||||||
// RegisterProvider for kmsTypeKeyProtectMetadataOld is kept here for backward compatibility.
|
|
||||||
var _ = RegisterProvider(Provider{
|
|
||||||
UniqueID: kmsTypeKeyProtectMetadataOld,
|
|
||||||
Initializer: initKeyProtectKMSOld,
|
|
||||||
})
|
|
||||||
|
|
||||||
// initKeyProtectKMSOld is the wrapper with a warning log.
|
|
||||||
func initKeyProtectKMSOld(args ProviderInitArgs) (EncryptionKMS, error) {
|
|
||||||
log.WarningLogMsg("%q is deprecated provider for IBM key Protect,"+
|
|
||||||
"use new provider name %q in the configuration, proceeding with %q",
|
|
||||||
kmsTypeKeyProtectMetadataOld, kmsTypeKeyProtectMetadata, kmsTypeKeyProtectMetadata)
|
|
||||||
|
|
||||||
return initKeyProtectKMS(args)
|
|
||||||
}
|
|
||||||
|
|
||||||
// KeyProtectKMS store the KMS connection information retrieved from the kms configmap.
|
// KeyProtectKMS store the KMS connection information retrieved from the kms configmap.
|
||||||
type keyProtectKMS struct {
|
type keyProtectKMS struct {
|
||||||
// basic options to get the secret
|
// basic options to get the secret
|
||||||
|
Loading…
Reference in New Issue
Block a user