Update virtual-mcp11-k8s-calico


Related-PROD: PROD-19474
Change-Id: Ibba09c31e42d2f1beb6eeba1a204662f01080344
diff --git a/classes/cluster/virtual-mcp11-k8s-calico/infra/config.yml b/classes/cluster/virtual-mcp11-k8s-calico/infra/config.yml
index 580b4b2..29f3b3f 100644
--- a/classes/cluster/virtual-mcp11-k8s-calico/infra/config.yml
+++ b/classes/cluster/virtual-mcp11-k8s-calico/infra/config.yml
@@ -1,7 +1,9 @@
 classes:
+- system.linux.system.single
+- system.linux.system.single.debian
+- system.linux.system.repo.mcp.salt
 - system.linux.system.repo.mcp.apt_mirantis.ubuntu
 - system.linux.system.repo.mcp.apt_mirantis.saltstack_2016_3
-- system.linux.system.repo.mcp.salt
 - system.openssh.client.lab
 - system.salt.master.pkg
 - system.salt.minion.ca.salt_master
@@ -11,6 +13,7 @@
 - system.mysql.client.database.grafana
 - system.reclass.storage.salt
 - system.reclass.storage.system.kubernetes_control_cluster
+- system.sphinx.server.doc.reclass
 - cluster.virtual-mcp11-k8s-calico.stacklight.proxy
 - cluster.virtual-mcp11-k8s-calico
 parameters:
@@ -20,6 +23,7 @@
     reclass_data_revision: master
     reclass_config_master: ${_param:infra_config_deploy_address}
     single_address: ${_param:infra_config_address}
+    deploy_address: ${_param:infra_config_deploy_address}
     linux_system_codename: xenial
     salt_api_password_hash: "$6$WV0P1shnoDh2gI/Z$22/Bcd7ffMv0jDlFpT63cAU4PiXHz9pjXwngToKwqAsgoeK4HNR3PiKaushjxp3JsQ8hNoJmAC6TxzVqfV8WH/"
     salt_master_host: ${_param:infra_config_deploy_address}
@@ -40,6 +44,8 @@
               value_template: <<node_os>>
             salt_master_host:
               value_template: <<node_master_ip>>
+            deploy_address:
+              value_template: <<node_deploy_ip>>
         infra_config:
           expression: <<node_hostname>>__equals__cfg01
           cluster_param:
@@ -59,21 +65,30 @@
           cluster_param:
             kubernetes_control_node01_address:
               value_template: <<node_control_ip>>
+            kubernetes_control_node01_deploy_address:
+              value_template: <<node_deploy_ip>>
         kubernetes_control02:
           expression: <<node_hostname>>__equals__ctl02
           cluster_param:
             kubernetes_control_node02_address:
               value_template: <<node_control_ip>>
+            kubernetes_control_node02_deploy_address:
+              value_template: <<node_deploy_ip>>
         kubernetes_control03:
           expression: <<node_hostname>>__equals__ctl03
           cluster_param:
             kubernetes_control_node03_address:
               value_template: <<node_control_ip>>
+            kubernetes_control_node03_deploy_address:
+              value_template: <<node_deploy_ip>>
         kubernetes_compute:
           expression: <<node_hostname>>__startswith__cmp
           node_class:
             value_template:
               - cluster.<<node_cluster>>.kubernetes.compute
+          node_param:
+            deploy_address:
+              value_template: <<node_deploy_ip>>
         stacklight_monitor01:
           expression: <<node_hostname>>__equals__mon01
           cluster_param:
@@ -148,6 +163,7 @@
             salt_master_host: ${_param:infra_config_deploy_address}
             linux_system_codename: xenial
             single_address: ${_param:kubernetes_compute_node01_address}
+            deploy_address: ${_param:kubernetes_compute_node01_deploy_address}
         kubernetes_compute_node02:
           name: ${_param:kubernetes_compute_node02_hostname}
           domain: ${_param:cluster_domain}
@@ -157,3 +173,4 @@
             salt_master_host: ${_param:infra_config_deploy_address}
             linux_system_codename: xenial
             single_address: ${_param:kubernetes_compute_node02_address}
+            deploy_address: ${_param:kubernetes_compute_node02_deploy_address}
diff --git a/classes/cluster/virtual-mcp11-k8s-calico/infra/init.yml b/classes/cluster/virtual-mcp11-k8s-calico/infra/init.yml
index e19165e..f1fd25f 100644
--- a/classes/cluster/virtual-mcp11-k8s-calico/infra/init.yml
+++ b/classes/cluster/virtual-mcp11-k8s-calico/infra/init.yml
@@ -1,11 +1,3 @@
-classes:
-- system.linux.system.single
-- system.linux.system.single.debian
-- system.linux.system.repo.mcp.extra
-- system.linux.system.repo.mcp.salt
-- system.linux.system.repo.mcp.apt_mirantis.ubuntu
-- system.openssh.server.team.all
-- system.rsyslog.client.single
 parameters:
   _param:
     # infra service addresses
@@ -16,6 +8,7 @@
     cluster_domain: virtual-mcp11-k8s-calico.local
     cluster_name: virtual-mcp11-k8s-calico
     apt_mk_version: nightly
+    primary_interface: ens3
   linux:
     network:
       resolv:
diff --git a/classes/cluster/virtual-mcp11-k8s-calico/init.yml b/classes/cluster/virtual-mcp11-k8s-calico/init.yml
index c75a053..1f8d779 100644
--- a/classes/cluster/virtual-mcp11-k8s-calico/init.yml
+++ b/classes/cluster/virtual-mcp11-k8s-calico/init.yml
@@ -1,14 +1,29 @@
 classes:
+- service.grafana.collector
 - system.linux.network.dynamic_hosts
+- system.linux.system.single
+- system.linux.system.single.debian
+- system.linux.system.repo.mcp.extra
+- system.linux.system.repo.mcp.apt_mirantis.fluentd
+- system.linux.system.repo.mcp.apt_mirantis.openstack
 - system.fluentd
 - system.fluentd.label.default_metric
 - system.fluentd.label.default_metric.prometheus
 - system.fluentd.label.default_output.elasticsearch
 - system.fluentd.label.default_output.drop_event
-- system.linux.system.repo.mcp.extra
-- system.linux.system.repo.mcp.apt_mirantis.fluentd
-- system.linux.system.repo.mcp.apt_mirantis.openstack
+- system.openssh.server.team.lab
+- system.openssh.server.team.tcpcloud
+- system.openssh.server.team.mcp_qa
+- system.openssh.server.team.k8s_team
+- system.rsyslog.client.single
+- system.prometheus.collector
+- system.telegraf.agent
 - cluster.virtual-mcp11-k8s-calico.kubernetes
 - cluster.virtual-mcp11-k8s-calico.stacklight
 - cluster.virtual-mcp11-k8s-calico.infra
 - cluster.overrides
+parameters:
+  salt:
+    minion:
+      trusted_ca_minions:
+        - cfg01
diff --git a/classes/cluster/virtual-mcp11-k8s-calico/kubernetes/compute.yml b/classes/cluster/virtual-mcp11-k8s-calico/kubernetes/compute.yml
index 27395f0..5bc5eba 100644
--- a/classes/cluster/virtual-mcp11-k8s-calico/kubernetes/compute.yml
+++ b/classes/cluster/virtual-mcp11-k8s-calico/kubernetes/compute.yml
@@ -1,6 +1,7 @@
 classes:
 - system.linux.system.repo.mcp.apt_mirantis.docker_legacy
 - system.kubernetes.pool.cluster
+- system.linux.network.hosts
 - system.salt.minion.cert.k8s_client
 - system.salt.minion.cert.etcd_client
 - cluster.virtual-mcp11-k8s-calico
@@ -10,9 +11,13 @@
       pkgs:
         - ${_param:kubernetes_docker_package}
         - python-docker
+      options:
+        bip: 172.31.255.1/24
+        storage-driver: overlay2
   kubernetes:
     pool:
       kubelet:
+        address: ${_param:single_address}
         fail_on_swap: ${_param:kubelet_fail_on_swap}
       network:
         calico:
@@ -20,7 +25,6 @@
           image: ${_param:kubernetes_calico_image}
           calicoctl_image: ${_param:kubernetes_calico_calicoctl_image}
           cni_image: ${_param:kubernetes_calico_cni_image}
-          mtu: ${_param:kubernetes_mtu}
           etcd:
             ssl:
               enabled: true
@@ -28,7 +32,7 @@
       addons:
         virtlet:
           enabled: ${_param:kubernetes_virtlet_enabled}
-          namespace: kube-system
+          namespace: ${_param:kubernetes_addon_namespace}
           image: ${_param:kubernetes_virtlet_image}
           criproxy_version: ${_param:kubernetes_criproxy_version}
           criproxy_source: ${_param:kubernetes_criproxy_checksum}
@@ -42,17 +46,25 @@
       resolv:
         dns:
           - 10.254.0.10
+          - 172.18.176.4
+          - 172.18.176.7
       interface:
-        ens4:
+        ens3:
+          enabled: true
+          type: eth
+          proto: static
+          name: ${_param:primary_interface}
+          address: ${_param:deploy_address}
+          netmask: 255.255.255.0
+          gateway: 192.168.10.1
           route:
             kubernetes_services:
               address: 10.254.0.0
               netmask: 255.255.0.0
-              gateway: ${_param:single_address}
-      interface:
+              gateway: ${_param:deploy_address}
         ens4:
-          route:
-            kubernetes_services:
-              address: 10.254.0.0
-              netmask: 255.255.0.0
-              gateway: ${_param:single_address}
+          enabled: true
+          type: eth
+          proto: static
+          address: ${_param:single_address}
+          netmask: '255.255.255.0'
diff --git a/classes/cluster/virtual-mcp11-k8s-calico/kubernetes/control.yml b/classes/cluster/virtual-mcp11-k8s-calico/kubernetes/control.yml
index 352aa0e..95462f1 100644
--- a/classes/cluster/virtual-mcp11-k8s-calico/kubernetes/control.yml
+++ b/classes/cluster/virtual-mcp11-k8s-calico/kubernetes/control.yml
@@ -11,10 +11,13 @@
 - cluster.virtual-mcp11-k8s-calico
 parameters:
   _param:
-    keepalived_vip_interface: ens3
+    keepalived_vip_interface: ${_param:primary_interface}
     keepalived_vip_virtual_router_id: 60
+    cluster_local_address: ${_param:deploy_address}
   etcd:
     server:
+      bind:
+        host: ${_param:deploy_address}
       source:
         engine: docker_hybrid
       ssl:
@@ -26,6 +29,9 @@
   kubernetes:
     common:
       addons:
+        dashboard:
+          enabled: ${_param:kubernetes_dashboard}
+          image: ${_param:kubernetes_dashboard_image}
         helm:
           enabled: ${_param:kubernetes_helm_enabled}
         calico_policy:
@@ -35,6 +41,14 @@
           enabled: ${_param:kubernetes_netchecker_enabled}
           agent_image: ${_param:kubernetes_netchecker_agent_image}
           server_image: ${_param:kubernetes_netchecker_server_image}
+          agent_probeurls: ${_param:kubernetes_netchecker_agent_probeurls}
+        dns:
+          enabled: ${_param:kubernetes_dns}
+          kubedns_image: ${_param:kubernetes_kubedns_image}
+          dnsmasq_image: ${_param:kubernetes_dnsmasq_image}
+          sidecar_image: ${_param:kubernetes_sidecar_image}
+          autoscaler:
+            image: ${_param:kubernetes_dns_autoscaler_image}
         coredns:
           enabled: ${_param:kubernetes_coredns_enabled}
         externaldns:
@@ -43,6 +57,7 @@
           provider: ${_param:kubernetes_externaldns_provider}
     master:
       kubelet:
+        address: ${_param:single_address}
         fail_on_swap: ${_param:kubelet_fail_on_swap}
       etcd:
         ssl:
@@ -56,4 +71,5 @@
       namespace:
         netchecker:
           enabled: ${_param:kubernetes_netchecker_enabled}
-
+      auth:
+        mode: Node,RBAC
diff --git a/classes/cluster/virtual-mcp11-k8s-calico/kubernetes/init.yml b/classes/cluster/virtual-mcp11-k8s-calico/kubernetes/init.yml
index 20bcfcf..d71cc9f 100644
--- a/classes/cluster/virtual-mcp11-k8s-calico/kubernetes/init.yml
+++ b/classes/cluster/virtual-mcp11-k8s-calico/kubernetes/init.yml
@@ -15,8 +15,6 @@
     kubernetes_scheduler_token: VgkUHfrW07zNxrb0ucFyX7NBnSJN9Xp6
     kubernetes_controller-manager_token: uXrdZ1YKF6qlYm3sHje2iEXMGAGDWOIU
     kubernetes_dns_token: 0S1I4iJeFjq5fopPwwCwTp3xFpEZfeUl
-    kubernetes_mtu: 1500
-    mcp_version: testing
     etcd_initial_token: IN7KaRMSo3xkGxkjAAPtkRkAgqN4ZNRq
 
     # docker package version
@@ -34,16 +32,20 @@
     kubernetes_virtlet_image: mirantis/virtlet:v1.0.0
     kubernetes_criproxy_version: v0.10.0
     kubernetes_criproxy_checksum: md5=52717b1f70f15558ef4bdb0e4d4948da
-    kubernetes_externaldns_image: mirantis/external-dns:latest
-    kubernetes_externaldns_provider: coredns
+    kubernetes_dashboard_image: gcr.io/google_containers/kubernetes-dashboard-amd64:v1.5.1
+    kubernetes_kubedns_image: gcr.io/google_containers/k8s-dns-kube-dns-amd64:1.14.5
+    kubernetes_dnsmasq_image: gcr.io/google_containers/k8s-dns-dnsmasq-amd64:1.14.5
+    kubernetes_sidecar_image: gcr.io/google_containers/k8s-dns-sidecar-amd64:1.14.5
+    kubernetes_dns_autoscaler_image: gcr.io/google_containers/cluster-proportional-autoscaler-amd64:1.0.0
 
     # switches of addons
-    kubernetes_helm_enabled: true
+    kubernetes_addon_namespace: kube-system
+    kubernetes_dns: true
+    kubernetes_dashboard: true
+    kubernetes_helm_enabled: false
     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
@@ -59,27 +61,40 @@
     kubernetes_control_node03_address: 172.16.10.103
     kubernetes_compute_node01_address: 172.16.10.105
     kubernetes_compute_node02_address: 172.16.10.106
+    kubernetes_control_node01_deploy_address: 192.168.10.101
+    kubernetes_control_node02_deploy_address: 192.168.10.102
+    kubernetes_control_node03_deploy_address: 192.168.10.103
+    kubernetes_compute_node01_deploy_address: 192.168.10.105
+    kubernetes_compute_node02_deploy_address: 192.168.10.106
     kubernetes_proxy_node01_hostname: prx01
     kubernetes_proxy_node01_address: 172.16.10.121
 
     cluster_vip_address: ${_param:kubernetes_control_address}
-    cluster_local_address: ${_param:single_address}
+    cluster_local_address: ${_param:deploy_address}
 
     # etcd stuff
     cluster_node01_hostname: ${_param:kubernetes_control_node01_hostname}
-    cluster_node01_address: ${_param:kubernetes_control_node01_address}
+    cluster_node01_address: ${_param:kubernetes_control_node01_deploy_address}
     cluster_node01_port: 4001
     cluster_node02_hostname: ${_param:kubernetes_control_node02_hostname}
-    cluster_node02_address: ${_param:kubernetes_control_node02_address}
+    cluster_node02_address: ${_param:kubernetes_control_node02_deploy_address}
     cluster_node02_port: 4001
     cluster_node03_hostname: ${_param:kubernetes_control_node03_hostname}
-    cluster_node03_address: ${_param:kubernetes_control_node03_address}
+    cluster_node03_address: ${_param:kubernetes_control_node03_deploy_address}
     cluster_node03_port: 4001
 
     # calico
     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/virtual-mcp11-k8s-calico/stacklight/init.yml b/classes/cluster/virtual-mcp11-k8s-calico/stacklight/init.yml
index 8f745af..23306db 100644
--- a/classes/cluster/virtual-mcp11-k8s-calico/stacklight/init.yml
+++ b/classes/cluster/virtual-mcp11-k8s-calico/stacklight/init.yml
@@ -1,10 +1,7 @@
-classes:
-- service.grafana.collector
-- system.linux.system.repo.mcp.extra
-- system.prometheus.collector
-- system.telegraf.agent
 parameters:
   _param:
+    openstack_version: pike
+
     stacklight_monitor_address: 172.16.10.252
     stacklight_node01_hostname: mon01
     stacklight_node02_hostname: mon02
@@ -12,9 +9,6 @@
     stacklight_node01_address: 172.16.10.107
     stacklight_node02_address: 172.16.10.108
     stacklight_node03_address: 172.16.10.109
-
-    openstack_version: pike
-
     # Prometheus
     prometheus_control_address: ${_param:stacklight_monitor_address}
     stacklight_log_address: ${_param:stacklight_monitor_address}