Skip to content

Commit 3ff14e4

Browse files
ivanmatmatioktalz
authored andcommitted
MINOR: remove configmap annotations from default local service
1 parent 2712d08 commit 3ff14e4

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

pkg/controller/global.go

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -192,10 +192,10 @@ func populateDefaultLocalBackendResources(k8sStore store.K8s, eventChan chan k8s
192192
defaultLocalService := controllerNs.Services[store.DefaultLocalBackend]
193193
if defaultLocalService == nil {
194194
item := &store.Service{
195-
Namespace: podNs,
196-
Name: store.DefaultLocalBackend,
197-
Status: store.ADDED,
198-
Annotations: k8sStore.ConfigMaps.Main.Annotations,
195+
Namespace: podNs,
196+
Name: store.DefaultLocalBackend,
197+
Status: store.ADDED,
198+
199199
Ports: []store.ServicePort{
200200
{
201201
Name: "http",
@@ -233,8 +233,6 @@ func populateDefaultLocalBackendResources(k8sStore store.K8s, eventChan chan k8s
233233
case <-timerEndpoints.C:
234234
case <-eventProcessed:
235235
}
236-
} else {
237-
defaultLocalService.Annotations = k8sStore.ConfigMaps.Main.Annotations
238236
}
239237
return nil
240238
}
@@ -256,7 +254,7 @@ func (c *HAProxyController) handleDefaultLocalService() (reload bool) {
256254
IsDefaultBackend: true,
257255
}
258256

259-
if svc, err = service.New(c.store, ingressPath, nil, false, nil); err == nil {
257+
if svc, err = service.New(c.store, ingressPath, nil, false, nil, c.store.ConfigMaps.Main.Annotations); err == nil {
260258
reload, err = svc.SetDefaultBackend(c.store, c.haproxy, []string{c.haproxy.FrontHTTP, c.haproxy.FrontHTTPS}, c.annotations)
261259
}
262260
if err != nil {

0 commit comments

Comments
 (0)