Add k8s externaldns and coredns addons switchers

Those parameters needed to control deployment of externaldns and
coredns addons.
Also allowed to control externaldns image version and
base support of externaldns provider switch.
Externaldns and coredns disabled by default in any model.

Change-Id: I05fb713b7e7c053a990f4f3811a4c2042d420b36
diff --git a/classes/cluster/k8s-aio-calico/kubernetes/control.yml b/classes/cluster/k8s-aio-calico/kubernetes/control.yml
index 01f95e7..718235f 100644
--- a/classes/cluster/k8s-aio-calico/kubernetes/control.yml
+++ b/classes/cluster/k8s-aio-calico/kubernetes/control.yml
@@ -27,6 +27,12 @@
           enabled: true
         helm:
           enabled: true
+        coredns:
+          enabled: ${_param:kubernetes_coredns_enabled}
+        externaldns:
+          enabled: ${_param:kubernetes_externaldns_enabled}
+          image: ${_param:kubernetes_externaldns_image}
+          provider: ${_param:kubernetes_externaldns_provider}
     master:
       etcd:
         ssl:
diff --git a/classes/cluster/k8s-aio-calico/kubernetes/init.yml b/classes/cluster/k8s-aio-calico/kubernetes/init.yml
index dbe4512..9bb00dd 100644
--- a/classes/cluster/k8s-aio-calico/kubernetes/init.yml
+++ b/classes/cluster/k8s-aio-calico/kubernetes/init.yml
@@ -49,6 +49,14 @@
     calico_private_network: 192.168.0.0
     calico_private_netmask: 16
 
+    # component docker images
+    kubernetes_externaldns_image: mirantis/external-dns:latest
+    kubernetes_externaldns_provider: coredns
+
+    # switches of addons
+    kubernetes_coredns_enabled: false
+    kubernetes_externaldns_enabled: false
+
   linux:
     network:
       resolv:
diff --git a/classes/cluster/k8s-aio-contrail/kubernetes/control.yml b/classes/cluster/k8s-aio-contrail/kubernetes/control.yml
index c5735da..b63afa1 100644
--- a/classes/cluster/k8s-aio-contrail/kubernetes/control.yml
+++ b/classes/cluster/k8s-aio-contrail/kubernetes/control.yml
@@ -30,6 +30,12 @@
           server_image: ${_param:kubernetes_netchecker_server_image}
         helm:
           enabled: true
+        coredns:
+          enabled: ${_param:kubernetes_coredns_enabled}
+        externaldns:
+          enabled: ${_param:kubernetes_externaldns_enabled}
+          image: ${_param:kubernetes_externaldns_image}
+          provider: ${_param:kubernetes_externaldns_provider}
     master:
       etcd:
         ssl:
diff --git a/classes/cluster/k8s-aio-contrail/kubernetes/init.yml b/classes/cluster/k8s-aio-contrail/kubernetes/init.yml
index 64d0a8a..53e289d 100644
--- a/classes/cluster/k8s-aio-contrail/kubernetes/init.yml
+++ b/classes/cluster/k8s-aio-contrail/kubernetes/init.yml
@@ -22,6 +22,12 @@
     kubernetes_hyperkube_image: docker-prod-virtual.docker.mirantis.net/mirantis/kubernetes/hyperkube-amd64:v1.7.5-2
     kubernetes_netchecker_agent_image: quay.io/l23network/k8s-netchecker-agent:v1.0
     kubernetes_netchecker_server_image: quay.io/l23network/k8s-netchecker-server:v1.0
+    kubernetes_externaldns_image: mirantis/external-dns:latest
+    kubernetes_externaldns_provider: coredns
+
+    # switches of addons
+    kubernetes_coredns_enabled: false
+    kubernetes_externaldns_enabled: false
 
     # addresses and hostnames
     kubernetes_internal_api_address: 10.254.0.1
diff --git a/classes/cluster/k8s-ha-calico-cloudprovider/kubernetes/control.yml b/classes/cluster/k8s-ha-calico-cloudprovider/kubernetes/control.yml
index a4fe26c..da51219 100644
--- a/classes/cluster/k8s-ha-calico-cloudprovider/kubernetes/control.yml
+++ b/classes/cluster/k8s-ha-calico-cloudprovider/kubernetes/control.yml
@@ -41,6 +41,12 @@
           enabled: true
         helm:
           enabled: false
+        coredns:
+          enabled: ${_param:kubernetes_coredns_enabled}
+        externaldns:
+          enabled: ${_param:kubernetes_externaldns_enabled}
+          image: ${_param:kubernetes_externaldns_image}
+          provider: ${_param:kubernetes_externaldns_provider}
       cloudprovider:
         enabled: true
         provider: openstack
diff --git a/classes/cluster/k8s-ha-calico-cloudprovider/kubernetes/init.yml b/classes/cluster/k8s-ha-calico-cloudprovider/kubernetes/init.yml
index 8baf8b1..b4aa8f8 100644
--- a/classes/cluster/k8s-ha-calico-cloudprovider/kubernetes/init.yml
+++ b/classes/cluster/k8s-ha-calico-cloudprovider/kubernetes/init.yml
@@ -45,6 +45,14 @@
     calico_private_network: 192.168.0.0
     calico_private_netmask: 16
 
+    # component docker images
+    kubernetes_externaldns_image: mirantis/external-dns:latest
+    kubernetes_externaldns_provider: coredns
+
+    # switches of addons
+    kubernetes_coredns_enabled: false
+    kubernetes_externaldns_enabled: false
+
     # OpenStack cloud provider
     openstack_auth_url: https://cloud-cz.bud.mirantis.net:5000/v3
     openstack_region_name: RegionOne
diff --git a/classes/cluster/k8s-ha-calico-syndic/kubernetes/control.yml b/classes/cluster/k8s-ha-calico-syndic/kubernetes/control.yml
index ab73b9b..c96f8bc 100644
--- a/classes/cluster/k8s-ha-calico-syndic/kubernetes/control.yml
+++ b/classes/cluster/k8s-ha-calico-syndic/kubernetes/control.yml
@@ -27,6 +27,12 @@
           enabled: true
         helm:
           enabled: true
+        coredns:
+          enabled: ${_param:kubernetes_coredns_enabled}
+        externaldns:
+          enabled: ${_param:kubernetes_externaldns_enabled}
+          image: ${_param:kubernetes_externaldns_image}
+          provider: ${_param:kubernetes_externaldns_provider}
     master:
       etcd:
         ssl:
diff --git a/classes/cluster/k8s-ha-calico-syndic/kubernetes/init.yml b/classes/cluster/k8s-ha-calico-syndic/kubernetes/init.yml
index 307ebd0..d5cf684 100644
--- a/classes/cluster/k8s-ha-calico-syndic/kubernetes/init.yml
+++ b/classes/cluster/k8s-ha-calico-syndic/kubernetes/init.yml
@@ -49,6 +49,14 @@
     calico_private_network: 192.168.0.0
     calico_private_netmask: 16
 
+    # component docker images
+    kubernetes_externaldns_image: mirantis/external-dns:latest
+    kubernetes_externaldns_provider: coredns
+
+    # switches of addons
+    kubernetes_coredns_enabled: false
+    kubernetes_externaldns_enabled: false
+
   linux:
     network:
       host:
diff --git a/classes/cluster/k8s-ha-calico/kubernetes/control.yml b/classes/cluster/k8s-ha-calico/kubernetes/control.yml
index 855b338..09c704f 100644
--- a/classes/cluster/k8s-ha-calico/kubernetes/control.yml
+++ b/classes/cluster/k8s-ha-calico/kubernetes/control.yml
@@ -51,6 +51,12 @@
           agent_image: ${_param:kubernetes_netchecker_agent_image}
           server_image: ${_param:kubernetes_netchecker_server_image}
           agent_probeurls: ${_param:kubernetes_netchecker_agent_probeurls}
+        coredns:
+          enabled: ${_param:kubernetes_coredns_enabled}
+        externaldns:
+          enabled: ${_param:kubernetes_externaldns_enabled}
+          image: ${_param:kubernetes_externaldns_image}
+          provider: ${_param:kubernetes_externaldns_provider}
     master:
       kubelet:
         address: ${_param:single_address}
diff --git a/classes/cluster/k8s-ha-calico/kubernetes/init.yml b/classes/cluster/k8s-ha-calico/kubernetes/init.yml
index d1270cd..b2091b4 100644
--- a/classes/cluster/k8s-ha-calico/kubernetes/init.yml
+++ b/classes/cluster/k8s-ha-calico/kubernetes/init.yml
@@ -69,6 +69,14 @@
     calico_private_network: 192.168.0.0
     calico_private_netmask: 16
 
+    # component docker images
+    kubernetes_externaldns_image: mirantis/external-dns:latest
+    kubernetes_externaldns_provider: coredns
+
+    # switches of addons
+    kubernetes_coredns_enabled: false
+    kubernetes_externaldns_enabled: false
+
   linux:
     network:
       host:
diff --git a/classes/cluster/k8s-ha-contrail/kubernetes/control.yml b/classes/cluster/k8s-ha-contrail/kubernetes/control.yml
index 685ea2a..f086fd7 100644
--- a/classes/cluster/k8s-ha-contrail/kubernetes/control.yml
+++ b/classes/cluster/k8s-ha-contrail/kubernetes/control.yml
@@ -37,6 +37,12 @@
           namespace: ${_param:kubernetes_addon_namespace}
           enabled: ${_param:kubernetes_contrail_network_controller}
           image: ${_param:kubernetes_contrail_network_controller_image}
+        coredns:
+          enabled: ${_param:kubernetes_coredns_enabled}
+        externaldns:
+          enabled: ${_param:kubernetes_externaldns_enabled}
+          image: ${_param:kubernetes_externaldns_image}
+          provider: ${_param:kubernetes_externaldns_provider}
     master:
       etcd:
         ssl:
diff --git a/classes/cluster/k8s-ha-contrail/kubernetes/init.yml b/classes/cluster/k8s-ha-contrail/kubernetes/init.yml
index c999ca3..ad6ac37 100644
--- a/classes/cluster/k8s-ha-contrail/kubernetes/init.yml
+++ b/classes/cluster/k8s-ha-contrail/kubernetes/init.yml
@@ -30,6 +30,8 @@
     kubernetes_netchecker_server_image: mirantis/k8s-netchecker-server:v1.1.0
     kubernetes_netchecker_agent_probeurls: "http://ipinfo.io"
     kubernetes_virtlet_image: mirantis/virtlet:v0.7.0
+    kubernetes_externaldns_image: mirantis/external-dns:latest
+    kubernetes_externaldns_provider: coredns
 
     # switches of addons
     kubernetes_addon_namespace: kube-system
@@ -39,6 +41,8 @@
     kubernetes_calico_policy_enabled: false
     kubernetes_virtlet_enabled: false
     kubernetes_contrail_network_controller: true
+    kubernetes_coredns_enabled: false
+    kubernetes_externaldns_enabled: false
 
     # addresses and hostnames
     kubernetes_internal_api_address: 10.254.0.1
diff --git a/classes/cluster/sl-k8s-calico/kubernetes/control.yml b/classes/cluster/sl-k8s-calico/kubernetes/control.yml
index f9ac48e..34e1512 100644
--- a/classes/cluster/sl-k8s-calico/kubernetes/control.yml
+++ b/classes/cluster/sl-k8s-calico/kubernetes/control.yml
@@ -28,6 +28,12 @@
           enabled: true
         helm:
           enabled: true
+        coredns:
+          enabled: ${_param:kubernetes_coredns_enabled}
+        externaldns:
+          enabled: ${_param:kubernetes_externaldns_enabled}
+          image: ${_param:kubernetes_externaldns_image}
+          provider: ${_param:kubernetes_externaldns_provider}
     master:
       etcd:
         ssl:
diff --git a/classes/cluster/sl-k8s-calico/kubernetes/init.yml b/classes/cluster/sl-k8s-calico/kubernetes/init.yml
index 307ebd0..d5cf684 100644
--- a/classes/cluster/sl-k8s-calico/kubernetes/init.yml
+++ b/classes/cluster/sl-k8s-calico/kubernetes/init.yml
@@ -49,6 +49,14 @@
     calico_private_network: 192.168.0.0
     calico_private_netmask: 16
 
+    # component docker images
+    kubernetes_externaldns_image: mirantis/external-dns:latest
+    kubernetes_externaldns_provider: coredns
+
+    # switches of addons
+    kubernetes_coredns_enabled: false
+    kubernetes_externaldns_enabled: false
+
   linux:
     network:
       host:
diff --git a/classes/cluster/sl-k8s-contrail/kubernetes/control.yml b/classes/cluster/sl-k8s-contrail/kubernetes/control.yml
index 70b7ae8..7b1b16a 100644
--- a/classes/cluster/sl-k8s-contrail/kubernetes/control.yml
+++ b/classes/cluster/sl-k8s-contrail/kubernetes/control.yml
@@ -29,6 +29,12 @@
           server_image: ${_param:kubernetes_netchecker_server_image}
         helm:
           enabled: true
+        coredns:
+          enabled: ${_param:kubernetes_coredns_enabled}
+        externaldns:
+          enabled: ${_param:kubernetes_externaldns_enabled}
+          image: ${_param:kubernetes_externaldns_image}
+          provider: ${_param:kubernetes_externaldns_provider}
     master:
       etcd:
         ssl:
diff --git a/classes/cluster/sl-k8s-contrail/kubernetes/init.yml b/classes/cluster/sl-k8s-contrail/kubernetes/init.yml
index ddf916f..906ec13 100644
--- a/classes/cluster/sl-k8s-contrail/kubernetes/init.yml
+++ b/classes/cluster/sl-k8s-contrail/kubernetes/init.yml
@@ -22,6 +22,12 @@
     kubernetes_hyperkube_image: docker-prod-virtual.docker.mirantis.net/mirantis/kubernetes/hyperkube-amd64:v1.7.5-2
     kubernetes_netchecker_agent_image: quay.io/l23network/k8s-netchecker-agent:v1.0
     kubernetes_netchecker_server_image: quay.io/l23network/k8s-netchecker-server:v1.0
+    kubernetes_externaldns_image: mirantis/external-dns:latest
+    kubernetes_externaldns_provider: coredns
+
+    # switches of addons
+    kubernetes_coredns_enabled: false
+    kubernetes_externaldns_enabled: false
 
     # addresses and hostnames
     kubernetes_internal_api_address: 10.254.0.1
diff --git a/classes/cluster/virtual-mcp11-k8s-calico-dyn/kubernetes/control.yml b/classes/cluster/virtual-mcp11-k8s-calico-dyn/kubernetes/control.yml
index 4d4c9f3..53418c5 100644
--- a/classes/cluster/virtual-mcp11-k8s-calico-dyn/kubernetes/control.yml
+++ b/classes/cluster/virtual-mcp11-k8s-calico-dyn/kubernetes/control.yml
@@ -33,6 +33,12 @@
           enabled: ${_param:kubernetes_netchecker_enabled}
           agent_image: ${_param:kubernetes_netchecker_agent_image}
           server_image: ${_param:kubernetes_netchecker_server_image}
+        coredns:
+          enabled: ${_param:kubernetes_coredns_enabled}
+        externaldns:
+          enabled: ${_param:kubernetes_externaldns_enabled}
+          image: ${_param:kubernetes_externaldns_image}
+          provider: ${_param:kubernetes_externaldns_provider}
     master:
       etcd:
         ssl:
diff --git a/classes/cluster/virtual-mcp11-k8s-calico-dyn/kubernetes/init.yml b/classes/cluster/virtual-mcp11-k8s-calico-dyn/kubernetes/init.yml
index c56e03d..8d637ca 100644
--- a/classes/cluster/virtual-mcp11-k8s-calico-dyn/kubernetes/init.yml
+++ b/classes/cluster/virtual-mcp11-k8s-calico-dyn/kubernetes/init.yml
@@ -27,11 +27,15 @@
     kubernetes_netchecker_agent_image: mirantis/k8s-netchecker-agent:v1.1.0
     kubernetes_netchecker_server_image: mirantis/k8s-netchecker-server:v1.1.0
     kubernetes_netchecker_agent_probeurls: "http://ipinfo.io"
+    kubernetes_externaldns_image: mirantis/external-dns:latest
+    kubernetes_externaldns_provider: coredns
 
     # switches of addons
     kubernetes_helm_enabled: true
     kubernetes_netchecker_enabled: true
     kubernetes_calico_policy_enabled: false
+    kubernetes_coredns_enabled: false
+    kubernetes_externaldns_enabled: false
 
     # addresses and hostnames
     kubernetes_internal_api_address: 10.254.0.1
diff --git a/classes/cluster/virtual-mcp11-k8s-calico-minimal/kubernetes/control.yml b/classes/cluster/virtual-mcp11-k8s-calico-minimal/kubernetes/control.yml
index 1ca4508..5c95c23 100644
--- a/classes/cluster/virtual-mcp11-k8s-calico-minimal/kubernetes/control.yml
+++ b/classes/cluster/virtual-mcp11-k8s-calico-minimal/kubernetes/control.yml
@@ -34,6 +34,12 @@
           agent_image: ${_param:kubernetes_netchecker_agent_image}
           server_image: ${_param:kubernetes_netchecker_server_image}
           agent_probeurls: ${_param:kubernetes_netchecker_agent_probeurls}
+        coredns:
+          enabled: ${_param:kubernetes_coredns_enabled}
+        externaldns:
+          enabled: ${_param:kubernetes_externaldns_enabled}
+          image: ${_param:kubernetes_externaldns_image}
+          provider: ${_param:kubernetes_externaldns_provider}
     master:
       etcd:
         ssl:
diff --git a/classes/cluster/virtual-mcp11-k8s-calico-minimal/kubernetes/init.yml b/classes/cluster/virtual-mcp11-k8s-calico-minimal/kubernetes/init.yml
index 5e8cd5a..ec62a19 100644
--- a/classes/cluster/virtual-mcp11-k8s-calico-minimal/kubernetes/init.yml
+++ b/classes/cluster/virtual-mcp11-k8s-calico-minimal/kubernetes/init.yml
@@ -27,6 +27,8 @@
     kubernetes_netchecker_server_image: mirantis/k8s-netchecker-server:v1.1.0
     kubernetes_netchecker_agent_probeurls: "http://ipinfo.io"
     kubernetes_calico_policy_image: calico/kube-policy-controller:v0.5.4
+    kubernetes_externaldns_image: mirantis/external-dns:latest
+    kubernetes_externaldns_provider: coredns
 
     # addresses and hostnames
     kubernetes_internal_api_address: 10.254.0.1
@@ -63,6 +65,8 @@
     kubernetes_calico_policy_enabled: false
     kubernetes_helm_enabled: true
     kubernetes_netchecker_enabled: true
+    kubernetes_coredns_enabled: false
+    kubernetes_externaldns_enabled: false
 
   linux:
     network:
diff --git a/classes/cluster/virtual-mcp11-k8s-calico/kubernetes/control.yml b/classes/cluster/virtual-mcp11-k8s-calico/kubernetes/control.yml
index 61fdaba..2153cf3 100644
--- a/classes/cluster/virtual-mcp11-k8s-calico/kubernetes/control.yml
+++ b/classes/cluster/virtual-mcp11-k8s-calico/kubernetes/control.yml
@@ -33,6 +33,12 @@
           enabled: ${_param:kubernetes_netchecker_enabled}
           agent_image: ${_param:kubernetes_netchecker_agent_image}
           server_image: ${_param:kubernetes_netchecker_server_image}
+        coredns:
+          enabled: ${_param:kubernetes_coredns_enabled}
+        externaldns:
+          enabled: ${_param:kubernetes_externaldns_enabled}
+          image: ${_param:kubernetes_externaldns_image}
+          provider: ${_param:kubernetes_externaldns_provider}
     master:
       etcd:
         ssl:
diff --git a/classes/cluster/virtual-mcp11-k8s-calico/kubernetes/init.yml b/classes/cluster/virtual-mcp11-k8s-calico/kubernetes/init.yml
index 2a75741..0e1c8ff 100644
--- a/classes/cluster/virtual-mcp11-k8s-calico/kubernetes/init.yml
+++ b/classes/cluster/virtual-mcp11-k8s-calico/kubernetes/init.yml
@@ -28,12 +28,16 @@
     kubernetes_netchecker_server_image: mirantis/k8s-netchecker-server:v1.1.0
     kubernetes_netchecker_agent_probeurls: "http://ipinfo.io"
     kubernetes_virtlet_image: mirantis/virtlet:v0.7.0
+    kubernetes_externaldns_image: mirantis/external-dns:latest
+    kubernetes_externaldns_provider: coredns
 
     # switches of addons
     kubernetes_helm_enabled: true
     kubernetes_netchecker_enabled: true
     kubernetes_calico_policy_enabled: false
     kubernetes_virtlet_enabled: false
+    kubernetes_coredns_enabled: false
+    kubernetes_externaldns_enabled: false
 
     # addresses and hostnames
     kubernetes_internal_api_address: 10.254.0.1
diff --git a/classes/cluster/virtual-mcp11-k8s-contrail/kubernetes/control.yml b/classes/cluster/virtual-mcp11-k8s-contrail/kubernetes/control.yml
index 3aa295b..034c4ac 100644
--- a/classes/cluster/virtual-mcp11-k8s-contrail/kubernetes/control.yml
+++ b/classes/cluster/virtual-mcp11-k8s-contrail/kubernetes/control.yml
@@ -35,6 +35,12 @@
           namespace: kube-system
           enabled: true
           image: ${_param:kubernetes_contrail_network_controller_image}
+        coredns:
+          enabled: ${_param:kubernetes_coredns_enabled}
+        externaldns:
+          enabled: ${_param:kubernetes_externaldns_enabled}
+          image: ${_param:kubernetes_externaldns_image}
+          provider: ${_param:kubernetes_externaldns_provider}
     master:
       etcd:
         ssl:
diff --git a/classes/cluster/virtual-mcp11-k8s-contrail/kubernetes/init.yml b/classes/cluster/virtual-mcp11-k8s-contrail/kubernetes/init.yml
index 8268e6d..18f1369 100644
--- a/classes/cluster/virtual-mcp11-k8s-contrail/kubernetes/init.yml
+++ b/classes/cluster/virtual-mcp11-k8s-contrail/kubernetes/init.yml
@@ -31,12 +31,16 @@
     kubernetes_netchecker_server_image: mirantis/k8s-netchecker-server:v1.1.0
     kubernetes_netchecker_agent_probeurls: "http://ipinfo.io"
     kubernetes_virtlet_image: mirantis/virtlet:v0.7.0
+    kubernetes_externaldns_image: mirantis/external-dns:latest
+    kubernetes_externaldns_provider: coredns
 
     # switches of addons
     kubernetes_helm_enabled: true
     kubernetes_netchecker_enabled: true
     kubernetes_calico_policy_enabled: false
     kubernetes_virtlet_enabled: false
+    kubernetes_coredns_enabled: false
+    kubernetes_externaldns_enabled: false
 
     # addresses and hostnames
     kubernetes_internal_api_address: 10.254.0.1