@@ -90,12 +90,22 @@ func Frontend(i store.Ingress, r *haproxy.Rules, m haproxy.Maps) []Annotation {
9090 }
9191}
9292
93- func Backend (b * models.Backend ) []Annotation {
93+ func Backend (b * models.Backend , s store. K8s , certs * haproxy. Certificates ) []Annotation {
9494 annotations := []Annotation {
9595 NewBackendCfgSnippet ("backend-config-snippet" , b .Name ),
9696 service .NewAbortOnClose ("abortonclose" , b ),
9797 service .NewTimeoutCheck ("timeout-check" , b ),
9898 service .NewLoadBalance ("load-balance" , b ),
99+ service .NewCheck ("check" , b ),
100+ service .NewCheckInter ("check-interval" , b ),
101+ service .NewCookie ("cookie-persistence" , b ),
102+ service .NewMaxconn ("pod-maxconn" , b ),
103+ service .NewSendProxy ("send-proxy-protocol" , b ),
104+ // Order is important for ssl annotations so they don't conflict
105+ service .NewSSL ("server-ssl" , b ),
106+ service .NewCrt ("server-crt" , certs , b ),
107+ service .NewCA ("server-ca" , certs , b ),
108+ service .NewProto ("server-proto" , b ),
99109 }
100110 if b .Mode == "http" {
101111 annotations = append (annotations ,
@@ -106,21 +116,6 @@ func Backend(b *models.Backend) []Annotation {
106116 return annotations
107117}
108118
109- func Server (s * models.Server , certs * haproxy.Certificates ) []Annotation {
110- return []Annotation {
111- service .NewCheck ("check" , s ),
112- service .NewCheckInter ("check-interval" , s ),
113- service .NewCookie ("cookie-persistence" , nil , s ),
114- service .NewMaxconn ("pod-maxconn" , s ),
115- service .NewSendProxy ("send-proxy-protocol" , s ),
116- // Order is important for ssl annotations so they don't conflict
117- service .NewSSL ("server-ssl" , s ),
118- service .NewCrt ("server-crt" , certs , s ),
119- service .NewCA ("server-ca" , certs , s ),
120- service .NewProto ("server-proto" , s ),
121- }
122- }
123-
124119func SetDefaultValue (annotation , value string ) {
125120 common .DefaultValues [annotation ] = value
126121}
0 commit comments