Skip to content

Commit a2df442

Browse files
committed
Merge branch 'templates'
# Conflicts: # README.md
2 parents 179482a + d58c5f5 commit a2df442

File tree

9 files changed

+145
-82
lines changed

9 files changed

+145
-82
lines changed

Dockerfile

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ RUN apk add --no-cache --virtual .build-deps curl unzip && \
1111
RUN mkdir /lib64 && ln -s /lib/libc.musl-x86_64.so.1 /lib64/ld-linux-x86-64.so.2
1212
RUN mkdir -p /cfg/tmpl
1313
RUN mkdir /consul_templates
14+
RUN mkdir /templates
1415
RUN mkdir -p /certs
1516

1617
ENV CONSUL_ADDRESS="" \

README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -78,14 +78,16 @@ The following query arguments can be used to send as a *reconfigure* request to
7878
|consulTemplateBePath|The path to the Consul Template representing a snippet of the backend configuration. If specified, the proxy template will be loaded from the specified file.|||/consul_templates/tmpl/go-demo-be.tmpl|
7979
|consulTemplateFePath|The path to the Consul Template representing a snippet of the frontend configuration. If specified, the proxy template will be loaded from the specified file.|||/consul_templates/tmpl/go-demo-fe.tmpl|
8080
|distribute |Whether to distribute a request to all the instances of the proxy. Used only in the *swarm* mode.|No|false|true|
81+
|outboundHostname|The hostname where the service is running, for instance on a separate swarm. If specified, the proxy will dispatch requests to that domain.|No||machine123.internal.ecme.com|
8182
|pathType |The ACL derivative. Defaults to *path_beg*. See [HAProxy path](https://cbonte.github.io/haproxy-dconv/configuration-1.5.html#7.3.6-path) for more info.|No||path_beg|
8283
|port |The internal port of a service that should be reconfigured. The port is used only in the *swarm* mode|Only in *swarm* mode|||8080|
8384
|reqRepReplace|A regular expression to apply the modification. If specified, `reqRepSearch` needs to be set as well.|No||\1\ /demo/\2|
8485
|reqRepSearch |A regular expression to search the content to be replaced. If specified, `reqRepReplace` needs to be set as well.|No||^([^\ ]\*)\ /something/(.\*)|
8586
|serviceDomain|The domain of the service. If specified, the proxy will allow access only to requests coming to that domain. Multiple domains should be separated with comma (`,`).|No||ecme.com|
8687
|serviceName |The name of the service. It must match the name of the Swarm service or the one stored in Consul.|Yes | |go-demo |
8788
|servicePath |The URL path of the service. Multiple values should be separated with comma (`,`).|Yes (unless consulTemplatePath is present)||/api/v1/books|
88-
|outboundHostname|The hostname where the service is running, for instance on a separate swarm. If specified, the proxy will dispatch requests to that domain.|No||machine123.internal.ecme.com|
89+
|templateBePath|The path to the template representing a snippet of the backend configuration. If specified, the backend template will be loaded from the specified file. If specified, `templateFePath` must be set as well|||/templates/go-demo-be.tmpl|
90+
|templateFePath|The path to the template representing a snippet of the frontend configuration. If specified, the frontend template will be loaded from the specified file. If specified, `templateBePath` must be set as well|||/templates/go-demo-fe.tmpl|
8991
|skipCheck |Whether to skip adding proxy checks. This option is used only in the *default* mode.|No |false |true |
9092
|users |A comma-separated list of credentials(<user>:<pass>) for HTTP basic auth, which applies only to the service that will be reconfigured.|No||user1:pass1,user2:pass2|
9193

TODO.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# TODO
22

3-
## Template
3+
## Logging
44

55
[ ] Implement
66
[ ] Add integration tests

integration_tests/integration_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@ import (
4343
"io/ioutil"
4444
"log"
4545
"net/http"
46+
"net/url"
4647
"os"
4748
"os/exec"
4849
"strings"
4950
"testing"
50-
"net/url"
5151
)
5252

5353
type IntegrationTestSuite struct {

proxy/ha_proxy_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ func (s HaProxyTestSuite) Test_CreateConfigFromTemplates_AddsDebug() {
177177
os.Setenv("DEBUG", "true")
178178
var actualData string
179179
tmpl := strings.Replace(s.TemplateContent, "tune.ssl.default-dh-param 2048", "tune.ssl.default-dh-param 2048\n debug", -1)
180-
tmpl = strings.Replace(tmpl," option dontlognull\n option dontlog-normal\n", "", -1)
180+
tmpl = strings.Replace(tmpl, " option dontlognull\n option dontlog-normal\n", "", -1)
181181
expectedData := fmt.Sprintf(
182182
"%s%s",
183183
tmpl,

reconfigure.go

+21-9
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,9 @@ type ServiceReconfigure struct {
6262
LookupRetry int
6363
LookupRetryInterval int
6464
ReqRepSearch string
65-
ReqRepReplace string
65+
ReqRepReplace string
66+
TemplateFePath string
67+
TemplateBePath string
6668
}
6769

6870
type BaseReconfigure struct {
@@ -283,7 +285,17 @@ func (m *Reconfigure) putToConsul(addresses []string, sr ServiceReconfigure, ins
283285
}
284286

285287
func (m *Reconfigure) GetTemplates(sr ServiceReconfigure) (front, back string, err error) {
286-
if len(sr.ConsulTemplateFePath) > 0 && len(sr.ConsulTemplateBePath) > 0 {
288+
if len(sr.TemplateFePath) > 0 && len(sr.TemplateBePath) > 0 {
289+
feTmpl, err := readTemplateFile(sr.TemplateFePath)
290+
if err != nil {
291+
return "", "", err
292+
}
293+
beTmpl, err := readTemplateFile(sr.TemplateBePath)
294+
if err != nil {
295+
return "", "", err
296+
}
297+
front, back = m.parseTemplate(string(feTmpl), string(beTmpl), sr)
298+
} else if len(sr.ConsulTemplateFePath) > 0 && len(sr.ConsulTemplateBePath) > 0 { // Sunset
287299
front, err = m.getConsulTemplateFromFile(sr.ConsulTemplateFePath)
288300
if err != nil {
289301
return "", "", err
@@ -327,10 +339,6 @@ func (m *Reconfigure) getTemplateFromGo(sr ServiceReconfigure) (frontend, backen
327339
use_backend {{.AclName}}-be if url_{{.ServiceName}}{{.AclCondition}}`,
328340
sr.Acl,
329341
)
330-
// if len(sr.ReqRepSearch) > 0 && len(sr.ReqRepReplace) > 0 {
331-
// srcFront += `
332-
// reqrep {{.ReqRepSearch}} {{.ReqRepReplace}} if url_{{.ServiceName}}`
333-
// }
334342
srcBack := ""
335343
if len(sr.Users) > 0 {
336344
srcBack += `userlist {{.ServiceName}}Users{{range .Users}}
@@ -357,13 +365,17 @@ func (m *Reconfigure) getTemplateFromGo(sr ServiceReconfigure) (frontend, backen
357365
srcBack += `
358366
acl {{.ServiceName}}UsersAcl http_auth({{.ServiceName}}Users)
359367
http-request auth realm {{.ServiceName}}Realm if !{{.ServiceName}}UsersAcl`
360-
} else if len(os.Getenv("USERS")) > 0 {
368+
} else if len(os.Getenv("USERS")) > 0 {
361369
srcBack += `
362370
acl defaultUsersAcl http_auth(defaultUsers)
363371
http-request auth realm defaultRealm if !defaultUsersAcl`
364372
}
365-
tmplFront, _ := template.New("consulTemplate").Parse(srcFront)
366-
tmplBack, _ := template.New("consulTemplate").Parse(srcBack)
373+
return m.parseTemplate(srcFront, srcBack, sr)
374+
}
375+
376+
func (m *Reconfigure) parseTemplate(front, back string, sr ServiceReconfigure) (pFront, pBack string) {
377+
tmplFront, _ := template.New("consulTemplate").Parse(front)
378+
tmplBack, _ := template.New("consulTemplate").Parse(back)
367379
var ctFront bytes.Buffer
368380
var ctBack bytes.Buffer
369381
tmplFront.Execute(&ctFront, sr)

reconfigure_test.go

+80-64
Original file line numberDiff line numberDiff line change
@@ -66,14 +66,14 @@ func (s *ReconfigureTestSuite) SetupTest() {
6666

6767
// GetTemplate
6868

69-
func (s ReconfigureTestSuite) Test_GetTemplate_ReturnsFormattedContent() {
69+
func (s ReconfigureTestSuite) Test_GetTemplates_ReturnsFormattedContent() {
7070
front, back, _ := s.reconfigure.GetTemplates(s.reconfigure.ServiceReconfigure)
7171

7272
s.Equal(s.ConsulTemplateFe, front)
7373
s.Equal(s.ConsulTemplateBe, back)
7474
}
7575

76-
func (s ReconfigureTestSuite) Test_GetTemplate_AddsHttpAuth_WhenUsersEnvIsPresent() {
76+
func (s ReconfigureTestSuite) Test_GetTemplates_AddsHttpAuth_WhenUsersEnvIsPresent() {
7777
usersOrig := os.Getenv("USERS")
7878
defer func() { os.Setenv("USERS", usersOrig) }()
7979
os.Setenv("USERS", "anything")
@@ -90,10 +90,10 @@ func (s ReconfigureTestSuite) Test_GetTemplate_AddsHttpAuth_WhenUsersEnvIsPresen
9090
s.Equal(expected, back)
9191
}
9292

93-
func (s ReconfigureTestSuite) Test_GetTemplate_AddsHttpAuth_WhenUsersIsPresent() {
93+
func (s ReconfigureTestSuite) Test_GetTemplates_AddsHttpAuth_WhenUsersIsPresent() {
9494
s.reconfigure.Users = []User{
95-
{ Username: "user-1", Password: "pass-1" },
96-
{ Username: "user-2", Password: "pass-2" },
95+
{Username: "user-1", Password: "pass-1"},
96+
{Username: "user-2", Password: "pass-2"},
9797
}
9898
expected := `userlist myServiceUsers
9999
user user-1 insecure-password pass-1
@@ -112,7 +112,7 @@ backend myService-be
112112
s.Equal(expected, back)
113113
}
114114

115-
func (s ReconfigureTestSuite) Test_GetTemplate_ReturnsFormattedContent_WhenModeIsSwarm() {
115+
func (s ReconfigureTestSuite) Test_GetTemplates_ReturnsFormattedContent_WhenModeIsSwarm() {
116116
modes := []string{"service", "sWARm"}
117117
for _, mode := range modes {
118118
s.reconfigure.ServiceReconfigure.Mode = mode
@@ -127,7 +127,7 @@ func (s ReconfigureTestSuite) Test_GetTemplate_ReturnsFormattedContent_WhenModeI
127127
}
128128
}
129129

130-
func (s ReconfigureTestSuite) Test_GetTemplate_AddsHttpAuth_WhenModeIsSwarmAndUsersEnvIsPresent() {
130+
func (s ReconfigureTestSuite) Test_GetTemplates_AddsHttpAuth_WhenModeIsSwarmAndUsersEnvIsPresent() {
131131
usersOrig := os.Getenv("USERS")
132132
defer func() { os.Setenv("USERS", usersOrig) }()
133133
os.Setenv("USERS", "anything")
@@ -144,10 +144,10 @@ func (s ReconfigureTestSuite) Test_GetTemplate_AddsHttpAuth_WhenModeIsSwarmAndUs
144144
s.Equal(expected, actual)
145145
}
146146

147-
func (s ReconfigureTestSuite) Test_GetTemplate_AddsHttpAuth_WhenModeIsSwarmAndUsersIsPresent() {
147+
func (s ReconfigureTestSuite) Test_GetTemplates_AddsHttpAuth_WhenModeIsSwarmAndUsersIsPresent() {
148148
s.reconfigure.Users = []User{
149-
{ Username: "user-1", Password: "pass-1" },
150-
{ Username: "user-2", Password: "pass-2" },
149+
{Username: "user-1", Password: "pass-1"},
150+
{Username: "user-2", Password: "pass-2"},
151151
}
152152
s.reconfigure.ServiceReconfigure.Mode = "swarm"
153153
s.reconfigure.ServiceReconfigure.Port = "1234"
@@ -166,7 +166,7 @@ backend myService-be
166166
s.Equal(expected, actual)
167167
}
168168

169-
func (s ReconfigureTestSuite) Test_GetTemplate_AddsHosts() {
169+
func (s ReconfigureTestSuite) Test_GetTemplates_AddsHosts() {
170170
s.ConsulTemplateFe = `
171171
acl url_myService path_beg path/to/my/service/api path_beg path/to/my/other/service/api
172172
acl domain_myService hdr_dom(host) -i my-domain.com my-other-domain.com
@@ -177,26 +177,7 @@ func (s ReconfigureTestSuite) Test_GetTemplate_AddsHosts() {
177177
s.Equal(s.ConsulTemplateFe, actual)
178178
}
179179

180-
//func (s ReconfigureTestSuite) Test_GetTemplate_AddsReqRep_WhenReqRepSearchAndReqRepReplaceArePresent() {
181-
// s.reconfigure.ReqRepSearch = "this"
182-
// s.reconfigure.ReqRepReplace = "that"
183-
// expected := fmt.Sprintf(`
184-
// acl url_%s path_beg path/to/my/service/api path_beg path/to/my/other/service/api
185-
// use_backend %s-be if url_myService
186-
// reqrep %s %s if url_%s`,
187-
// s.reconfigure.ServiceName,
188-
// s.reconfigure.ServiceName,
189-
// s.reconfigure.ReqRepSearch,
190-
// s.reconfigure.ReqRepReplace,
191-
// s.reconfigure.ServiceName,
192-
// )
193-
//
194-
// front, _, _ := s.reconfigure.GetTemplates(s.reconfigure.ServiceReconfigure)
195-
//
196-
// s.Equal(expected, front)
197-
//}
198-
199-
func (s ReconfigureTestSuite) Test_GetTemplate_AddsReqRep_WhenReqRepSearchAndReqRepReplaceArePresent() {
180+
func (s ReconfigureTestSuite) Test_GetTemplates_AddsReqRep_WhenReqRepSearchAndReqRepReplaceArePresent() {
200181
s.reconfigure.ReqRepSearch = "this"
201182
s.reconfigure.ReqRepReplace = "that"
202183
expected := fmt.Sprintf(`backend myService-be
@@ -215,8 +196,7 @@ func (s ReconfigureTestSuite) Test_GetTemplate_AddsReqRep_WhenReqRepSearchAndReq
215196
s.Equal(expected, backend)
216197
}
217198

218-
219-
func (s ReconfigureTestSuite) Test_GetTemplate_UsesAclNameForFrontEnd() {
199+
func (s ReconfigureTestSuite) Test_GetTemplates_UsesAclNameForFrontEnd() {
220200
s.reconfigure.AclName = "my-acl"
221201
s.ConsulTemplateFe = `
222202
acl url_myService path_beg path/to/my/service/api path_beg path/to/my/other/service/api
@@ -226,15 +206,15 @@ func (s ReconfigureTestSuite) Test_GetTemplate_UsesAclNameForFrontEnd() {
226206
s.Equal(s.ConsulTemplateFe, actual)
227207
}
228208

229-
func (s ReconfigureTestSuite) Test_GetTemplate_UsesPathReg() {
209+
func (s ReconfigureTestSuite) Test_GetTemplates_UsesPathReg() {
230210
s.ConsulTemplateFe = strings.Replace(s.ConsulTemplateFe, "path_beg", "path_reg", -1)
231211
s.reconfigure.PathType = "path_reg"
232212
front, _, _ := s.reconfigure.GetTemplates(s.reconfigure.ServiceReconfigure)
233213

234214
s.Equal(s.ConsulTemplateFe, front)
235215
}
236216

237-
func (s ReconfigureTestSuite) Test_GetTemplate_AddsColor() {
217+
func (s ReconfigureTestSuite) Test_GetTemplates_AddsColor() {
238218
s.reconfigure.ServiceColor = "black"
239219
expected := fmt.Sprintf(`service "%s-%s"`, s.ServiceName, s.reconfigure.ServiceColor)
240220

@@ -243,15 +223,15 @@ func (s ReconfigureTestSuite) Test_GetTemplate_AddsColor() {
243223
s.Contains(actual, expected)
244224
}
245225

246-
func (s ReconfigureTestSuite) Test_GetTemplate_DoesNotSetCheckWhenSkipCheckIsTrue() {
226+
func (s ReconfigureTestSuite) Test_GetTemplates_DoesNotSetCheckWhenSkipCheckIsTrue() {
247227
s.ConsulTemplateBe = strings.Replace(s.ConsulTemplateBe, " check", "", -1)
248228
s.reconfigure.SkipCheck = true
249229
_, actual, _ := s.reconfigure.GetTemplates(s.reconfigure.ServiceReconfigure)
250230

251231
s.Equal(s.ConsulTemplateBe, actual)
252232
}
253233

254-
func (s ReconfigureTestSuite) Test_GetTemplate_ReturnsFileContent_WhenConsulTemplatePathIsSet() {
234+
func (s ReconfigureTestSuite) Test_GetTemplates_ReturnsFileContent_WhenConsulTemplatePathIsSet() {
255235
expected := "This is content of a template"
256236
readTemplateFileOrig := readTemplateFile
257237
defer func() { readTemplateFile = readTemplateFileOrig }()
@@ -266,10 +246,71 @@ func (s ReconfigureTestSuite) Test_GetTemplate_ReturnsFileContent_WhenConsulTemp
266246
s.Equal(expected, actual)
267247
}
268248

269-
func (s ReconfigureTestSuite) Test_GetTemplate_ReturnsError_WhenConsulTemplateFileIsNotAvailable() {
249+
func (s ReconfigureTestSuite) Test_GetTemplates_ProcessesTemplateFromTemplatePath_WhenSpecified() {
250+
expectedFeFile := "/path/to/my/fe/template"
251+
expectedBeFile := "/path/to/my/be/template"
252+
expectedFe := fmt.Sprintf("This is service %s", s.reconfigure.ServiceName)
253+
expectedBe := fmt.Sprintf("This is path %s", s.reconfigure.ServicePath)
270254
readTemplateFileOrig := readTemplateFile
271255
defer func() { readTemplateFile = readTemplateFileOrig }()
272-
readTemplateFile = func(dirname string) ([]byte, error) {
256+
readTemplateFile = func(filename string) ([]byte, error) {
257+
if filename == expectedFeFile {
258+
return []byte("This is service {{.ServiceName}}"), nil
259+
} else if filename == expectedBeFile {
260+
return []byte("This is path {{.ServicePath}}"), nil
261+
}
262+
return []byte(""), fmt.Errorf("This is an error")
263+
}
264+
s.ServiceReconfigure.TemplateFePath = expectedFeFile
265+
s.ServiceReconfigure.TemplateBePath = expectedBeFile
266+
267+
actualFe, actualBe, _ := s.reconfigure.GetTemplates(s.ServiceReconfigure)
268+
269+
s.Equal(expectedFe, actualFe)
270+
s.Equal(expectedBe, actualBe)
271+
}
272+
273+
func (s ReconfigureTestSuite) Test_GetTemplates_ReturnsError_WhenTemplateFePathIsNotPresent() {
274+
testFilename := "/path/to/my/template"
275+
readTemplateFileOrig := readTemplateFile
276+
defer func() { readTemplateFile = readTemplateFileOrig }()
277+
readTemplateFile = func(filename string) ([]byte, error) {
278+
if filename == testFilename {
279+
return []byte(""), fmt.Errorf("This is an error")
280+
}
281+
return []byte(""), nil
282+
}
283+
s.ServiceReconfigure.TemplateFePath = testFilename
284+
s.ServiceReconfigure.TemplateBePath = "not/under/test"
285+
286+
_, _, err := s.reconfigure.GetTemplates(s.ServiceReconfigure)
287+
288+
s.Error(err)
289+
}
290+
291+
func (s ReconfigureTestSuite) Test_GetTemplates_ReturnsError_WhenTemplateBePathIsNotPresent() {
292+
testFilename := "/path/to/my/template"
293+
readTemplateFileOrig := readTemplateFile
294+
defer func() { readTemplateFile = readTemplateFileOrig }()
295+
readTemplateFile = func(filename string) ([]byte, error) {
296+
if filename == testFilename {
297+
return []byte(""), fmt.Errorf("This is an error")
298+
}
299+
return []byte(""), nil
300+
}
301+
302+
s.ServiceReconfigure.TemplateFePath = "not/under/test"
303+
s.ServiceReconfigure.TemplateBePath = testFilename
304+
305+
_, _, err := s.reconfigure.GetTemplates(s.ServiceReconfigure)
306+
307+
s.Error(err)
308+
}
309+
310+
func (s ReconfigureTestSuite) Test_GetTemplates_ReturnsError_WhenConsulTemplateFileIsNotAvailable() {
311+
readTemplateFileOrig := readTemplateFile
312+
defer func() { readTemplateFile = readTemplateFileOrig }()
313+
readTemplateFile = func(filename string) ([]byte, error) {
273314
return nil, fmt.Errorf("This is an error")
274315
}
275316
s.ServiceReconfigure.ConsulTemplateFePath = "/path/to/my/consul/fe/template"
@@ -631,31 +672,6 @@ func (s *ReconfigureTestSuite) Test_ReloadAllServices_ReturnsError_WhenFail() {
631672
s.Error(err)
632673
}
633674

634-
// TODO: Remove
635-
//func (s *ReconfigureTestSuite) Test_ReloadAllServices_WritesTemplateToFile() {
636-
// mockObj := getRegistrarableMock("")
637-
// registryInstanceOrig := registryInstance
638-
// defer func() { registryInstance = registryInstanceOrig }()
639-
// registryInstance = mockObj
640-
// s.ConsulTemplateBe = `backend myService-be
641-
// mode http
642-
// {{range $i, $e := service "myService-orange" "any"}}
643-
// server {{$e.Node}}_{{$i}}_{{$e.Port}} {{$e.Address}}:{{$e.Port}} check
644-
// {{end}}`
645-
//
646-
// expectedArgs := registry.CreateConfigsArgs{
647-
// Addresses: []string{s.Server.URL},
648-
// TemplatesPath: s.TemplatesPath,
649-
// FeFile: ServiceTemplateFeFilename,
650-
// FeTemplate: s.ConsulTemplateFe,
651-
// BeFile: ServiceTemplateBeFilename,
652-
// BeTemplate: s.ConsulTemplateBe,
653-
// ServiceName: s.ServiceName,
654-
// }
655-
//
656-
// mockObj.AssertCalled(s.T(), "CreateConfigs", &expectedArgs)
657-
//}
658-
659675
func (s *ReconfigureTestSuite) Test_ReloadAllServices_InvokesProxyCreateConfigFromTemplates() {
660676
mockObj := getProxyMock("")
661677
proxyOrig := haproxy.Instance

server.go

+7-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,9 @@ type Response struct {
5252
Distribute bool
5353
Users []User
5454
ReqRepSearch string
55-
ReqRepReplace string
55+
ReqRepReplace string
56+
TemplateFePath string
57+
TemplateBePath string
5658
}
5759

5860
func (m *Serve) Execute(args []string) error {
@@ -137,6 +139,8 @@ func (m *Serve) reconfigure(w http.ResponseWriter, req *http.Request) {
137139
Mode: m.Mode,
138140
ReqRepSearch: req.URL.Query().Get("reqRepSearch"),
139141
ReqRepReplace: req.URL.Query().Get("reqRepReplace"),
142+
TemplateFePath: req.URL.Query().Get("templateFePath"),
143+
TemplateBePath: req.URL.Query().Get("templateBePath"),
140144
}
141145
if len(req.URL.Query().Get("servicePath")) > 0 {
142146
sr.ServicePath = strings.Split(req.URL.Query().Get("servicePath"), ",")
@@ -176,6 +180,8 @@ func (m *Serve) reconfigure(w http.ResponseWriter, req *http.Request) {
176180
Users: sr.Users,
177181
ReqRepSearch: sr.ReqRepSearch,
178182
ReqRepReplace: sr.ReqRepReplace,
183+
TemplateFePath: sr.TemplateFePath,
184+
TemplateBePath: sr.TemplateBePath,
179185
}
180186
if m.isValidReconf(sr.ServiceName, sr.ServicePath, sr.ServiceDomain, sr.ConsulTemplateFePath) {
181187
if (strings.EqualFold("service", m.Mode) || strings.EqualFold("swarm", m.Mode)) && len(sr.Port) == 0 {

0 commit comments

Comments
 (0)