summaryrefslogtreecommitdiff
path: root/roles/kubernetes/kubeadm/master/tasks/net_kubeguard.yml
blob: f364fb5faa27561611d46db2ca9e8e760dcf5a0e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
---
- name: install kube-router variant
  when: "kubernetes_network_plugin_variant == 'with-kube-router'"
  block:
  - name: generate kubeguard (kube-router) configuration
    template:
      src: "net_kubeguard/kube-router.{{ kubernetes_network_plugin_version }}.yml.j2"
      dest: /etc/kubernetes/network-plugin.yml

  - name: install kubeguard (kube-router) on to the cluster
    command: kubectl --kubeconfig /etc/kubernetes/admin.conf apply -f /etc/kubernetes/network-plugin.yml
    register: kubeguard_apply_result
    changed_when: (kubeguard_apply_result.stdout_lines | reject("regex", " unchanged$") | list | length) > 0