Skip to content

Commit

Permalink
HACK: enable endpointsliceproxying
Browse files Browse the repository at this point in the history
  • Loading branch information
danwinship committed Aug 1, 2021
1 parent b3a734d commit ad41c44
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions pkg/openshift-sdn/proxy.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
package openshift_sdn

import (
"bytes"
"fmt"
"io/ioutil"
"net"
"net/http"
"time"
Expand Down Expand Up @@ -36,6 +38,20 @@ import (

// readProxyConfig reads the proxy config from a file
func readProxyConfig(filename string) (*kubeproxyconfig.KubeProxyConfiguration, error) {
filebytes, err := ioutil.ReadFile(filename)
if err != nil {
return nil, err
}
bytes.ReplaceAll(filebytes,
[]byte("EndpointSliceProxying=false"),
[]byte("EndpointSliceProxying=true"),
)
err = ioutil.WriteFile("/tmp/proxyconfig.yaml", filebytes, 0644)
if err != nil {
return nil, err
}
filename = "/tmp/proxyconfig.yaml"

o := kubeproxyoptions.NewOptions()
o.ConfigFile = filename
if err := o.Complete(); err != nil {
Expand Down

0 comments on commit ad41c44

Please sign in to comment.