diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f9f0978b8..008c36f80 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -81,7 +81,7 @@ before_script: - echo $GCE_CREDENTIALS > $HOME/.ssh/gce.json - chmod 400 $HOME/.ssh/id_rsa - ansible-playbook --version - - export PYPATH=$([ $BOOTSTRAP_OS = none ] && echo /usr/bin/python || echo /opt/bin/python) + - export PYPATH=$([ "$BOOTSTRAP_OS" != "coreos" ] && echo /usr/bin/python || echo /opt/bin/python) script: - pwd - ls @@ -345,6 +345,7 @@ before_script: CLOUD_IMAGE: debian-8-kubespray CLOUD_REGION: us-central1-b CLUSTER_MODE: default + BOOTSTRAP_OS: debian STARTUP_SCRIPT: "" .coreos_canal_variables: &coreos_canal_variables diff --git a/roles/bootstrap-os/tasks/bootstrap-debian.yml b/roles/bootstrap-os/tasks/bootstrap-debian.yml new file mode 100644 index 000000000..69511222f --- /dev/null +++ b/roles/bootstrap-os/tasks/bootstrap-debian.yml @@ -0,0 +1,23 @@ +--- +# raw: cat /etc/issue.net | grep '{{ bootstrap_versions }}' + +- name: Bootstrap | Check if bootstrap is needed + raw: which "{{ item }}" + register: need_bootstrap + failed_when: false + with_items: + - python + - pip + - dbus-daemon + tags: facts + +- name: Bootstrap | Install python 2.x, pip, and dbus + raw: + apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y python-minimal python-pip dbus + when: + "{{ need_bootstrap.results | map(attribute='rc') | sort | last | bool }}" + +- set_fact: + ansible_python_interpreter: "/usr/bin/python" + tags: facts diff --git a/roles/bootstrap-os/tasks/main.yml b/roles/bootstrap-os/tasks/main.yml index 5e1cdbc03..bb6937902 100644 --- a/roles/bootstrap-os/tasks/main.yml +++ b/roles/bootstrap-os/tasks/main.yml @@ -2,6 +2,9 @@ - include: bootstrap-ubuntu.yml when: bootstrap_os == "ubuntu" +- include: bootstrap-debian.yml + when: bootstrap_os == "debian" + - include: bootstrap-coreos.yml when: bootstrap_os == "coreos" diff --git a/roles/kubernetes/master/templates/manifests/kube-controller-manager.manifest.j2 b/roles/kubernetes/master/templates/manifests/kube-controller-manager.manifest.j2 index fdcfeaa25..9be67c01d 100644 --- a/roles/kubernetes/master/templates/manifests/kube-controller-manager.manifest.j2 +++ b/roles/kubernetes/master/templates/manifests/kube-controller-manager.manifest.j2 @@ -50,7 +50,7 @@ spec: {% if kube_network_plugin is defined and kube_network_plugin == 'cloud' %} - --configure-cloud-routes=true {% endif %} -{% if kube_network_plugin is defined and kube_network_plugin in ["cloud", "flannel"] %} +{% if kube_network_plugin is defined and kube_network_plugin in ["cloud", "flannel", "canal"] %} - --allocate-node-cidrs=true - --cluster-cidr={{ kube_pods_subnet }} - --service-cluster-ip-range={{ kube_service_addresses }}