diff options
author | Pawan Verma <pawanjbs5@gmail.com> | 2021-10-04 18:44:20 +0530 |
---|---|---|
committer | Pawan Verma <pawanjbs5@gmail.com> | 2021-10-16 00:55:05 +0530 |
commit | 0ab7ff90c3fec546275fd35ffc13cb787c03721e (patch) | |
tree | 983c14abdc5d840315c478f9555c9127e7219700 /tools/k8s/cluster-deployment/k8scluster/roles/clustermanager/tasks/clear-danm.yaml | |
parent | 212d0f7165d26d97823852992ed261529e095b69 (diff) |
Add support for Calico, Cilium, Contiv-VPP and Danm in k8scluster deployment scripts.
This patch adds support for installing Calico, Cilium, Contiv-VPP and
Danm in Kubernetes cluster deployment ansible scripts.
Signed-off-by: Pawan Verma <pawanjbs5@gmail.com>
Change-Id: Ib76620fa0f63dd58e8496bbf31baf515f697bcde
Diffstat (limited to 'tools/k8s/cluster-deployment/k8scluster/roles/clustermanager/tasks/clear-danm.yaml')
-rw-r--r-- | tools/k8s/cluster-deployment/k8scluster/roles/clustermanager/tasks/clear-danm.yaml | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/tools/k8s/cluster-deployment/k8scluster/roles/clustermanager/tasks/clear-danm.yaml b/tools/k8s/cluster-deployment/k8scluster/roles/clustermanager/tasks/clear-danm.yaml new file mode 100644 index 00000000..1f989805 --- /dev/null +++ b/tools/k8s/cluster-deployment/k8scluster/roles/clustermanager/tasks/clear-danm.yaml @@ -0,0 +1,63 @@ +--- + +- name: Delete DanmNet CRD's + k8s: + state: absent + definition: '{{ item }}' + with_items: '{{ lookup("url", "https://raw.githubusercontent.com/nokia/danm/v4.3.0/integration/crds/lightweight/DanmNet.yaml", split_lines=False) | from_yaml_all | list }}' + when: item is not none + +- name: Delete DanmEp CRD's + k8s: + state: absent + definition: '{{ item }}' + with_items: '{{ lookup("url", "https://raw.githubusercontent.com/nokia/danm/v4.3.0/integration/crds/lightweight/DanmEp.yaml", split_lines=False) | from_yaml_all | list }}' + when: item is not none + + +- name: Delete Danm service account + k8s: + state: absent + kind: ServiceAccount + name: danm + namespace: kube-system + +- name: Delete Danm cni conf + command: sudo rm -f /etc/cni/net.d/00-danm.conf + +- name: Delete Danm cni kubeconfig + command: sudo rm -f /etc/cni/net.d/danm-kubeconfig + +- name: Delete Danm rbac + k8s: + state: absent + definition: '{{ item }}' + with_items: '{{ lookup("url", "https://raw.githubusercontent.com/nokia/danm/v4.3.0/integration/cni_config/danm_rbac.yaml", split_lines=False) | from_yaml_all | list }}' + when: item is not none + +- name: Delete Danm cni plugins + k8s: + state: absent + definition: "{{ lookup('file', 'danm-cni-plugins.yaml') }}" + +- name: Delete Danm netwatcher + k8s: + state: absent + definition: "{{ lookup('file', 'danm-netwatcher-daemonset.yaml') }}" + +- name: Get CA Bundle + shell: kubectl config view --raw -o json | jq -r '.clusters[0].cluster."certificate-authority-data"' | tr -d '"' + register: danm_ca_bundle + +- name: Generate webhook deployment + template: + src: danm-webhook.yaml + dest: /tmp/danm-webhook.yaml + mode: 0644 + vars: + ca_bundle: "{{ danm_ca_bundle.stdout }}" + +- name: Delete Danm webhook + k8s: + state: absent + src: /tmp/danm-webhook.yaml |