Skip to content

Commit

Permalink
[SAPBTPCFS-15469] Update Service Instance on change of 'parametersFro…
Browse files Browse the repository at this point in the history
…m' secret
  • Loading branch information
I065450 committed Dec 18, 2024
1 parent ece2c30 commit 7aaf27d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions controllers/serviceinstance_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -567,10 +567,10 @@ func (r *ServiceInstanceReconciler) buildSMRequestParameters(ctx context.Context
//sync instance labels
for key, value := range serviceInstance.Labels {
if strings.HasPrefix(key, common.InstanceSecretRefLabel) {
if secretName, ok := instanceLabels[key]; !ok {
if _, ok := instanceLabels[key]; !ok {
instanceLabelsChanged = true
if err := utils.RemoveWatchForSecret(ctx, r.Client, types.NamespacedName{Name: secretName, Namespace: serviceInstance.Namespace}, string(serviceInstance.UID)); err != nil {
log.Error(err, fmt.Sprintf("failed to unwatch secret %s", secretName))
if err := utils.RemoveWatchForSecret(ctx, r.Client, types.NamespacedName{Name: value, Namespace: serviceInstance.Namespace}, string(serviceInstance.UID)); err != nil {
log.Error(err, fmt.Sprintf("failed to unwatch secret %s", value))
return nil, err
}
}
Expand Down

0 comments on commit 7aaf27d

Please sign in to comment.