feat!(kube-vip): Enable flux taking over kube-vip post-deployment. (#1357)
* feat!(kube-vip): Enable flux taking over kube-vip post-deployment. * Update bootstrap/templates/kubernetes/apps/kube-system/kube-vip/app/kustomization.yaml.j2 * Update bootstrap/templates/kubernetes/apps/kube-system/kube-vip/app/kustomization.yaml.j2 * Update daemonset.yaml.j2 * Update rbac.yaml.j2 * Update bootstrap/templates/kubernetes/apps/kube-system/kustomization.yaml.j2 * Update kustomization.yaml.j2 * Update kustomization.yaml.j2 * Create .mjfilter.py * Update bootstrap/templates/ansible/playbooks/cluster-installation.yaml.j2 * Update bootstrap/templates/kubernetes/apps/kube-system/kube-vip/ks.yaml.j2 --------- Co-authored-by: Devin Buhl <onedr0p@users.noreply.github.com>
This commit is contained in:
1 parent
d1b5fa1c98
commit
d105410b6b
11 files changed
+39
-30
No files matched your search
@@ -18,6 +18,6 @@ k3s_registries:
|
|||||||
k3s_release_version: v1.29.1+k3s2
|
k3s_release_version: v1.29.1+k3s2
|
||||||
k3s_server_manifests_templates:
|
k3s_server_manifests_templates:
|
||||||
- custom-cilium-helmchart.yaml
|
- custom-cilium-helmchart.yaml
|
||||||
- kube-vip-ds.yaml
|
- custom-kube-vip-ds.yaml
|
||||||
- kube-vip-rbac.yaml
|
- custom-kube-vip-rbac.yaml
|
||||||
k3s_use_unsupported_config: true
|
k3s_use_unsupported_config: true
|
||||||
@@ -50,6 +50,7 @@
|
|||||||
wait_timeout: 360
|
wait_timeout: 360
|
||||||
loop:
|
loop:
|
||||||
- { name: cilium, kind: HelmChart, namespace: kube-system }
|
- { name: cilium, kind: HelmChart, namespace: kube-system }
|
||||||
|
- { name: kube-vip, kind: DaemonSet, namespace: kube-system }
|
||||||
|
|
||||||
- name: Cilium
|
- name: Cilium
|
||||||
when: k3s_primary_control_node
|
when: k3s_primary_control_node
|
||||||
|
|||||||
@@ -1,24 +0,0 @@
|
|||||||
---
|
|
||||||
- name: Cluster kube-vip
|
|
||||||
hosts: controllers
|
|
||||||
serial: 1
|
|
||||||
become: true
|
|
||||||
gather_facts: true
|
|
||||||
any_errors_fatal: true
|
|
||||||
pre_tasks:
|
|
||||||
- name: Pausing for 5 seconds...
|
|
||||||
ansible.builtin.pause:
|
|
||||||
seconds: 5
|
|
||||||
tasks:
|
|
||||||
- name: Ensure Kubernetes is running
|
|
||||||
ansible.builtin.include_role:
|
|
||||||
name: xanmanning.k3s
|
|
||||||
public: true
|
|
||||||
vars:
|
|
||||||
k3s_state: started
|
|
||||||
|
|
||||||
- name: Upgrade kube-vip
|
|
||||||
ansible.builtin.template:
|
|
||||||
src: templates/kube-vip-ds.yaml
|
|
||||||
dest: "{{ k3s_server_manifests_dir }}/kube-vip-ds.yaml"
|
|
||||||
mode: preserve
|
|
||||||
File renamed without changes.
File renamed without changes.
@@ -0,0 +1 @@
|
|||||||
|
main = lambda data: data.get("bootstrap_distribution", "k3s") in ["k3s"]
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
---
|
||||||
|
#% include 'partials/kube-vip-ds.partial.yaml.j2' %#
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
resources:
|
||||||
|
- ./rbac.yaml
|
||||||
|
- ./daemonset.yaml
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
---
|
||||||
|
#% include 'partials/kube-vip-rbac.partial.yaml.j2' %#
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
---
|
||||||
|
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
||||||
|
kind: Kustomization
|
||||||
|
metadata:
|
||||||
|
name: &app kube-vip
|
||||||
|
namespace: flux-system
|
||||||
|
spec:
|
||||||
|
targetNamespace: kube-system
|
||||||
|
commonMetadata:
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: *app
|
||||||
|
path: ./kubernetes/apps/kube-system/kube-vip/app
|
||||||
|
prune: true
|
||||||
|
sourceRef:
|
||||||
|
kind: GitRepository
|
||||||
|
name: home-kubernetes
|
||||||
|
wait: false
|
||||||
|
interval: 30m
|
||||||
|
retryInterval: 1m
|
||||||
|
timeout: 5m
|
||||||
@@ -4,11 +4,12 @@ kind: Kustomization
|
|||||||
resources:
|
resources:
|
||||||
- ./namespace.yaml
|
- ./namespace.yaml
|
||||||
- ./cilium/ks.yaml
|
- ./cilium/ks.yaml
|
||||||
|
- ./metrics-server/ks.yaml
|
||||||
|
- ./reloader/ks.yaml
|
||||||
#% if bootstrap_distribution in ["talos"] %#
|
#% if bootstrap_distribution in ["talos"] %#
|
||||||
- ./kubelet-csr-approver/ks.yaml
|
- ./kubelet-csr-approver/ks.yaml
|
||||||
#% endif %#
|
|
||||||
- ./metrics-server/ks.yaml
|
|
||||||
#% if bootstrap_distribution in ["talos"] %#
|
|
||||||
- ./spegel/ks.yaml
|
- ./spegel/ks.yaml
|
||||||
#% endif %#
|
#% endif %#
|
||||||
- ./reloader/ks.yaml
|
#% if bootstrap_distribution in ["k3s"] %#
|
||||||
|
- ./kube-vip/ks.yaml
|
||||||
|
#% endif %#
|
||||||
Reference in new issue
Block a user