VOL-570 : Install Kubernetes in production and test modes
- Supports offline installation for k8s
- Configs and deploys voltha components
Change-Id: I29eb87c035cea1e86176bb2e30d36278760ece82
diff --git a/install/ansible/roles/voltha-k8s/tasks/teardown.yml b/install/ansible/roles/voltha-k8s/tasks/teardown.yml
new file mode 100644
index 0000000..10fb856
--- /dev/null
+++ b/install/ansible/roles/voltha-k8s/tasks/teardown.yml
@@ -0,0 +1,69 @@
+# Dashd and Shovel
+- name: "VOLT-HA Teardown | Stop DASHD and SHOVEL"
+ command: kubectl delete --ignore-not-found=true -f {{ target_voltha_home }}/k8s/stats.yml
+ run_once: true
+
+# Grafana
+- name: "VOLT-HA Teardown | Stop Grafana"
+ command: kubectl delete --ignore-not-found=true -f {{ target_voltha_home }}/k8s/grafana.yml
+ run_once: true
+
+# NETCONF
+- name: "VOLT-HA Teardown | Stop NETCONF"
+ command: kubectl delete --ignore-not-found=true -f {{ target_voltha_home }}/k8s/netconf.yml
+ run_once: true
+
+# Voltha CLI
+- name: "VOLT-HA Teardown | Stop VOLT-HA CLI"
+ command: kubectl delete --ignore-not-found=true -f {{ target_voltha_home }}/k8s/vcli.yml
+ run_once: true
+
+# Envoy (for consul)
+- name: "VOLT-HA Teardown | Stop Envoy (for consul)"
+ command: kubectl delete --ignore-not-found=true -f {{ target_voltha_home }}/k8s/envoy_for_consul.yml
+ run_once: true
+
+# OFagent
+- name: "VOLT-HA Teardown | Stop OpenFlow Agent"
+ command: kubectl delete --ignore-not-found=true -f {{ target_voltha_home }}/k8s/ofagent.yml
+ run_once: true
+
+# Voltha Core (for consul)
+- name: "VOLT-HA Teardown | Stop VOLT-HA core (for consul)"
+ command: kubectl delete --ignore-not-found=true -f {{ target_voltha_home }}/k8s/vcore_for_consul.yml
+ run_once: true
+
+# Consul
+- name: "VOLT-HA Teardown | Stop consul"
+ command: kubectl delete --ignore-not-found=true -f {{ target_voltha_home }}/k8s/consul.yml
+ run_once: true
+
+# Fluentd
+- name: "VOLT-HA Teardown | Stop fluentd"
+ command: kubectl delete --ignore-not-found=true -f {{ target_voltha_home }}/k8s/fluentd.yml
+ run_once: true
+
+# Fluentd Config
+- name: "VOLT-HA Teardown | Remove Fluentd Configuration"
+ command: kubectl delete --ignore-not-found=true -f {{ target_voltha_home }}/k8s/fluentd-config.yml
+ run_once: true
+
+# Kafka
+- name: "VOLT-HA Teardown | Stop kafka"
+ command: kubectl delete --ignore-not-found=true -f {{ target_voltha_home }}/k8s/kafka.yml
+ run_once: true
+
+# Zookeeper
+- name: "VOLT-HA Teardown | Stop zookeeper"
+ command: kubectl delete --ignore-not-found=true -f {{ target_voltha_home }}/k8s/zookeeper.yml
+ run_once: true
+
+# Ingress
+- name: "VOLT-HA Teardown | Stop Ingress Controller"
+ command: kubectl delete --ignore-not-found=true -f {{ target_voltha_home }}/k8s/ingress
+ run_once: true
+
+# Namespace
+- name: "VOLT-HA Teardown | Remove Namespace"
+ command: kubectl delete --ignore-not-found=true -f {{ target_voltha_home }}/k8s/namespace.yml
+ run_once: true