From fa3fb91a766cda0b74eeb1aa743e76373d5d79cf Mon Sep 17 00:00:00 2001 From: Andy Goldstein Date: Tue, 2 Jan 2018 10:20:43 -0500 Subject: [PATCH] kube-proxy: fix field name comments & json tags Signed-off-by: Andy Goldstein --- cmd/kube-proxy/app/server_test.go | 2 +- pkg/proxy/apis/kubeproxyconfig/types.go | 10 +++++----- pkg/proxy/apis/kubeproxyconfig/v1alpha1/types.go | 14 +++++++------- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/cmd/kube-proxy/app/server_test.go b/cmd/kube-proxy/app/server_test.go index ba47095055..840cdf9905 100644 --- a/cmd/kube-proxy/app/server_test.go +++ b/cmd/kube-proxy/app/server_test.go @@ -430,7 +430,7 @@ mode: "%s" oomScoreAdj: 17 portRange: "2-7" resourceContainer: /foo -udpTimeoutMilliseconds: 123ms +udpIdleTimeout: 123ms ` testCases := []struct { diff --git a/pkg/proxy/apis/kubeproxyconfig/types.go b/pkg/proxy/apis/kubeproxyconfig/types.go index 2a971c120d..7a329f520d 100644 --- a/pkg/proxy/apis/kubeproxyconfig/types.go +++ b/pkg/proxy/apis/kubeproxyconfig/types.go @@ -26,7 +26,7 @@ import ( // ClientConnectionConfiguration contains details for constructing a client. type ClientConnectionConfiguration struct { - // kubeConfigFile is the path to a kubeconfig file. + // kubeconfig is the path to a kubeconfig file. KubeConfigFile string // acceptContentTypes defines the Accept header sent by clients when connecting to a server, overriding the // default value of 'application/json'. This field will control all connections to the server used by a particular @@ -97,13 +97,13 @@ type KubeProxyConntrackConfiguration struct { type KubeProxyConfiguration struct { metav1.TypeMeta - // featureGates is a comma-separated list of key=value pairs that control - // which alpha/beta features are enabled. - // - // TODO this really should be a map but that requires refactoring all + // TODO FeatureGates really should be a map but that requires refactoring all // components to use config files because local-up-cluster.sh only supports // the --feature-gates flag right now, which is comma-separated key=value // pairs. + // + // featureGates is a comma-separated list of key=value pairs that control + // which alpha/beta features are enabled. FeatureGates string // bindAddress is the IP address for the proxy server to serve on (set to 0.0.0.0 diff --git a/pkg/proxy/apis/kubeproxyconfig/v1alpha1/types.go b/pkg/proxy/apis/kubeproxyconfig/v1alpha1/types.go index add86cdcbf..84c56f0283 100644 --- a/pkg/proxy/apis/kubeproxyconfig/v1alpha1/types.go +++ b/pkg/proxy/apis/kubeproxyconfig/v1alpha1/types.go @@ -22,7 +22,7 @@ import ( // ClientConnectionConfiguration contains details for constructing a client. type ClientConnectionConfiguration struct { - // kubeConfigFile is the path to a kubeconfig file. + // kubeconfig is the path to a kubeconfig file. KubeConfigFile string `json:"kubeconfig"` // acceptContentTypes defines the Accept header sent by clients when connecting to a server, overriding the // default value of 'application/json'. This field will control all connections to the server used by a particular @@ -30,7 +30,7 @@ type ClientConnectionConfiguration struct { AcceptContentTypes string `json:"acceptContentTypes"` // contentType is the content type used when sending data to the server from this client. ContentType string `json:"contentType"` - // cps controls the number of queries per second allowed for this connection. + // qps controls the number of queries per second allowed for this connection. QPS float32 `json:"qps"` // burst allows extra queries to accumulate when a client is exceeding its rate. Burst int `json:"burst"` @@ -93,13 +93,13 @@ type KubeProxyConntrackConfiguration struct { type KubeProxyConfiguration struct { metav1.TypeMeta `json:",inline"` - // featureGates is a comma-separated list of key=value pairs that control - // which alpha/beta features are enabled. - // - // TODO this really should be a map but that requires refactoring all + // TODO FeatureGates really should be a map but that requires refactoring all // components to use config files because local-up-cluster.sh only supports // the --feature-gates flag right now, which is comma-separated key=value // pairs. + // + // featureGates is a comma-separated list of key=value pairs that control + // which alpha/beta features are enabled. FeatureGates string `json:"featureGates"` // bindAddress is the IP address for the proxy server to serve on (set to 0.0.0.0 @@ -140,7 +140,7 @@ type KubeProxyConfiguration struct { ResourceContainer string `json:"resourceContainer"` // udpIdleTimeout is how long an idle UDP connection will be kept open (e.g. '250ms', '2s'). // Must be greater than 0. Only applicable for proxyMode=userspace. - UDPIdleTimeout metav1.Duration `json:"udpTimeoutMilliseconds"` + UDPIdleTimeout metav1.Duration `json:"udpIdleTimeout"` // conntrack contains conntrack-related configuration options. Conntrack KubeProxyConntrackConfiguration `json:"conntrack"` // configSyncPeriod is how often configuration from the apiserver is refreshed. Must be greater