You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -130,6 +133,7 @@ func (o *GrpcProxyAgentOptions) Flags() *pflag.FlagSet {
130
133
flags.IntVar(&o.XfrChannelSize, "xfr-channel-size", 150, "Set the size of the channel for transferring data between the agent and the proxy server.")
131
134
flags.BoolVar(&o.CountServerLeases, "count-server-leases", o.CountServerLeases, "Enables lease counting system to determine the number of proxy servers to connect to.")
132
135
flags.StringVar(&o.KubeconfigPath, "kubeconfig", o.KubeconfigPath, "Path to the kubeconfig file")
136
+
flags.StringVar(&o.APIContentType, "kube-api-content-type", o.APIContentType, "Content type of requests sent to apiserver.")
133
137
returnflags
134
138
}
135
139
@@ -156,6 +160,7 @@ func (o *GrpcProxyAgentOptions) Print() {
156
160
klog.V(1).Infof("WarnOnChannelLimit set to %t.\n", o.WarnOnChannelLimit)
157
161
klog.V(1).Infof("SyncForever set to %v.\n", o.SyncForever)
158
162
klog.V(1).Infof("ChannelSize set to %d.\n", o.XfrChannelSize)
163
+
klog.V(1).Infof("APIContentType set to %v.\n", o.APIContentType)
Copy file name to clipboardexpand all lines: cmd/server/app/options/options.go
+6
Original file line number
Diff line number
Diff line change
@@ -23,6 +23,7 @@ import (
23
23
24
24
"github.com/google/uuid"
25
25
"github.com/spf13/pflag"
26
+
"k8s.io/apimachinery/pkg/runtime"
26
27
"k8s.io/klog/v2"
27
28
28
29
"sigs.k8s.io/apiserver-network-proxy/pkg/server"
@@ -86,6 +87,8 @@ type ProxyRunOptions struct {
86
87
KubeconfigQPSfloat32
87
88
// Client maximum burst for throttle.
88
89
KubeconfigBurstint
90
+
// Content type of requests sent to apiserver.
91
+
APIContentTypestring
89
92
90
93
// Proxy strategies used by the server.
91
94
// NOTE the order of the strategies matters. e.g., for list
@@ -137,6 +140,7 @@ func (o *ProxyRunOptions) Flags() *pflag.FlagSet {
137
140
flags.StringVar(&o.KubeconfigPath, "kubeconfig", o.KubeconfigPath, "absolute path to the kubeconfig file (used with agent-namespace, agent-service-account, authentication-audience).")
138
141
flags.Float32Var(&o.KubeconfigQPS, "kubeconfig-qps", o.KubeconfigQPS, "Maximum client QPS (proxy server uses this client to authenticate agent tokens).")
139
142
flags.IntVar(&o.KubeconfigBurst, "kubeconfig-burst", o.KubeconfigBurst, "Maximum client burst (proxy server uses this client to authenticate agent tokens).")
143
+
flags.StringVar(&o.APIContentType, "kube-api-content-type", o.APIContentType, "Content type of requests sent to apiserver.")
flags.StringVar(&o.ProxyStrategies, "proxy-strategies", o.ProxyStrategies, "The list of proxy strategies used by the server to pick an agent/tunnel, available strategies are: default, destHost, defaultRoute.")
142
146
flags.StringSliceVar(&o.CipherSuites, "cipher-suites", o.CipherSuites, "The comma separated list of allowed cipher suites. Has no effect on TLS1.3. Empty means allow default list.")
@@ -178,6 +182,7 @@ func (o *ProxyRunOptions) Print() {
178
182
klog.V(1).Infof("KubeconfigPath set to %q.\n", o.KubeconfigPath)
179
183
klog.V(1).Infof("KubeconfigQPS set to %f.\n", o.KubeconfigQPS)
180
184
klog.V(1).Infof("KubeconfigBurst set to %d.\n", o.KubeconfigBurst)
185
+
klog.V(1).Infof("APIContentType set to %v.\n", o.APIContentType)
181
186
klog.V(1).Infof("ProxyStrategies set to %q.\n", o.ProxyStrategies)
182
187
klog.V(1).Infof("CipherSuites set to %q.\n", o.CipherSuites)
183
188
klog.V(1).Infof("XfrChannelSize set to %d.\n", o.XfrChannelSize)
0 commit comments