mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 11:21:47 +00:00
Merge pull request #57754 from ncdc/fix-kube-proxy-config-docs-and-json-tags
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.
kube-proxy: fix field name comments & json tags
**What this PR does / why we need it**: correct some minor issues in the comments and json tags for some of the fields in the kube-proxy config structs.
**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #
**Special notes for your reviewer**:
**Release note**:
```release-note
The udpTimeoutMilliseconds field in the kube-proxy configuration file has been renamed to udpIdleTimeout. Action required: administrators need to update their files accordingly.
```
This was extracted from my currently unmerged f074b28fe9
, as requested [here](https://github.com/kubernetes/kubernetes/pull/52198#pullrequestreview-85538637).
@kubernetes/sig-network-pr-reviews @luxas
This commit is contained in:
commit
ab83d374df
@ -430,7 +430,7 @@ mode: "%s"
|
|||||||
oomScoreAdj: 17
|
oomScoreAdj: 17
|
||||||
portRange: "2-7"
|
portRange: "2-7"
|
||||||
resourceContainer: /foo
|
resourceContainer: /foo
|
||||||
udpTimeoutMilliseconds: 123ms
|
udpIdleTimeout: 123ms
|
||||||
`
|
`
|
||||||
|
|
||||||
testCases := []struct {
|
testCases := []struct {
|
||||||
|
@ -26,7 +26,7 @@ import (
|
|||||||
|
|
||||||
// ClientConnectionConfiguration contains details for constructing a client.
|
// ClientConnectionConfiguration contains details for constructing a client.
|
||||||
type ClientConnectionConfiguration struct {
|
type ClientConnectionConfiguration struct {
|
||||||
// kubeConfigFile is the path to a kubeconfig file.
|
// kubeconfig is the path to a kubeconfig file.
|
||||||
KubeConfigFile string
|
KubeConfigFile string
|
||||||
// acceptContentTypes defines the Accept header sent by clients when connecting to a server, overriding the
|
// 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
|
// 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 {
|
type KubeProxyConfiguration struct {
|
||||||
metav1.TypeMeta
|
metav1.TypeMeta
|
||||||
|
|
||||||
// featureGates is a comma-separated list of key=value pairs that control
|
// TODO FeatureGates really should be a map but that requires refactoring all
|
||||||
// which alpha/beta features are enabled.
|
|
||||||
//
|
|
||||||
// TODO this really should be a map but that requires refactoring all
|
|
||||||
// components to use config files because local-up-cluster.sh only supports
|
// components to use config files because local-up-cluster.sh only supports
|
||||||
// the --feature-gates flag right now, which is comma-separated key=value
|
// the --feature-gates flag right now, which is comma-separated key=value
|
||||||
// pairs.
|
// pairs.
|
||||||
|
//
|
||||||
|
// featureGates is a comma-separated list of key=value pairs that control
|
||||||
|
// which alpha/beta features are enabled.
|
||||||
FeatureGates string
|
FeatureGates string
|
||||||
|
|
||||||
// bindAddress is the IP address for the proxy server to serve on (set to 0.0.0.0
|
// bindAddress is the IP address for the proxy server to serve on (set to 0.0.0.0
|
||||||
|
@ -22,7 +22,7 @@ import (
|
|||||||
|
|
||||||
// ClientConnectionConfiguration contains details for constructing a client.
|
// ClientConnectionConfiguration contains details for constructing a client.
|
||||||
type ClientConnectionConfiguration struct {
|
type ClientConnectionConfiguration struct {
|
||||||
// kubeConfigFile is the path to a kubeconfig file.
|
// kubeconfig is the path to a kubeconfig file.
|
||||||
KubeConfigFile string `json:"kubeconfig"`
|
KubeConfigFile string `json:"kubeconfig"`
|
||||||
// acceptContentTypes defines the Accept header sent by clients when connecting to a server, overriding the
|
// 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
|
// 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"`
|
AcceptContentTypes string `json:"acceptContentTypes"`
|
||||||
// contentType is the content type used when sending data to the server from this client.
|
// contentType is the content type used when sending data to the server from this client.
|
||||||
ContentType string `json:"contentType"`
|
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"`
|
QPS float32 `json:"qps"`
|
||||||
// burst allows extra queries to accumulate when a client is exceeding its rate.
|
// burst allows extra queries to accumulate when a client is exceeding its rate.
|
||||||
Burst int `json:"burst"`
|
Burst int `json:"burst"`
|
||||||
@ -93,13 +93,13 @@ type KubeProxyConntrackConfiguration struct {
|
|||||||
type KubeProxyConfiguration struct {
|
type KubeProxyConfiguration struct {
|
||||||
metav1.TypeMeta `json:",inline"`
|
metav1.TypeMeta `json:",inline"`
|
||||||
|
|
||||||
// featureGates is a comma-separated list of key=value pairs that control
|
// TODO FeatureGates really should be a map but that requires refactoring all
|
||||||
// which alpha/beta features are enabled.
|
|
||||||
//
|
|
||||||
// TODO this really should be a map but that requires refactoring all
|
|
||||||
// components to use config files because local-up-cluster.sh only supports
|
// components to use config files because local-up-cluster.sh only supports
|
||||||
// the --feature-gates flag right now, which is comma-separated key=value
|
// the --feature-gates flag right now, which is comma-separated key=value
|
||||||
// pairs.
|
// pairs.
|
||||||
|
//
|
||||||
|
// featureGates is a comma-separated list of key=value pairs that control
|
||||||
|
// which alpha/beta features are enabled.
|
||||||
FeatureGates string `json:"featureGates"`
|
FeatureGates string `json:"featureGates"`
|
||||||
|
|
||||||
// bindAddress is the IP address for the proxy server to serve on (set to 0.0.0.0
|
// 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"`
|
ResourceContainer string `json:"resourceContainer"`
|
||||||
// udpIdleTimeout is how long an idle UDP connection will be kept open (e.g. '250ms', '2s').
|
// 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.
|
// 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 contains conntrack-related configuration options.
|
||||||
Conntrack KubeProxyConntrackConfiguration `json:"conntrack"`
|
Conntrack KubeProxyConntrackConfiguration `json:"conntrack"`
|
||||||
// configSyncPeriod is how often configuration from the apiserver is refreshed. Must be greater
|
// configSyncPeriod is how often configuration from the apiserver is refreshed. Must be greater
|
||||||
|
Loading…
Reference in New Issue
Block a user