feat: change jinja block/start delimiters for renovate support (#1163)

* feat: change jinja block/start delimiters for renovate support

Signed-off-by: Devin Buhl <devin@buhl.casa>

* fix: update renovate config an helm repos

Signed-off-by: Devin Buhl <devin@buhl.casa>

---------

Signed-off-by: Devin Buhl <devin@buhl.casa>
This commit is contained in:
Devin Buhl authored and GitHub committed 2024-01-15 19:31:45 -05:00
1 parent b602a7a1f5
commit 93c9d21581
90 files changed
+360 -354

No files matched your search

@@ -1,4 +1,4 @@
<% if bootstrap_distribution == 'k3s' %>
#% if bootstrap_distribution == 'k3s' %#
---
- name: Cluster Installation
hosts: kubernetes
@@ -60,4 +60,4 @@
- name: Cruft
when: k3s_primary_control_node
ansible.builtin.include_tasks: tasks/cruft.yaml
<% endif %>
#% endif %#
@@ -1,4 +1,4 @@
<% if bootstrap_distribution == 'k3s' %>
#% if bootstrap_distribution == 'k3s' %#
---
- name: Cluster kube-vip
hosts: master
@@ -23,4 +23,4 @@
src: templates/kube-vip-static-pod.yaml.j2
dest: "{{ k3s_server_pod_manifests_dir }}/kube-vip-static-pod.yaml"
mode: preserve
<% endif %>
#% endif %#
@@ -21,7 +21,7 @@
ansible.builtin.pause:
seconds: 5
tasks:
<% if bootstrap_distribution == "k3s" %>
#% if bootstrap_distribution == "k3s" %#
- name: Stop Kubernetes # noqa: ignore-errors
ignore_errors: true
block:
@@ -31,7 +31,7 @@
public: true
vars:
k3s_state: stopped
<% endif %>
#% endif %#
# https://github.com/k3s-io/docs/blob/main/docs/installation/network-options.md
- name: Networking
@@ -57,7 +57,7 @@
path: /etc/cni/net.d
state: absent
<% if bootstrap_distribution == "k3s" %>
#% if bootstrap_distribution == "k3s" %#
- name: Check to see if k3s-killall.sh exits
ansible.builtin.stat:
path: /usr/local/bin/k3s-killall.sh
@@ -92,11 +92,11 @@
path: "{{ k3s_install_dir }}/{{ item }}"
state: absent
loop: ["kubectl", "crictl", "ctr"]
<% endif %>
#% endif %#
- name: Remove local storage path
ansible.builtin.file:
path: "<< bootstrap_local_storage_path >>"
path: "{% bootstrap_local_storage_path %}"
state: absent
- name: Reboot
@@ -12,11 +12,11 @@
seconds: 5
tasks:
- name: Details
<% if bootstrap_distribution == 'k3s' %>
#% if bootstrap_distribution == 'k3s' %#
ansible.builtin.command: "k3s kubectl get node {{ inventory_hostname }} -o json"
<% elif bootstrap_distribution == 'k0s' %>
#% elif bootstrap_distribution == 'k0s' %#
ansible.builtin.command: "k0s kubectl get node {{ inventory_hostname }} -o json"
<% endif %>
#% endif %#
register: kubectl_get_node
delegate_to: "{{ groups['master'][0] }}"
failed_when: false
@@ -32,22 +32,22 @@
- name: Cordon
kubernetes.core.k8s_drain:
name: "{{ inventory_hostname }}"
<% if bootstrap_distribution == 'k3s' %>
#% if bootstrap_distribution == 'k3s' %#
kubeconfig: /etc/rancher/k3s/k3s.yaml
<% elif bootstrap_distribution == 'k0s' %>
#% elif bootstrap_distribution == 'k0s' %#
kubeconfig: /var/lib/k0s/pki/admin.conf
<% endif %>
#% endif %#
state: cordon
delegate_to: "{{ groups['master'][0] }}"
- name: Drain
kubernetes.core.k8s_drain:
name: "{{ inventory_hostname }}"
<% if bootstrap_distribution == 'k3s' %>
#% if bootstrap_distribution == 'k3s' %#
kubeconfig: /etc/rancher/k3s/k3s.yaml
<% elif bootstrap_distribution == 'k0s' %>
#% elif bootstrap_distribution == 'k0s' %#
kubeconfig: /var/lib/k0s/pki/admin.conf
<% endif %>
#% endif %#
state: drain
delete_options:
delete_emptydir_data: true
@@ -79,10 +79,10 @@
- name: Uncordon
kubernetes.core.k8s_drain:
name: "{{ inventory_hostname }}"
<% if bootstrap_distribution == 'k3s' %>
#% if bootstrap_distribution == 'k3s' %#
kubeconfig: /etc/rancher/k3s/k3s.yaml
<% elif bootstrap_distribution == 'k0s' %>
#% elif bootstrap_distribution == 'k0s' %#
kubeconfig: /var/lib/k0s/pki/admin.conf
<% endif %>
#% endif %#
state: uncordon
delegate_to: "{{ groups['master'][0] }}"
@@ -1,4 +1,4 @@
<% if bootstrap_distribution == 'k3s' %>
#% if bootstrap_distribution == 'k3s' %#
---
- name: Cilium
block:
@@ -55,4 +55,4 @@
definition:
metadata:
finalizers: []
<% endif %>
#% endif %#
@@ -1,4 +1,4 @@
<% if bootstrap_distribution == 'k3s' %>
#% if bootstrap_distribution == 'k3s' %#
---
- name: Coredns
block:
@@ -55,4 +55,4 @@
definition:
metadata:
finalizers: []
<% endif %>
#% endif %#
@@ -1,4 +1,4 @@
<% if bootstrap_distribution == 'k3s' %>
#% if bootstrap_distribution == 'k3s' %#
---
# https://github.com/k3s-io/k3s/issues/1971
- name: Cruft
@@ -31,4 +31,4 @@
namespace: kube-system
state: absent
loop: "{{ addons_list.resources | selectattr('metadata.name', 'match', '^custom-.*') | list }}"
<% endif %>
#% endif %#
@@ -1,4 +1,4 @@
<% if bootstrap_distribution == 'k3s' %>
#% if bootstrap_distribution == 'k3s' %#
---
- name: Get absolute path to this Git repository # noqa: command-instead-of-module
ansible.builtin.command: git rev-parse --show-toplevel
@@ -25,4 +25,4 @@
path: "{{ repository_path.stdout }}/kubeconfig"
regexp: https://127.0.0.1:6443
replace: "https://{{ k3s_registration_address }}:6443"
<% endif %>
#% endif %#
@@ -1,4 +1,4 @@
<% if bootstrap_distribution == 'k3s' %>
#% if bootstrap_distribution == 'k3s' %#
---
# https://docs.k3s.io/helm
apiVersion: helm.cattle.io/v1
@@ -32,28 +32,28 @@ spec:
ipam:
mode: kubernetes
ipv4NativeRoutingCIDR: "{{ cluster_cidr }}"
<% if bootstrap_ipv6_enabled | default(false) %>
#% if bootstrap_ipv6_enabled | default(false) %#
ipv6NativeRoutingCIDR: "{{ cluster_cidr_v6 }}"
ipv6:
enabled: true
<% endif %>
#% endif %#
k8sServiceHost: "{{ kube_api_addr }}"
k8sServicePort: 6443
kubeProxyReplacement: true
kubeProxyReplacementHealthzBindAddr: 0.0.0.0:10256
l2announcements:
<% if bootstrap_ipv6_enabled | default(false) %>
#% if bootstrap_ipv6_enabled | default(false) %#
enabled: false
<% else %>
#% else %#
enabled: true
# https://github.com/cilium/cilium/issues/26586
leaseDuration: 120s
leaseRenewDeadline: 60s
leaseRetryPeriod: 1s
<% endif %>
#% endif %#
loadBalancer:
algorithm: maglev
mode: << bootstrap_cilium_loadbalancer_mode | default('dsr', true) >>
mode: "{% bootstrap_cilium_loadbalancer_mode | default('dsr', true) %}"
localRedirectPolicy: true
operator:
replicas: 1
@@ -62,4 +62,4 @@ spec:
routingMode: native
securityContext:
privileged: true
<% endif %>
#% endif %#
@@ -1,4 +1,4 @@
<% if bootstrap_distribution == 'k3s' %>
#% if bootstrap_distribution == 'k3s' %#
---
# https://docs.k3s.io/helm
apiVersion: helm.cattle.io/v1
@@ -76,4 +76,4 @@ spec:
labelSelector:
matchLabels:
app.kubernetes.io/instance: coredns
<% endif %>
#% endif %#
@@ -1,4 +1,4 @@
<% if bootstrap_distribution == 'k3s' and bootstrap_nodes.master | length > 1 and not bootstrap_kube_api_addr %>
#% if bootstrap_distribution == 'k3s' and bootstrap_nodes.master | length > 1 and not bootstrap_kube_api_addr %#
---
apiVersion: v1
kind: Pod
@@ -58,4 +58,4 @@ spec:
- name: kubeconfig
hostPath:
path: /etc/rancher/k3s/k3s.yaml
<% endif %>
#% endif %#