Skip to content

Commit e3e7eed

Browse files
committed
BUG/MINOR: fix creation of user annotations
1 parent f4939cc commit e3e7eed

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed
File renamed without changes.

pkg/annotations/cfgSnippet.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,9 +279,11 @@ func UpdateFrontendCfgSnippet(api api.HAProxyClient, frontends ...string) (updat
279279
}
280280
if data != nil && len(data.value) > 0 {
281281
data = &cfgData{value: append(newData, data.value...)}
282+
} else {
283+
data = &cfgData{value: newData}
282284
}
283285
}
284-
if data == nil {
286+
if data == nil || len(data.value) == 0 {
285287
continue
286288
}
287289
err = api.FrontendCfgSnippetSet(ft, data.value)

0 commit comments

Comments
 (0)