Skip to content

Commit

Permalink
fix eureka bug (#309)
Browse files Browse the repository at this point in the history
* fix eureka bug
* fix eureka https port bug
  • Loading branch information
gw123 authored Oct 20, 2021
1 parent 96dd37d commit 94c8917
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/object/eurekaserviceregistry/eurekaserviceregistry.go
Original file line number Diff line number Diff line change
Expand Up @@ -401,11 +401,14 @@ func (e *EurekaServiceRegistry) instanceInfoToServiceInstances(info *eurekaapi.I

if info.Port != nil && info.Port.Enabled {
plain := baseServiceInstanceSpec
plain.Port = uint16(info.Port.Port)
plain.Scheme = "http"
instances = append(instances, &plain)
}

if info.SecurePort != nil && info.SecurePort.Enabled {
secure := baseServiceInstanceSpec
secure.Port = uint16(info.SecurePort.Port)
secure.Scheme = "https"
instances = append(instances, &secure)
}
Expand Down

0 comments on commit 94c8917

Please sign in to comment.