Skip to content

Commit

Permalink
fix: fix always update EMQX config
Browse files Browse the repository at this point in the history
Signed-off-by: Rory Z <[email protected]>
  • Loading branch information
Rory-Z committed Feb 22, 2024
1 parent d723276 commit 0700113
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions controllers/apps/v2beta1/sync_emqx_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func (s *syncConfig) reconcile(ctx context.Context, logger logr.Logger, instance
if instance.Annotations == nil {
instance.Annotations = map[string]string{}
}
instance.Annotations[appsv2beta1.AnnotationsLastEMQXConfigKey] = confStr
instance.Annotations[appsv2beta1.AnnotationsLastEMQXConfigKey] = instance.Spec.Config.Data
if err := s.Client.Update(ctx, instance); err != nil {
return subResult{err: emperror.Wrap(err, "failed to update emqx instance annotation")}
}
Expand Down Expand Up @@ -91,7 +91,7 @@ func (s *syncConfig) reconcile(ctx context.Context, logger logr.Logger, instance
return subResult{err: emperror.Wrap(err, "failed to update configMap")}
}

instance.Annotations[appsv2beta1.AnnotationsLastEMQXConfigKey] = confStr
instance.Annotations[appsv2beta1.AnnotationsLastEMQXConfigKey] = instance.Spec.Config.Data
if err := s.Client.Update(ctx, instance); err != nil {
return subResult{err: emperror.Wrap(err, "failed to update emqx instance annotation")}
}
Expand Down

0 comments on commit 0700113

Please sign in to comment.