Smaine Kahlouch 2015-11-02 13:46:23 +01:00
commit 2b3543d0ee
7 changed files with 9 additions and 9 deletions

View File

@ -4,7 +4,7 @@
when: kube_network_plugin is defined and kube_network_plugin == "calico"
- name: Configure calico/docker bridge
shell: /etc/network/if-up.d/create_cbr
command: /etc/network/if-up.d/create_cbr
when: kube_network_plugin is defined and kube_network_plugin == "calico"
- name: Configure docker to use cbr0 bridge

View File

@ -16,9 +16,9 @@
- docker-engine=1.8.3-0~{{ ansible_distribution_release }}
- name: Copy default docker configuration
template: src=default-docker.j2 dest=/etc/default/docker
template: src=default-docker.j2 dest=/etc/default/docker backup=yes
notify: restart docker
- name: Copy Docker systemd unit file
copy: src=systemd-docker.service dest=/lib/systemd/system/docker.service
copy: src=systemd-docker.service dest=/lib/systemd/system/docker.service backup=yes
notify: restart docker

View File

@ -19,7 +19,7 @@
args:
creates: "{{ kube_cert_dir }}/server.crt"
environment:
MASTER_IP: "{{ hostvars[inventory_hostname]['ansible_default_ipv4']['address'] }}"
MASTER_IP: "{{ hostvars[inventory_hostname]['ip'] | default(hostvars[inventory_hostname]['ansible_default_ipv4']['address']) }}"
MASTER_NAME: "{{ inventory_hostname }}"
DNS_DOMAIN: "{{ dns_domain }}"
SERVICE_CLUSTER_IP_RANGE: "{{ kube_service_addresses }}"

View File

@ -8,7 +8,7 @@
KUBE_API_ADDRESS="--insecure-bind-address=0.0.0.0"
# The port on the local server to listen on.
KUBE_API_PORT="--insecure-port=8080 --secure-port={{ kube_master_port }}"
KUBE_API_PORT="--insecure-port={{kube_master_insecure_port}} --secure-port={{ kube_master_port }}"
# KUBELET_PORT="--kubelet_port=10250"

View File

@ -10,7 +10,7 @@ contexts:
clusters:
- cluster:
certificate-authority: {{ kube_cert_dir }}/ca.crt
server: http://{{ groups['kube-master'][0] }}:8080
server: http://{{ groups['kube-master'][0] }}:{{kube_master_insecure_port}}
name: {{ cluster_name }}
users:
- name: proxy

View File

@ -5,7 +5,7 @@ preferences: {}
clusters:
- cluster:
certificate-authority: {{ kube_cert_dir }}/ca.crt
server: https://{{ groups['kube-master'][0] }}:443
server: https://{{ groups['kube-master'][0] }}:{{kube_master_port}}
name: {{ cluster_name }}
contexts:
- context:

View File

@ -1,7 +1,7 @@
#! /usr/bin/bash
# This node's IPv4 address
CALICO_IPAM=true
DEFAULT_IPV4={{ ansible_default_ipv4.address }}
DEFAULT_IPV4={{ip | default(ansible_default_ipv4.address) }}
{% if inventory_hostname in groups['kube-node'] %}
# The kubernetes master IP
@ -12,7 +12,7 @@ KUBERNETES_MASTER={{ groups['kube-master'][0] }}
ETCD_AUTHORITY={{ groups['kube-master'][0] }}:4001
# The kubernetes-apiserver location - used by the calico plugin
KUBE_API_ROOT=http://{{ groups['kube-master'][0] }}:8080/api/v1/
KUBE_API_ROOT=http://{{ groups['kube-master'][0] }}:{{kube_master_insecure_port}}/api/v1/
# Location of the calicoctl binary - used by the calico plugin
CALICOCTL_PATH="{{ bin_dir }}/calicoctl"