diff --git a/pkg/initializer/common/config/hsmconfig.go b/pkg/initializer/common/config/hsmconfig.go index 8249a015..86e4cca6 100644 --- a/pkg/initializer/common/config/hsmconfig.go +++ b/pkg/initializer/common/config/hsmconfig.go @@ -39,11 +39,11 @@ type Client interface { Get(ctx context.Context, key client.ObjectKey, obj client.Object) error } -// ReadHSMConfig reads hsm configuration from 'ibp-hsm-config', and key 'ibp-hsm-config.yaml' +// ReadHSMConfig reads hsm configuration from 'ibm-hlfsupport-hsm-config', and key 'ibm-hlfsupport-hsm-config.yaml' // from data func ReadHSMConfig(client Client, instance metav1.Object) (*HSMConfig, error) { // NOTE: This is hard-coded because this name should never be different - name := "ibp-hsm-config" + name := "ibm-hlfsupport-hsm-config" cm := &corev1.ConfigMap{} err := client.Get( @@ -55,11 +55,11 @@ func ReadHSMConfig(client Client, instance metav1.Object) (*HSMConfig, error) { cm, ) if err != nil { - return nil, errors.Wrap(err, "failed to get hsm config 'ibp-hsm-config'") + return nil, errors.Wrap(err, "failed to get hsm config 'ibm-hlfsupport-hsm-config'") } hsmConfig := &HSMConfig{} - err = yaml.Unmarshal([]byte(cm.Data["ibp-hsm-config.yaml"]), hsmConfig) + err = yaml.Unmarshal([]byte(cm.Data["ibm-hlfsupport-hsm-config.yaml"]), hsmConfig) if err != nil { return nil, err } diff --git a/pkg/offering/base/ca/ca.go b/pkg/offering/base/ca/ca.go index 8c77428b..e2559143 100644 --- a/pkg/offering/base/ca/ca.go +++ b/pkg/offering/base/ca/ca.go @@ -378,7 +378,7 @@ func (ca *CA) Initialize(instance *current.IBPCA, update Update) error { } else { hsmConfig, err := commonconfig.ReadHSMConfig(ca.Client, instance) if err != nil { - return errors.New("using non-proxy HSM, but no HSM config defined as config map 'ibp-hsm-config'") + return errors.New("using non-proxy HSM, but no HSM config defined as config map 'ibm-hlfsupport-hsm-config'") } if hsmConfig.Daemon != nil { diff --git a/pkg/offering/base/ca/ca_test.go b/pkg/offering/base/ca/ca_test.go index 9cb0c094..0b8e53ea 100644 --- a/pkg/offering/base/ca/ca_test.go +++ b/pkg/offering/base/ca/ca_test.go @@ -642,7 +642,7 @@ var _ = Describe("Base CA", func() { Expect(err).NotTo(HaveOccurred()) o.Data = map[string]string{ - "ibp-hsm-config.yaml": string(bytes), + "ibm-hlfsupport-hsm-config.yaml": string(bytes), } } return nil diff --git a/pkg/offering/base/ca/override/deployment_test.go b/pkg/offering/base/ca/override/deployment_test.go index 4cc396ed..e44b7839 100644 --- a/pkg/offering/base/ca/override/deployment_test.go +++ b/pkg/offering/base/ca/override/deployment_test.go @@ -113,7 +113,7 @@ var _ = Describe("Deployment Overrides", func() { return err } o := obj.(*corev1.ConfigMap) - o.Data = map[string]string{"ibp-hsm-config.yaml": string(configBytes)} + o.Data = map[string]string{"ibm-hlfsupport-hsm-config.yaml": string(configBytes)} } return nil } diff --git a/pkg/offering/base/orderer/node.go b/pkg/offering/base/orderer/node.go index d6dfd160..6c815e5d 100644 --- a/pkg/offering/base/orderer/node.go +++ b/pkg/offering/base/orderer/node.go @@ -490,7 +490,7 @@ func (n *Node) Initialize(instance *current.IBPOrderer, update Update) error { hsmConfig, err := commonconfig.ReadHSMConfig(n.Client, instance) if err != nil { - return errors.New("using non-proxy HSM, but no HSM config defined as config map 'ibp-hsm-config'") + return errors.New("using non-proxy HSM, but no HSM config defined as config map 'ibm-hlfsupport-hsm-config'") } if hsmConfig.Daemon != nil { diff --git a/pkg/offering/base/orderer/node_test.go b/pkg/offering/base/orderer/node_test.go index f8c6bfc8..0fb779d0 100644 --- a/pkg/offering/base/orderer/node_test.go +++ b/pkg/offering/base/orderer/node_test.go @@ -465,7 +465,7 @@ var _ = Describe("Base Orderer Node", func() { Expect(err).NotTo(HaveOccurred()) o.Data = map[string]string{ - "ibp-hsm-config.yaml": string(bytes), + "ibm-hlfsupport-hsm-config.yaml": string(bytes), } } return nil diff --git a/pkg/offering/base/orderer/override/deployment_test.go b/pkg/offering/base/orderer/override/deployment_test.go index 4980503b..7dd2c43d 100644 --- a/pkg/offering/base/orderer/override/deployment_test.go +++ b/pkg/offering/base/orderer/override/deployment_test.go @@ -119,7 +119,7 @@ var _ = Describe("Base Orderer Deployment Overrides", func() { return err } o := obj.(*corev1.ConfigMap) - o.Data = map[string]string{"ibp-hsm-config.yaml": string(configBytes)} + o.Data = map[string]string{"ibm-hlfsupport-hsm-config.yaml": string(configBytes)} } return nil } diff --git a/pkg/offering/base/peer/override/deployment_test.go b/pkg/offering/base/peer/override/deployment_test.go index 601f70de..0b1039de 100644 --- a/pkg/offering/base/peer/override/deployment_test.go +++ b/pkg/offering/base/peer/override/deployment_test.go @@ -129,7 +129,7 @@ var _ = Describe("Base Peer Deployment Overrides", func() { return err } o := obj.(*corev1.ConfigMap) - o.Data = map[string]string{"ibp-hsm-config.yaml": string(configBytes)} + o.Data = map[string]string{"ibm-hlfsupport-hsm-config.yaml": string(configBytes)} } return nil } diff --git a/pkg/offering/base/peer/peer.go b/pkg/offering/base/peer/peer.go index 5859e49e..643be0f3 100644 --- a/pkg/offering/base/peer/peer.go +++ b/pkg/offering/base/peer/peer.go @@ -379,7 +379,7 @@ func (p *Peer) Initialize(instance *current.IBPPeer, update Update) error { } else { hsmConfig, err := commonconfig.ReadHSMConfig(p.Client, instance) if err != nil { - return errors.New("using non-proxy HSM, but no HSM config defined as config map 'ibp-hsm-config'") + return errors.New("using non-proxy HSM, but no HSM config defined as config map 'ibm-hlfsupport-hsm-config'") } if hsmConfig.Daemon != nil {