diff options
author | Christian Pointner <equinox@spreadspace.org> | 2022-05-08 02:19:02 +0200 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2022-05-08 02:19:02 +0200 |
commit | 382f294e9b1dbcc2cb298d6a0cc80234dffcab82 (patch) | |
tree | c4339e341070ef5b2012fd8a9cced42217decd62 /roles/kubernetes/kubeadm/control-plane/tasks/net_kubeguard.yml | |
parent | prepare ch-dione and ch-helene for chtest k8s cluster (diff) | |
parent | kubernetes/kubeadm: fix kubeguard network plugin (diff) |
Merge branch 'topic/k8s-1.24'
Diffstat (limited to 'roles/kubernetes/kubeadm/control-plane/tasks/net_kubeguard.yml')
-rw-r--r-- | roles/kubernetes/kubeadm/control-plane/tasks/net_kubeguard.yml | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/roles/kubernetes/kubeadm/control-plane/tasks/net_kubeguard.yml b/roles/kubernetes/kubeadm/control-plane/tasks/net_kubeguard.yml new file mode 100644 index 00000000..66dac49b --- /dev/null +++ b/roles/kubernetes/kubeadm/control-plane/tasks/net_kubeguard.yml @@ -0,0 +1,19 @@ +--- +- 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: check if kubeguard (kube-router) is already installed + check_mode: no + command: kubectl --kubeconfig /etc/kubernetes/admin.conf diff -f /etc/kubernetes/network-plugin.yml + failed_when: false + changed_when: false + register: kubeguard_diff_result + + - name: install kubeguard (kube-router) on to the cluster + when: kubeguard_diff_result.rc != 0 + command: kubectl --kubeconfig /etc/kubernetes/admin.conf apply -f /etc/kubernetes/network-plugin.yml |