Skip to content
This repository has been archived by the owner on May 13, 2024. It is now read-only.

Commit

Permalink
fix: wrong variable ref
Browse files Browse the repository at this point in the history
Signed-off-by: Lin Yang <[email protected]>
  • Loading branch information
reaver-flomesh committed Aug 8, 2023
1 parent 4804955 commit 8bb1420
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions controllers/flb/service_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -615,9 +615,8 @@ func (r *ServiceReconciler) getTags(svc *corev1.Service) string {
return ""
}

var tagsBytes []byte
tags := make([]serviceTag, 0)
if err := yaml.Unmarshal(tagsBytes, &tags); err != nil {
if err := yaml.Unmarshal([]byte(rawTags), &tags); err != nil {
klog.Errorf("Failed to unmarshal tags: %s, it' not in a valid format", err)
defer r.Recorder.Eventf(svc, corev1.EventTypeWarning, "InvalidTagFormat", "Format of annotation %s is not valid", commons.FlbTagsAnnotation)
return ""
Expand Down

0 comments on commit 8bb1420

Please sign in to comment.