Skip to content

Commit 94c6adf

Browse files
committed
wip: fix nonworking proxy.haproxy.annotations
1 parent a3ad6ad commit 94c6adf

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pkg/haproxy/haproxy.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package haproxy
22

33
import (
44
"fmt"
5+
"maps"
56
"strconv"
67

78
appsv1 "k8s.io/api/apps/v1"
@@ -132,7 +133,8 @@ func Service(cr *apiv1alpha1.PerconaServerMySQL, secret *corev1.Secret) *corev1.
132133
func StatefulSet(cr *apiv1alpha1.PerconaServerMySQL, initImage, configHash, tlsHash string, secret *corev1.Secret) *appsv1.StatefulSet {
133134
labels := MatchLabels(cr)
134135

135-
annotations := make(map[string]string)
136+
annotations := maps.Clone(cr.Spec.Proxy.HAProxy.Annotations)
137+
136138
if configHash != "" {
137139
annotations[string(naming.AnnotationConfigHash)] = configHash
138140
}

0 commit comments

Comments
 (0)