Browse Source
Merge pull request #2257 from rzenker/tb/baremetal-tweaks
baremetal tweaks
pull/2278/merge
Aivars Sterns
7 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with
11 additions and
8 deletions
-
roles/bootstrap-os/defaults/main.yml
-
roles/bootstrap-os/tasks/main.yml
-
roles/kubernetes/node/defaults/main.yml
-
roles/network_plugin/calico/templates/calico-config.yml.j2
-
roles/network_plugin/calico/templates/cni-calico.conflist.j2
-
roles/reset/defaults/main.yml
-
roles/reset/tasks/main.yml
|
|
@ -2,3 +2,5 @@ |
|
|
|
pip_python_coreos_modules: |
|
|
|
- httplib2 |
|
|
|
- six |
|
|
|
|
|
|
|
override_system_hostname: true |
|
|
@ -29,12 +29,12 @@ |
|
|
|
- name: Assign inventory name to unconfigured hostnames (non-CoreOS) |
|
|
|
hostname: |
|
|
|
name: "{{inventory_hostname}}" |
|
|
|
when: ansible_os_family not in ['CoreOS', 'Container Linux by CoreOS'] |
|
|
|
when: ansible_os_family not in ['CoreOS', 'Container Linux by CoreOS'] and override_system_hostname |
|
|
|
|
|
|
|
- name: Assign inventory name to unconfigured hostnames (CoreOS only) |
|
|
|
command: "hostnamectl set-hostname {{inventory_hostname}}" |
|
|
|
register: hostname_changed |
|
|
|
when: ansible_hostname == 'localhost' and ansible_os_family in ['CoreOS', 'Container Linux by CoreOS'] |
|
|
|
when: ansible_hostname == 'localhost' and ansible_os_family in ['CoreOS', 'Container Linux by CoreOS'] and override_system_hostname |
|
|
|
|
|
|
|
- name: Update hostname fact (CoreOS only) |
|
|
|
setup: |
|
|
|
|
|
@ -84,7 +84,7 @@ kube_hyperkube_image_repo: "" |
|
|
|
kube_override_hostname: >- |
|
|
|
{%- if cloud_provider is defined and cloud_provider in [ 'aws' ] -%} |
|
|
|
{%- else -%} |
|
|
|
{{ ansible_hostname }} |
|
|
|
{{ inventory_hostname }} |
|
|
|
{%- endif -%} |
|
|
|
|
|
|
|
# cAdvisor port |
|
|
|
|
|
@ -14,6 +14,6 @@ data: |
|
|
|
cluster_type: "kubespray,bgp" |
|
|
|
{% endif %} |
|
|
|
calico_backend: "bird" |
|
|
|
{%- if inventory_hostname in groups['k8s-cluster'] and peer_with_router|default(false) %} |
|
|
|
as: "{{ local_as }}" |
|
|
|
{% endif -%} |
|
|
|
{% if inventory_hostname in groups['k8s-cluster'] and peer_with_router|default(false) %} |
|
|
|
as: "{{ local_as|default(global_as_num) }}" |
|
|
|
{% endif -%} |
|
|
@ -6,7 +6,7 @@ |
|
|
|
{% if cloud_provider is defined %} |
|
|
|
"nodename": "{{ calico_kubelet_name.stdout }}", |
|
|
|
{% else %} |
|
|
|
"nodename": "{{ ansible_hostname }}", |
|
|
|
"nodename": "{{ inventory_hostname }}", |
|
|
|
{% endif %} |
|
|
|
"type": "calico", |
|
|
|
"etcd_endpoints": "{{ etcd_access_addresses }}", |
|
|
|
|
|
@ -1,2 +1,3 @@ |
|
|
|
--- |
|
|
|
flush_iptables: true |
|
|
|
reset_restart_network: true |
|
|
@ -195,7 +195,7 @@ |
|
|
|
networking |
|
|
|
{%- endif %} |
|
|
|
state: restarted |
|
|
|
when: ansible_os_family not in ["CoreOS", "Container Linux by CoreOS"] |
|
|
|
when: ansible_os_family not in ["CoreOS", "Container Linux by CoreOS"] and reset_restart_network |
|
|
|
tags: |
|
|
|
- services |
|
|
|
- network |