Browse Source
Fix kube-proxy configuration for kubeadm (#3958)
Fix kube-proxy configuration for kubeadm (#3958)
- Creates and defaults an ansible variable for every configuration option in the `kubeproxy.config.k8s.io/v1alpha1` type spec - Fixes vars that were orphaned by removing non-kubeadm - Fixes previously harcoded kubeadm values - Introduces a `main` directory for role default files per component (requires ansible 2.6.0+) - Split out just `kube-proxy.yml` in this first effort - Removes the kube-proxy server field patch task We should continue to pull out other components from `main.yml` into their own defaults files as I did here for `defaults/main/kube-proxy.yml`. I hope for and will need others to join me in this refactoring across the project until each component config template has a matching role defaults file, with shared defaults in `kubespray-defaults` or `downloads`pull/3967/head
committed by
Kubernetes Prow Robot
17 changed files with 193 additions and 125 deletions
Split View
Diff Options
-
2README.md
-
2cluster.yml
-
14inventory/sample/group_vars/k8s-cluster/k8s-cluster.yml
-
2remove-node.yml
-
2requirements.txt
-
2reset.yml
-
27roles/kubernetes/kubeadm/tasks/main.yml
-
105roles/kubernetes/master/defaults/main/kube-proxy.yml
-
0roles/kubernetes/master/defaults/main/main.yml
-
2roles/kubernetes/master/templates/kubeadm-config.v1alpha1.yaml.j2
-
2roles/kubernetes/master/templates/kubeadm-config.v1alpha2.yaml.j2
-
60roles/kubernetes/master/templates/kubeadm-config.v1alpha3.yaml.j2
-
60roles/kubernetes/master/templates/kubeadm-config.v1beta1.yaml.j2
-
20roles/kubernetes/node/defaults/main.yml
-
14roles/kubespray-defaults/defaults/main.yaml
-
2scale.yml
-
2upgrade-cluster.yml
@ -1,4 +1,4 @@ |
|||
ansible>=2.5.0,!=2.7.0 |
|||
ansible>=2.6.0,!=2.7.0 |
|||
jinja2>=2.9.6 |
|||
netaddr |
|||
pbr>=1.6 |
|||
|
@ -0,0 +1,105 @@ |
|||
--- |
|||
# bind address for kube-proxy |
|||
kube_proxy_bind_address: '0.0.0.0' |
|||
|
|||
# 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 |
|||
# client. |
|||
kube_proxy_client_accept_content_types: '' |
|||
|
|||
# burst allows extra queries to accumulate when a client is exceeding its rate. |
|||
kube_proxy_client_burst: 10 |
|||
|
|||
# contentType is the content type used when sending data to the server from this client. |
|||
kube_proxy_client_content_type: application/vnd.kubernetes.protobuf |
|||
|
|||
# kubeconfig is the path to a KubeConfig file. |
|||
# Leave as empty string to generate from other fields |
|||
kube_proxy_client_kubeconfig: '' |
|||
|
|||
# qps controls the number of queries per second allowed for this connection. |
|||
kube_proxy_client_qps: 5 |
|||
|
|||
# How often configuration from the apiserver is refreshed. Must be greater than 0. |
|||
kube_proxy_config_sync_period: 15m0s |
|||
|
|||
### Conntrack |
|||
# max is the maximum number of NAT connections to track (0 to |
|||
# leave as-is). This takes precedence over maxPerCore and min. |
|||
kube_proxy_conntrack_max: 'null' |
|||
|
|||
# maxPerCore is the maximum number of NAT connections to track |
|||
# per CPU core (0 to leave the limit as-is and ignore min). |
|||
kube_proxy_conntrack_max_per_core: 32768 |
|||
|
|||
# min is the minimum value of connect-tracking records to allocate, |
|||
# regardless of conntrackMaxPerCore (set maxPerCore=0 to leave the limit as-is). |
|||
kube_proxy_conntrack_min: 131072 |
|||
|
|||
# tcpCloseWaitTimeout is how long an idle conntrack entry |
|||
# in CLOSE_WAIT state will remain in the conntrack |
|||
# table. (e.g. '60s'). Must be greater than 0 to set. |
|||
kube_proxy_conntrack_tcp_close_wait_timeout: 1h0m0s |
|||
|
|||
# tcpEstablishedTimeout is how long an idle TCP connection will be kept open |
|||
# (e.g. '2s'). Must be greater than 0 to set. |
|||
kube_proxy_conntrack_tcp_established_timeout: 24h0m0s |
|||
|
|||
# Enables profiling via web interface on /debug/pprof handler. |
|||
# Profiling handlers will be handled by metrics server. |
|||
kube_proxy_enable_profiling: false |
|||
|
|||
# bind address for kube-proxy health check |
|||
kube_proxy_healthz_bind_address: 0.0.0.0:10256 |
|||
|
|||
# If using the pure iptables proxy, SNAT everything. Note that it breaks any |
|||
# policy engine. |
|||
kube_proxy_masquerade_all: false |
|||
|
|||
# If using the pure iptables proxy, the bit of the fwmark space to mark packets requiring SNAT with. |
|||
# Must be within the range [0, 31]. |
|||
kube_proxy_masquerade_bit: 14 |
|||
|
|||
# The minimum interval of how often the iptables or ipvs rules can be refreshed as |
|||
# endpoints and services change (e.g. '5s', '1m', '2h22m'). |
|||
kube_proxy_min_sync_period: 0s |
|||
|
|||
# The maximum interval of how often iptables or ipvs rules are refreshed (e.g. '5s', '1m', '2h22m'). |
|||
# Must be greater than 0. |
|||
kube_proxy_sync_period: 30s |
|||
|
|||
# A comma-separated list of CIDR's which the ipvs proxier should not touch when cleaning up IPVS rules. |
|||
kube_proxy_exclude_cidrs: 'null' |
|||
|
|||
# The ipvs scheduler type when proxy mode is ipvs |
|||
# rr: round-robin |
|||
# lc: least connection |
|||
# dh: destination hashing |
|||
# sh: source hashing |
|||
# sed: shortest expected delay |
|||
# nq: never queue |
|||
kube_proxy_scheduler: rr |
|||
|
|||
# The IP address and port for the metrics server to serve on |
|||
# (set to 0.0.0.0 for all IPv4 interfaces and `::` for all IPv6 interfaces) |
|||
kube_proxy_metrics_bind_address: 127.0.0.1:10249 |
|||
|
|||
# A string slice of values which specify the addresses to use for NodePorts. |
|||
# Values may be valid IP blocks (e.g. 1.2.3.0/24, 1.2.3.4/32). |
|||
# The default empty string slice ([]) means to use all local addresses. |
|||
kube_proxy_nodeport_addresses: '[]' |
|||
|
|||
# oom-score-adj value for kube-proxy process. Values must be within the range [-1000, 1000] |
|||
kube_proxy_oom_score_adj: -999 |
|||
|
|||
# portRange is the range of host ports (beginPort-endPort, inclusive) that may be consumed |
|||
# in order to proxy service traffic. If unspecified, 0, or (0-0) then ports will be randomly chosen. |
|||
kube_proxy_port_range: '' |
|||
|
|||
# resourceContainer is the absolute name of the resource-only container to create and run |
|||
# the Kube-proxy in (Default: /kube-proxy). |
|||
kube_proxy_resource_container: /kube-proxy |
|||
|
|||
# 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. |
|||
kube_proxy_udp_idle_timeout: 250ms |
Write
Preview
Loading…
Cancel
Save