Add kube-router annotations (#3533)

This commit is contained in:
Egor
2018-10-21 10:35:52 +03:00
committed by k8s-ci-robot
parent 8a17de327e
commit ccc3f89060
5 changed files with 63 additions and 1 deletions

View File

@@ -0,0 +1,21 @@
---
- name: kube-router | Add annotations on kube-master
command: "{{bin_dir}}/kubectl annotate --overwrite node {{ ansible_hostname }} {{ item }}"
with_items:
- "{{ kube_router_annotations_master }}"
delegate_to: "{{groups['kube-master'][0]}}"
when: kube_router_annotations_master is defined
- name: kube-router | Add annotations on kube-node
command: "{{bin_dir}}/kubectl annotate --overwrite node {{ ansible_hostname }} {{ item }}"
with_items:
- "{{ kube_router_annotations_node }}"
delegate_to: "{{groups['kube-master'][0]}}"
when: kube_router_annotations_node is defined
- name: kube-router | Add common annotations on all servers
command: "{{bin_dir}}/kubectl annotate --overwrite node {{ ansible_hostname }} {{ item }}"
with_items:
- "{{ kube_router_annotations_all }}"
delegate_to: "{{groups['kube-master'][0]}}"
when: kube_router_annotations_all is defined

View File

@@ -1,4 +1,7 @@
---
- name: kube-router | Create annotations
include: annotate.yml
tags: annotate
- name: kube-router | Copy cni plugins from hyperkube
command: "{{ docker_bin_dir }}/docker run --rm -v /opt/cni/bin:/cnibindir {{ hyperkube_image_repo }}:{{ hyperkube_image_tag }} /bin/cp -prf /opt/cni/bin/. /cnibindir/"
@@ -14,4 +17,4 @@
- name: kube-router | Create manifest
template:
src: kube-router.yml.j2
dest: "{{ kube_config_dir }}/kube-router.yml"
dest: "{{ kube_config_dir }}/kube-router.yml"