feat: implement mjfilter file for templates (#1244)
* feat: implement mjfilter file for templates Signed-off-by: Devin Buhl <devin@buhl.casa> * fix: use data.get in mjfilters Signed-off-by: Devin Buhl <devin@buhl.casa> --------- Signed-off-by: Devin Buhl <devin@buhl.casa>
This commit is contained in:
1 parent
9d175fcc99
commit
5d849727d8
112 files changed
+81
-184
No files matched your search
@@ -1,4 +1,3 @@
|
||||
#% if bootstrap_distribution in ['k0s', 'k3s'] %#
|
||||
---
|
||||
- name: Cluster kube-vip
|
||||
hosts: master
|
||||
@@ -28,4 +27,3 @@
|
||||
dest: "/var/lib/k0s/manifests/kube-vip/kube-vip-ds.yaml"
|
||||
#% endif %#
|
||||
mode: preserve
|
||||
#% endif %#
|
||||
@@ -1,4 +1,3 @@
|
||||
#% if bootstrap_distribution in ['k0s', 'k3s'] %#
|
||||
---
|
||||
- name: Reboot
|
||||
hosts: kubernetes
|
||||
@@ -14,4 +13,3 @@
|
||||
ansible.builtin.reboot:
|
||||
msg: Rebooting nodes
|
||||
reboot_timeout: 3600
|
||||
#% endif %#
|
||||
@@ -1,4 +1,3 @@
|
||||
#% if bootstrap_distribution in ['k0s', 'k3s'] %#
|
||||
---
|
||||
# https://github.com/kevincoakley/ansible-role-k8s-rolling-update
|
||||
- name: Cluster rollout update
|
||||
@@ -56,8 +55,7 @@
|
||||
terminate_grace_period: 600
|
||||
wait_timeout: 900
|
||||
pod_selectors:
|
||||
# Rook Ceph
|
||||
- app!=rook-ceph-osd
|
||||
- app!=rook-ceph-osd # Rook Ceph
|
||||
delegate_to: "{{ groups['master'][0] }}"
|
||||
|
||||
- name: Update
|
||||
@@ -87,4 +85,3 @@
|
||||
#% endif %#
|
||||
state: uncordon
|
||||
delegate_to: "{{ groups['master'][0] }}"
|
||||
#% endif %#
|
||||
@@ -0,0 +1 @@
|
||||
main = lambda data: data.get("bootstrap_distribution") in ['k3s']
|
||||
@@ -1,4 +1,3 @@
|
||||
#% if bootstrap_distribution in ['k3s'] %#
|
||||
---
|
||||
- name: Cilium
|
||||
block:
|
||||
@@ -55,4 +54,3 @@
|
||||
definition:
|
||||
metadata:
|
||||
finalizers: []
|
||||
#% endif %#
|
||||
@@ -1,4 +1,3 @@
|
||||
#% if bootstrap_distribution in ['k3s'] %#
|
||||
---
|
||||
# https://github.com/k3s-io/k3s/issues/1971
|
||||
- name: Cruft
|
||||
@@ -31,4 +30,3 @@
|
||||
namespace: kube-system
|
||||
state: absent
|
||||
loop: "{{ addons_list.resources | selectattr('metadata.name', 'match', '^custom-.*') | list }}"
|
||||
#% endif %#
|
||||
@@ -1,4 +1,3 @@
|
||||
#% if bootstrap_distribution in ['k3s'] %#
|
||||
---
|
||||
- name: Get absolute path to this Git repository # noqa: command-instead-of-module
|
||||
ansible.builtin.command: git rev-parse --show-toplevel
|
||||
@@ -25,4 +24,3 @@
|
||||
path: "{{ repository_path.stdout }}/kubeconfig"
|
||||
regexp: https://127.0.0.1:6443
|
||||
replace: "https://{{ k3s_registration_address }}:6443"
|
||||
#% endif %#
|
||||
@@ -0,0 +1 @@
|
||||
main = lambda data: data.get("bootstrap_distribution") in ['k3s']
|
||||
@@ -1,4 +1,3 @@
|
||||
#% if bootstrap_distribution in ['k3s'] %#
|
||||
---
|
||||
# https://docs.k3s.io/helm
|
||||
apiVersion: helm.cattle.io/v1
|
||||
@@ -17,4 +16,3 @@ spec:
|
||||
#% filter indent(width=4, first=True) %#
|
||||
#% include 'partials/cilium-values-init.partial.yaml.j2' %#
|
||||
#% endfilter %#
|
||||
#% endif %#
|
||||
@@ -1,4 +1,2 @@
|
||||
#% if bootstrap_distribution in ['k3s'] %#
|
||||
---
|
||||
#% include 'partials/kube-vip-ds.partial.yaml.j2' %#
|
||||
#% endif %#
|
||||
@@ -1,4 +1,2 @@
|
||||
#% if bootstrap_distribution in ['k3s'] %#
|
||||
---
|
||||
#% include 'partials/kube-vip-rbac.partial.yaml.j2' %#
|
||||
#% endif %#
|
||||
Reference in new issue
Block a user