Add AIO with k0s

Related-Prod: PRODX-46480
Change-Id: I824d424d524213f56fdfe43dd27710f306e6ecb5
diff --git a/de/heat-templates/scripts/functions.sh b/de/heat-templates/scripts/functions.sh
index 3f838b6..1283894 100644
--- a/de/heat-templates/scripts/functions.sh
+++ b/de/heat-templates/scripts/functions.sh
@@ -359,9 +359,13 @@
 }
 
 function install_k0s {
+    local install_flags="--enable-worker"
+    if [[ "${SINGLE_NODE}" == true ]]; then
+        install_flags="$install_flags  --single"
+    fi
     mkdir -p /etc/k0s
     k0s config create > /etc/k0s/k0s.yaml
-    k0s install controller -c /etc/k0s/k0s.yaml
+    k0s install controller -c /etc/k0s/k0s.yaml $install_flags
     k0s start
 
     sleep 60
@@ -372,8 +376,10 @@
 
     mkdir -p /etc/k0s
     k0s kubeconfig admin > /etc/k0s/admin.conf
-    k0s token create --role=worker > /etc/k0s/worker_token.yaml
-    k0s token create --role=controller > /etc/k0s/controller_token.yaml
+    if [[ "${SINGLE_NODE}" != true ]]; then
+        k0s token create --role=worker > /etc/k0s/worker_token.yaml
+        k0s token create --role=controller > /etc/k0s/controller_token.yaml
+    fi
 
     install_pkgs nginx
     rm -f /etc/nginx/sites-enabled/default
diff --git a/de/heat-templates/scripts/launch.sh b/de/heat-templates/scripts/launch.sh
index e5392ac..53148b3 100644
--- a/de/heat-templates/scripts/launch.sh
+++ b/de/heat-templates/scripts/launch.sh
@@ -152,16 +152,18 @@
                 download_k0s
                 install_k0s
             fi
+            wait_for_node
+            set_node_labels
+            collect_ceph_metadata
+            configure_contrack
             if [[ "${KUBERNETES_INSTALLER}" == "ucp" ]]; then
-                wait_for_node
-                set_node_labels
-                collect_ceph_metadata
-                configure_contrack
                 disable_iptables_for_bridges
             fi
             if [[ "${SINGLE_NODE}" == true ]]; then
                 nested_virt_config
-                disable_master_taint
+                if [[ "${KUBERNETES_INSTALLER}" == "ucp" ]]; then
+                    disable_master_taint
+                fi
                 collect_interfaces_metadata
             fi
             cron_disable_calico_offloading