feat: switch to binary kubernetes, fluxcd and helm install (#351)

* feat: more binary installs

* feat: install k8s from binaries

* fix: sync with the main branch

* fix(containerd): go back to using ansible_system

* fix(containerd): containerd+crictl cleanups

* chore: refactor k8s role

* ci: fix job name

* ci: do not fail-fast

* ci: disable swap

* ci: disable sudo

* ci: add kubelet logs

* ci: install udev

* ci: fix package names

* ci: fix idempotence

* ci: install deps earlier

* ci: added k8s tests

* ci: fix vars for fedora

* chore: drop unused submodule

* ci: fix typo in kubelet

* ci: start dbus.socket

* ci: fix fedora

* ci: fix paths

* fix: add maxconn to avoid killing system

* ci: print container logs

* ci: fix role test

* ci: move to stdout logs

* ci: fix idempotence

* ci: capture both stdout+stderr

* ci: drop extra default-server

* ci: fix haproxy

* ci: install apparmor-utils

* ci: update apt cache

* ci: remove pyyaml from rocky linux

* ci: add ha tests

* ci: fix flipped scenarios

* ci: use default keepalived iface

* chore: add debug

* chore: start tmate on failure

* chore: use newer containerd

* chore: fix shas

* ci: fix debian

* ci: back to debug

* ci: add containerd test suite

* ci: fix idempotence

* ci: force containerd restart

* ci: drop handler

* ci: load ip_tables module

* ci: add modprobe

* ci: add missing pkgs

* ci: load ip6_tables

* ci: add /lib/modules

* ci: add missing udev

* ci: run unconfined apparmor

* ci: drop debian + fedora support

* ci: fix paths

* chore: refactor to use vexxhost.kubernetes

* chore: refactor to using helm role

* wip

* ci: remove un-needed tests

* chore: refactor to k8s_node_label

* chore: fix k8s deploy

---------

Co-authored-by: Mohammed Naser <mnaser@vexxhost.com>
diff --git a/playbooks/kubernetes.yml b/playbooks/kubernetes.yml
index 14806d9..502f91e 100644
--- a/playbooks/kubernetes.yml
+++ b/playbooks/kubernetes.yml
@@ -15,14 +15,35 @@
 - hosts: "{{ target | default('all') }}"
   become: true
   roles:
+    - role: defaults
     - role: sysctl
     - role: ethtool
       tags:
         - ethtool
-    - role: vexxhost.kubernetes.containerd
-      vars:
-        containerd_pause_image: "{{ atmosphere_images['pause'] }}"
-    - role: kubernetes
+  post_tasks:
+    - name: Set a fact with the "atmosphere_images" for other plays
+      ansible.builtin.set_fact:
+        atmosphere_images: "{{ atmosphere_images }}"
+
+- import_playbook: vexxhost.kubernetes.site
+  vars:
+    keepalived_image: "{{ atmosphere_images['keepalived'] }}"
+    keepalived_vrid: "{{ kubernetes_keepalived_vrid }}"
+    keepalived_interface: "{{ kubernetes_keepalived_interface }}"
+    keepalived_vip: "{{ kubernetes_keepalived_vip }}"
+    haproxy_image: "{{ atmosphere_images['haproxy'] }}"
+    containerd_pause_image: "{{ atmosphere_images['pause'] }}"
+    kubernetes_image_repository: "{{ atmosphere_images['kube_apiserver'] | vexxhost.kubernetes.docker_image('prefix') }}"
+    cilium_node_image: "{{ atmosphere_images['cilium_node'] }}"
+    cilium_operator_image: "{{ atmosphere_images['cilium_operator'] }}"
+    flux_image_registry: "{{ atmosphere_images['flux_helm_controller'] | vexxhost.kubernetes.docker_image('prefix') }}"
+
+- hosts: "{{ target | default('all') }}"
+  become: true
+  roles:
+    - role: vexxhost.atmosphere.kubernetes_node_labels
+      tags:
+        - kubernetes-node-labels
 
 # NOTE(mnaser): Add task to uninstall "unattended-upgrades" to avoid system
 #               upgrades during the deployment