File tree 1 file changed +4
-3
lines changed
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -133,6 +133,7 @@ var domainRegex = regexp.MustCompile(`^(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-
133
133
134
134
func (w * watcher ) generateServiceEntry (host string ) * v1alpha3.ServiceEntry {
135
135
endpoints := make ([]* v1alpha3.WorkloadEntry , 0 )
136
+ protocol := string (common .ParseProtocol (w .Protocol ))
136
137
for _ , ep := range strings .Split (w .Domain , common .CommaSeparator ) {
137
138
var endpoint * v1alpha3.WorkloadEntry
138
139
if w .Type == string (registry .Static ) {
@@ -152,7 +153,7 @@ func (w *watcher) generateServiceEntry(host string) *v1alpha3.ServiceEntry {
152
153
}
153
154
endpoint = & v1alpha3.WorkloadEntry {
154
155
Address : pair [0 ],
155
- Ports : map [string ]uint32 {w . Protocol : uint32 (port )},
156
+ Ports : map [string ]uint32 {protocol : uint32 (port )},
156
157
}
157
158
} else if w .Type == string (registry .DNS ) {
158
159
if ! domainRegex .MatchString (ep ) {
@@ -175,8 +176,8 @@ func (w *watcher) generateServiceEntry(host string) *v1alpha3.ServiceEntry {
175
176
var ports []* v1alpha3.ServicePort
176
177
ports = append (ports , & v1alpha3.ServicePort {
177
178
Number : w .Port ,
178
- Name : w . Protocol ,
179
- Protocol : string ( common . ParseProtocol ( w . Protocol )) ,
179
+ Name : protocol ,
180
+ Protocol : protocol ,
180
181
})
181
182
se := & v1alpha3.ServiceEntry {
182
183
Hosts : []string {host },
You can’t perform that action at this time.
0 commit comments