summaryrefslogtreecommitdiff
path: root/roles/kubernetes/kubeadm/master/tasks/net_kubeguard.yml
blob: a572ca89cd1d6c02edb4be25e03dc60ed4cc2c46 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
---
- 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

    ## TODO: move to server-side apply (GA since 1.22)
  - 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