Skip to content

Commit

Permalink
changes in code related to the update of the package of cloud credent…
Browse files Browse the repository at this point in the history
…ial operator

change NewCodec() to Codec since it was removed and we should use global codec

Signed-off-by: shirady <[email protected]>
  • Loading branch information
shirady committed Oct 11, 2023
1 parent 97cdafe commit e8a0cfa
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions pkg/system/phase2_creating.go
Original file line number Diff line number Diff line change
Expand Up @@ -686,11 +686,7 @@ func (r *Reconciler) ReconcileAWSCredentials() error {
err = r.Client.Get(r.Ctx, util.ObjectKey(r.AWSCloudCreds), r.AWSCloudCreds)
if err == nil {
// credential request already exist. get the bucket name
codec, err := cloudcredsv1.NewCodec()
if err != nil {
r.Logger.Error("error creating codec for cloud credentials providerSpec")
return err
}
codec := cloudcredsv1.Codec
awsProviderSpec := &cloudcredsv1.AWSProviderSpec{}
err = codec.DecodeProviderSpec(r.AWSCloudCreds.Spec.ProviderSpec, awsProviderSpec)
if err != nil {
Expand All @@ -712,11 +708,7 @@ func (r *Reconciler) ReconcileAWSCredentials() error {
// credential request does not exist. create one
r.Logger.Info("Creating CredentialsRequest resource")
bucketName = r.generateBackingStoreTargetName()
codec, err := cloudcredsv1.NewCodec()
if err != nil {
r.Logger.Error("error creating codec for cloud credentials providerSpec")
return err
}
codec := cloudcredsv1.Codec
awsProviderSpec := &cloudcredsv1.AWSProviderSpec{}
err = codec.DecodeProviderSpec(r.AWSCloudCreds.Spec.ProviderSpec, awsProviderSpec)
if err != nil {
Expand Down

0 comments on commit e8a0cfa

Please sign in to comment.