mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-26 12:46:06 +00:00
Make usage of real proxier in hollow-proxy optional (default=true)
This commit is contained in:
@@ -52,6 +52,7 @@ type HollowNodeConfig struct {
|
||||
NodeName string
|
||||
ServerPort int
|
||||
ContentType string
|
||||
UseRealProxier bool
|
||||
}
|
||||
|
||||
const (
|
||||
@@ -70,6 +71,7 @@ func (c *HollowNodeConfig) addFlags(fs *pflag.FlagSet) {
|
||||
fs.IntVar(&c.ServerPort, "api-server-port", 443, "Port on which API server is listening.")
|
||||
fs.StringVar(&c.Morph, "morph", "", fmt.Sprintf("Specifies into which Hollow component this binary should morph. Allowed values: %v", knownMorphs.List()))
|
||||
fs.StringVar(&c.ContentType, "kube-api-content-type", "application/vnd.kubernetes.protobuf", "ContentType of requests sent to apiserver.")
|
||||
fs.BoolVar(&c.UseRealProxier, "use-real-proxier", true, "Set to true if you want to use real proxier inside hollow-proxy.")
|
||||
}
|
||||
|
||||
func (c *HollowNodeConfig) createClientConfigFromFile() (*restclient.Config, error) {
|
||||
@@ -151,6 +153,7 @@ func main() {
|
||||
execer,
|
||||
eventBroadcaster,
|
||||
recorder,
|
||||
config.UseRealProxier,
|
||||
)
|
||||
if err != nil {
|
||||
glog.Fatalf("Failed to create hollowProxy instance: %v", err)
|
||||
|
Reference in New Issue
Block a user