Browse Source

Move kube_proxy_remove out of set_facts and set default (#4180)

pull/4299/head
Matthew Mosesohn 5 years ago
committed by Kubernetes Prow Robot
parent
commit
b07641c3f3
5 changed files with 10 additions and 7 deletions
  1. 2
      roles/kubernetes/kubeadm/defaults/main.yml
  2. 3
      roles/kubernetes/node/defaults/main.yml
  3. 7
      roles/kubernetes/preinstall/tasks/0040-set_facts.yml
  4. 3
      roles/kubespray-defaults/defaults/main.yaml
  5. 2
      roles/win_nodes/kubernetes_patch/defaults/main.yml

2
roles/kubernetes/kubeadm/defaults/main.yml

@ -1,6 +1,8 @@
---
# discovery_timeout modifies the discovery timeout
discovery_timeout: 5m0s
# Optionally remove kube_proxy installed by kubeadm
kube_proxy_remove: false
# If non-empty, will use this string as identification instead of the actual hostname
kube_override_hostname: >-

3
roles/kubernetes/node/defaults/main.yml

@ -30,6 +30,9 @@ kubelet_disable_shared_pid: true
### fail with swap on (default true)
kubelet_fail_swap_on: true
# Optionally remove kube_proxy installed by kubeadm
kube_proxy_remove: false
# Reserve this space for kube resources
kube_memory_reserved: 256M
kube_cpu_reserved: 100m

7
roles/kubernetes/preinstall/tasks/0040-set_facts.yml

@ -159,13 +159,6 @@
- ../vars
skip: true
- name: force kube_proxy removal if proxy services are replaced by other means
set_fact:
kube_proxy_remove: "{{ (kube_network_plugin == 'kube-router') and (kube_router_run_service_proxy is defined and kube_router_run_service_proxy)| bool }}"
tags:
- facts
- kube-proxy
- name: override kube_proxy_mode to ipvs if kube_proxy_remove is set, as ipvs won't require kube-proxy cleanup when kube-proxy daemonset gets deleted
set_fact:
kube_proxy_mode: 'ipvs'

3
roles/kubespray-defaults/defaults/main.yaml

@ -17,6 +17,9 @@ kube_version: v1.13.3
## Kube Proxy mode One of ['iptables','ipvs']
kube_proxy_mode: ipvs
## Delete kube-proxy daemonset if kube_proxy_remove set, e.g. kube_network_plugin providing proxy services
kube_proxy_remove: "{{ (kube_network_plugin == 'kube-router') and (kube_router_run_service_proxy is defined and kube_router_run_service_proxy)| bool }}"
# 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.

2
roles/win_nodes/kubernetes_patch/defaults/main.yml

@ -1,3 +1,5 @@
---
kubernetes_user_manifests_path: "{{ ansible_env.HOME }}/kube-manifests"
# Optionally remove kube_proxy installed by kubeadm
kube_proxy_remove: false
Loading…
Cancel
Save