Skip to content

Commit

Permalink
Fixing reconcile for secret noobaa-root-master-key-volume
Browse files Browse the repository at this point in the history
Signed-off-by: jackyalbo <jacky.albo@gmail.com>
  • Loading branch information
jackyalbo committed Apr 4, 2024
1 parent 3cf9fff commit 1cf225c
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions pkg/system/phase2_creating.go
Original file line number Diff line number Diff line change
Expand Up @@ -1028,10 +1028,12 @@ func (r *Reconciler) keyRotate() error {
// ReconcileSecretMap sets the root master key for rotating key / map
func (r *Reconciler) ReconcileSecretMap(data map[string]string) error {
if data == nil {
return fmt.Errorf("System Reconciler ReconcileSecretMap data is nil")
return fmt.Errorf("system Reconciler ReconcileSecretMap data is nil")
}
r.SecretRootMasterMap.StringData = data
if err := r.ReconcileObject(r.SecretRootMasterMap, nil); err != nil {
if err := r.ReconcileObject(r.SecretRootMasterMap, func() error {
r.SecretRootMasterMap.StringData = data
return nil
}); err != nil {
return err
}
return nil
Expand All @@ -1040,7 +1042,7 @@ func (r *Reconciler) ReconcileSecretMap(data map[string]string) error {
// ReconcileSecretString sets the root master key for single string secret
func (r *Reconciler) ReconcileSecretString(data string) error {
if len(data) == 0 {
return fmt.Errorf("System Reconciler ReconcileSecreString data len is zero")
return fmt.Errorf("system Reconciler ReconcileSecretString data len is zero")
}
r.SecretRootMasterKey = data
return nil
Expand Down

0 comments on commit 1cf225c

Please sign in to comment.