Use kubespray 2.8.1 and use multus by default
Change-Id: Ib2af8dbdc90491ad79f1d11c5c083d6cdbb70e31
diff --git a/kubespray-installer/k8s-configs.yaml b/kubespray-installer/k8s-configs.yaml
index 585a752..ec54b02 100644
--- a/kubespray-installer/k8s-configs.yaml
+++ b/kubespray-installer/k8s-configs.yaml
@@ -23,37 +23,38 @@
# Edit all.yml variable file
- name: Add lines to the all.yaml variable file
lineinfile:
- path: inventories/{{ deployment_name }}/group_vars/all.yml
+ path: inventories/{{ deployment_name }}/group_vars/all/all.yml
line: "{{ item }}"
with_items:
- 'ansible_python_interpreter: /usr/bin/python2.7'
- 'ansible_user: {{ kubespray_remote_ssh_user }}'
- 'ansible_become: true'
- 'kube_feature_gates: []'
+ - 'kube_network_plugin: calico'
+ - 'kube_network_plugin_multus: true'
# Edit k8s-cluster.yml variable file
- name: Set Docker DNS servers strict to false
lineinfile:
- path: inventories/{{ deployment_name }}/group_vars/k8s-cluster.yml
+ path: inventories/{{ deployment_name }}/group_vars/k8s-cluster/k8s-cluster.yml
regexp: '^#\s*docker_dns_servers_strict.*$'
line: 'docker_dns_servers_strict: false'
- name: Set Helm enabled to true
lineinfile:
- path: inventories/{{ deployment_name }}/group_vars/k8s-cluster.yml
+ path: inventories/{{ deployment_name }}/group_vars/k8s-cluster/k8s-cluster.yml
regexp: '^helm_enabled.*$'
line: 'helm_enabled: true'
- name: Set kubeconfig localhost to true
lineinfile:
- path: inventories/{{ deployment_name }}/group_vars/k8s-cluster.yml
+ path: inventories/{{ deployment_name }}/group_vars/k8s-cluster/k8s-cluster.yml
regexp: '^#\s*kubeconfig_localhost.*$'
line: 'kubeconfig_localhost: true'
- name: Allow insecure registry access
lineinfile:
- path: inventories/{{ deployment_name }}/group_vars/k8s-cluster.yml
+ path: inventories/{{ deployment_name }}/group_vars/k8s-cluster/k8s-cluster.yml
regexp: 'docker_options'
line: "docker_options: \"{{ item }} --insecure-registry={{ '{{' }} kube_service_addresses {{ '}}' }} --graph={{ '{{' }} docker_daemon_graph {{ '}}' }} {{ '{{' }} docker_log_opts {{ '}}' }}\""
with_items: "{{ k8s_nodes.split(' ') | map('regex_replace', '(.*)', '--insecure-registry=\\1/32') | join(' ') }}"
-
diff --git a/kubespray-installer/setup.sh b/kubespray-installer/setup.sh
index 3491c2e..ff946b2 100755
--- a/kubespray-installer/setup.sh
+++ b/kubespray-installer/setup.sh
@@ -20,7 +20,7 @@
set -e -o pipefail
-KS_COMMIT="${KS_COMMIT:-73a2a180061113ac124683e5cc492ba07df33d4c}"
+KS_COMMIT="${KS_COMMIT:-v2.8.1}"
install_kubespray () {
# Cleanup Old Kubespray Installations
@@ -67,7 +67,7 @@
# Install Kubespray
echo "Installing Kubespray"
- ansible-playbook -i "inventories/${DEPLOYMENT_NAME}/inventory.cfg" kubespray/cluster.yml -b -v
+ ansible-playbook -i "inventories/${DEPLOYMENT_NAME}/inventory.cfg" -e docker_version='17.03' kubespray/cluster.yml -b -v
}
#