Skip to content

Commit 03bde66

Browse files
committed
change bucket secret name to bucket uid
1 parent a19bb81 commit 03bde66

1 file changed

Lines changed: 1 addition & 8 deletions

File tree

poollet/bucketpoollet/controllers/bucket_controller.go

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ package controllers
55

66
import (
77
"context"
8-
"crypto/sha256"
9-
"encoding/hex"
108
"fmt"
119

1210
"github.com/go-logr/logr"
@@ -388,11 +386,6 @@ func (r *BucketReconciler) create(ctx context.Context, log logr.Logger, bucket *
388386
return ctrl.Result{}, nil
389387
}
390388

391-
func (r *BucketReconciler) bucketSecretName(bucketName string) string {
392-
sum := sha256.Sum256([]byte(bucketName))
393-
return hex.EncodeToString(sum[:])[:63]
394-
}
395-
396389
var iriBucketStateToBucketState = map[iri.BucketState]storagev1alpha1.BucketState{
397390
iri.BucketState_BUCKET_PENDING: storagev1alpha1.BucketStatePending,
398391
iri.BucketState_BUCKET_AVAILABLE: storagev1alpha1.BucketStateAvailable,
@@ -422,7 +415,7 @@ func (r *BucketReconciler) updateStatus(ctx context.Context, log logr.Logger, bu
422415
},
423416
ObjectMeta: metav1.ObjectMeta{
424417
Namespace: bucket.Namespace,
425-
Name: r.bucketSecretName(bucket.Name),
418+
Name: string(bucket.UID),
426419
Labels: map[string]string{
427420
bucketpoolletv1alpha1.BucketUIDLabel: string(bucket.UID),
428421
},

0 commit comments

Comments
 (0)