Skip to content

Commit

Permalink
Merge pull request #68 from aojea/udp
Browse files Browse the repository at this point in the history
solve UDP crashes
  • Loading branch information
aojea committed May 16, 2024
2 parents 70d8320 + 607d0fb commit ad8f473
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion pkg/loadbalancer/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,7 @@ func generateConfig(service *v1.Service, nodes []*v1.Node) *proxyConfigData {
return lbConfig
}

// TODO: move to xDS via GRPC instead of having to deal with files
func proxyUpdateLoadBalancer(ctx context.Context, clusterName string, service *v1.Service, nodes []*v1.Node) error {
if service == nil {
return nil
Expand Down Expand Up @@ -270,7 +271,7 @@ func proxyUpdateLoadBalancer(ctx context.Context, clusterName string, service *v
// envoy has an initialization process until starts to forward traffic
// https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/operations/init#arch-overview-initialization
// also wait for the healthchecks and "no_traffic_interval"
cmd := fmt.Sprintf(`chmod a+r /home/envoy/* && mv %s %s && mv %s %s`, proxyConfigPathCDS+".tmp", proxyConfigPathCDS, proxyConfigPathLDS+".tmp", proxyConfigPathLDS)
cmd := fmt.Sprintf(`chmod a+rw /home/envoy/* && mv %s %s && mv %s %s`, proxyConfigPathCDS+".tmp", proxyConfigPathCDS, proxyConfigPathLDS+".tmp", proxyConfigPathLDS)
err = container.Exec(name, []string{"bash", "-c", cmd}, nil, &stdout, &stderr)
if err != nil {
return fmt.Errorf("error updating configuration Stdout: %s Stderr: %s : %w", stdout.String(), stderr.String(), err)
Expand Down
2 changes: 1 addition & 1 deletion pkg/loadbalancer/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ func (s *Server) createLoadBalancer(clusterName string, service *v1.Service, ima
// including some ones docker would otherwise do by default.
// for now this is what we want. in the future we may revisit this.
"--privileged",
"--restart=on-failure:1", // to allow to change the configuration
"--restart=on-failure", // to deal with the crash casued by https://github.com/envoyproxy/envoy/issues/34195
"--sysctl=net.ipv4.ip_forward=1", // allow ip forwarding
"--sysctl=net.ipv6.conf.all.disable_ipv6=0", // enable IPv6
"--sysctl=net.ipv6.conf.all.forwarding=1", // allow ipv6 forwarding
Expand Down

0 comments on commit ad8f473

Please sign in to comment.