Skip to content

Commit

Permalink
fix params in wrong operator
Browse files Browse the repository at this point in the history
  • Loading branch information
cottand committed Apr 5, 2024
1 parent 20cd876 commit a919659
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions controllers/configmap.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,10 @@ func envoyConfig(es *egressv1.ExternalService) (string, error) {
}

for _, port := range es.Spec.Ports {
var dnsRefreshRate *duration.Duration
if es.Spec.EnvoyDnsRefreshRateS != 0 {
dnsRefreshRate = &durationpb.Duration{Seconds: spec.EnvoyDnsRefreshRateS}

Check failure on line 115 in controllers/configmap.go

View workflow job for this annotation

GitHub Actions / Build

undefined: spec
}
var clusters []*envoyv3.Cluster
protocol := protocolToEnvoy(port.Protocol)
name := fmt.Sprintf("%s_%s_%s", es.Name, envoycorev3.SocketAddress_Protocol_name[int32(protocol)], strconv.Itoa(int(port.Port)))
Expand All @@ -131,6 +135,9 @@ func envoyConfig(es *egressv1.ExternalService) (string, error) {
KeepaliveInterval: &wrapperspb.UInt32Value{Value: 5},
},
},

DnsRefreshRate: dnsRefreshRate,
RespectDnsTtl: es.Spec.EnvoyRespectDnsTTL,
LoadAssignment: &envoyendpoint.ClusterLoadAssignment{
ClusterName: name,
Endpoints: []*envoyendpoint.LocalityLbEndpoints{
Expand Down

0 comments on commit a919659

Please sign in to comment.