From 299e35ebe4a69f133dba74aeea090504f2240bbc Mon Sep 17 00:00:00 2001
From: Florian Ruynat <florian234@hotmail.com>
Date: Fri, 24 Apr 2020 10:54:07 +0200
Subject: [PATCH] Cleanup unused/erroneous variables (#6003)

---
 docs/weave.md                                 | 23 ++-----------------
 .../sample/group_vars/k8s-cluster/addons.yml  |  1 -
 roles/bootstrap-os/defaults/main.yml          |  2 --
 .../external-openstack-cloud-config.j2        |  8 +++----
 .../alb_ingress_controller/defaults/main.yml  |  2 --
 roles/kubespray-defaults/defaults/main.yaml   | 10 --------
 roles/network_plugin/calico/defaults/main.yml |  4 ----
 roles/network_plugin/canal/defaults/main.yml  |  7 ------
 8 files changed, 6 insertions(+), 51 deletions(-)

diff --git a/docs/weave.md b/docs/weave.md
index 5b4cee39b..6d7e94956 100644
--- a/docs/weave.md
+++ b/docs/weave.md
@@ -74,25 +74,6 @@ This mode is best to use on dynamic size cluster
 
 The seed mode also allows multi-clouds and hybrid on-premise/cloud clusters deployment.
 
-* Switch from consensus mode to seed mode
+* Switch from consensus mode to seed/Observation mode
 
-```ShellSession
-# In file ./inventory/sample/group_vars/k8s-cluster.yml
-weave_mode_seed: true
-```
-
-These two variables are only used when `weave_mode_seed` is set to `true` (**/!\ do not manually change these values**)
-
-```ShellSession
-# In file ./inventory/sample/group_vars/k8s-cluster.yml
-weave_seed: uninitialized
-weave_peers: uninitialized
-```
-
-The first variable, `weave_seed`, contains the initial nodes of the weave network
-
-The second variable, `weave_peers`, saves the IPs of all nodes joined to the weave network
-
-These two variables are used to connect a new node to the weave network. The new node needs to know the firsts nodes (seed) and the list of IPs of all nodes.
-
-To reset these variables and reset the weave network set them to `uninitialized`
+See [weave ipam documentation](https://www.weave.works/docs/net/latest/tasks/ipam/ipam/) and use `weave_extra_args` to enable.
diff --git a/inventory/sample/group_vars/k8s-cluster/addons.yml b/inventory/sample/group_vars/k8s-cluster/addons.yml
index 133c80fd5..d8f554cf6 100644
--- a/inventory/sample/group_vars/k8s-cluster/addons.yml
+++ b/inventory/sample/group_vars/k8s-cluster/addons.yml
@@ -107,7 +107,6 @@ ingress_publish_status_address: ""
 ingress_alb_enabled: false
 # alb_ingress_aws_region: "us-east-1"
 # alb_ingress_restrict_scheme: "false"
-# alb_ingress_log_level: "WARN"
 # Enables logging on all outbound requests sent to the AWS API.
 # If logging is desired, set to true.
 # alb_ingress_aws_debug: "false"
diff --git a/roles/bootstrap-os/defaults/main.yml b/roles/bootstrap-os/defaults/main.yml
index a19f82898..d70ec46ce 100644
--- a/roles/bootstrap-os/defaults/main.yml
+++ b/roles/bootstrap-os/defaults/main.yml
@@ -1,7 +1,5 @@
 ---
 ## CentOS/RHEL specific variables
-# Install epel repo on Centos/RHEL
-centos_epel_enabled: false
 # Use the fastestmirror yum plugin
 centos_fastestmirror_enabled: false
 
diff --git a/roles/kubernetes-apps/external_cloud_controller/openstack/templates/external-openstack-cloud-config.j2 b/roles/kubernetes-apps/external_cloud_controller/openstack/templates/external-openstack-cloud-config.j2
index 8e452d71f..c4056ffc4 100644
--- a/roles/kubernetes-apps/external_cloud_controller/openstack/templates/external-openstack-cloud-config.j2
+++ b/roles/kubernetes-apps/external_cloud_controller/openstack/templates/external-openstack-cloud-config.j2
@@ -20,10 +20,10 @@ ca-file="{{ kube_config_dir }}/external-openstack-cacert.pem"
 
 [LoadBalancer]
 use-octavia={{ external_openstack_lbaas_use_octavia }}
-create-monitor={{ openstack_lbaas_create_monitor }}
-monitor-delay={{ openstack_lbaas_monitor_delay }}
-monitor-timeout={{ openstack_lbaas_monitor_timeout }}
-monitor-max-retries={{ openstack_lbaas_monitor_max_retries }}
+create-monitor={{ external_openstack_lbaas_create_monitor }}
+monitor-delay={{ external_openstack_lbaas_monitor_delay }}
+monitor-timeout={{ external_openstack_lbaas_monitor_timeout }}
+monitor-max-retries={{ external_openstack_lbaas_monitor_max_retries }}
 {% if external_openstack_lbaas_method is defined %}
 lb-method={{ external_openstack_lbaas_method }}
 {% endif %}
diff --git a/roles/kubernetes-apps/ingress_controller/alb_ingress_controller/defaults/main.yml b/roles/kubernetes-apps/ingress_controller/alb_ingress_controller/defaults/main.yml
index 3f1879092..4c8d97e53 100644
--- a/roles/kubernetes-apps/ingress_controller/alb_ingress_controller/defaults/main.yml
+++ b/roles/kubernetes-apps/ingress_controller/alb_ingress_controller/defaults/main.yml
@@ -5,5 +5,3 @@ alb_ingress_aws_region: "us-east-1"
 # Enables logging on all outbound requests sent to the AWS API.
 # If logging is desired, set to true.
 alb_ingress_aws_debug: "false"
-
-alb_ingress_log_level: "WARN"
diff --git a/roles/kubespray-defaults/defaults/main.yaml b/roles/kubespray-defaults/defaults/main.yaml
index 053be50d8..859fc06dc 100644
--- a/roles/kubespray-defaults/defaults/main.yaml
+++ b/roles/kubespray-defaults/defaults/main.yaml
@@ -394,16 +394,6 @@ local_volume_provisioner_storage_classes: |
 # you can use --extra-vars to pass the password in command line
 weave_password: EnterPasswordHere
 
-# Weave uses consensus mode by default
-# Enabling seed mode allow to dynamically add or remove hosts
-# https://www.weave.works/docs/net/latest/ipam/
-weave_mode_seed: false
-
-# This two variable are automatically changed by the weave's role in group_vars/k8s-cluster.yml.
-# Do not manually change these values
-weave_seed: uninitialized
-weave_peers: uninitialized
-
 # Contiv L3 BGP Mode
 contiv_peer_with_uplink_leaf: false
 contiv_global_as: "65002"
diff --git a/roles/network_plugin/calico/defaults/main.yml b/roles/network_plugin/calico/defaults/main.yml
index 86edde4ff..7baa60966 100644
--- a/roles/network_plugin/calico/defaults/main.yml
+++ b/roles/network_plugin/calico/defaults/main.yml
@@ -27,10 +27,6 @@ calico_node_memory_limit: 500M
 calico_node_cpu_limit: 300m
 calico_node_memory_requests: 64M
 calico_node_cpu_requests: 150m
-calicoctl_memory_limit: 170M
-calicoctl_cpu_limit: 100m
-calicoctl_memory_requests: 32M
-calicoctl_cpu_requests: 250m
 calico_felix_chaininsertmode: Insert
 
 # Enable Prometheus Metrics endpoint for felix
diff --git a/roles/network_plugin/canal/defaults/main.yml b/roles/network_plugin/canal/defaults/main.yml
index cbb0da8d9..84db19ccd 100644
--- a/roles/network_plugin/canal/defaults/main.yml
+++ b/roles/network_plugin/canal/defaults/main.yml
@@ -8,9 +8,6 @@ canal_iface: ""
 # the pod network.
 canal_masquerade: "true"
 
-# Log-level
-canal_log_level: "info"
-
 # Etcd SSL dirs
 canal_cert_dir: /etc/canal/certs
 
@@ -26,10 +23,6 @@ flannel_memory_limit: 500M
 flannel_cpu_limit: 200m
 flannel_memory_requests: 64M
 flannel_cpu_requests: 50m
-calicoctl_memory_limit: 170M
-calicoctl_cpu_limit: 100m
-calicoctl_memory_requests: 32M
-calicoctl_cpu_requests: 25m
 
 # etcd cert filenames
 kube_etcd_cacert_file: ca.pem
-- 
GitLab