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`
This commit is contained in:
Chad Swenson
2019-01-03 02:04:26 -06:00
committed by Kubernetes Prow Robot
parent d58b338bd8
commit 80379f6cab
17 changed files with 193 additions and 125 deletions

View File

@@ -11,16 +11,6 @@ kubelet_bind_address: "{{ ip | default('0.0.0.0') }}"
# resolv.conf to base dns config
kube_resolv_conf: "/etc/resolv.conf"
# bind address for kube-proxy health check
kube_proxy_healthz_bind_address: "127.0.0.1"
# Can be ipvs, iptables
kube_proxy_mode: ipvs
# If using the pure iptables proxy, SNAT everything. Note that it breaks any
# policy engine.
kube_proxy_masquerade_all: false
# These options reflect limitations of running kubelet in a container.
# Modify at your own risk
kubelet_enable_cri: true
@@ -49,11 +39,7 @@ kube_master_cpu_reserved: 200m
kubelet_status_update_frequency: 10s
# Limits for kube components and nginx load balancer app
kube_proxy_memory_limit: 2000M
kube_proxy_cpu_limit: 500m
kube_proxy_memory_requests: 64M
kube_proxy_cpu_requests: 150m
# Limits for nginx load balancer app
nginx_memory_limit: 512M
nginx_cpu_limit: 300m
nginx_memory_requests: 32M
@@ -63,10 +49,6 @@ nginx_cpu_requests: 25m
# - extensions/v1beta1/daemonsets=true
# - extensions/v1beta1/deployments=true
nginx_image_repo: nginx
nginx_image_tag: 1.13
nginx_config_dir: "/etc/nginx"
kubelet_flexvolumes_plugins_dir: /var/lib/kubelet/volume-plugins
# A port range to reserve for services with NodePort visibility.