feat!: template all ansible dir and rename template to bootstrap (#847)

This commit is contained in:
Devin Buhl authored and GitHub committed 2023-07-12 11:44:23 -04:00
1 parent c7f10b0c6d
commit c9d988a66f
177 files changed
+238 -129

No files matched your search

@@ -0,0 +1,32 @@
---
#
# Below vars are for the xanmanning.k3s role
# ...see https://github.com/PyratLabs/ansible-role-k3s
#
# renovate: datasource=github-releases depName=k3s-io/k3s
k3s_release_version: "v1.27.3+k3s1"
k3s_install_hard_links: true
k3s_become: true
k3s_etcd_datastore: true
k3s_use_unsupported_config: true
k3s_registration_address: "{% raw %}{{ kube_vip_addr }}{% endraw %}"
k3s_server_manifests_urls:
# Kube-vip RBAC
- url: https://raw.githubusercontent.com/kube-vip/kube-vip/main/docs/manifests/rbac.yaml
filename: kube-vip-rbac.yaml
# Essential Prometheus Operator CRDs (the rest are installed with the kube-prometheus-stack helm release)
- url: https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.66.0/example/prometheus-operator-crd/monitoring.coreos.com_podmonitors.yaml
filename: custom-prometheus-podmonitors.yaml
- url: https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.66.0/example/prometheus-operator-crd/monitoring.coreos.com_prometheusrules.yaml
filename: custom-prometheus-prometheusrules.yaml
- url: https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.66.0/example/prometheus-operator-crd/monitoring.coreos.com_servicemonitors.yaml
filename: custom-prometheus-servicemonitors.yaml
# /var/lib/rancher/k3s/server/manifests
k3s_server_manifests_templates:
- custom-cilium-helmchart.yaml.j2
- custom-cilium-l2.yaml.j2
- custom-coredns-helmchart.yaml.j2
# /var/lib/rancher/k3s/agent/pod-manifests
k3s_server_pod_manifests_templates:
- kube-vip-static-pod.yaml.j2
@@ -0,0 +1,8 @@
---
timezone: "{{ bootstrap_timezone }}"
github_username: "{{ bootstrap_github_username }}"
coredns_addr: "{{ bootstrap_coredns_addr }}"
kube_vip_addr: "{{ bootstrap_kube_vip_addr }}"
cluster_cidr: "{{ bootstrap_cluster_cidr }}"
service_cidr: "{{ bootstrap_service_cidr }}"
node_cidr: "{{ bootstrap_node_cidr }}"
@@ -0,0 +1,31 @@
---
# https://rancher.com/docs/k3s/latest/en/installation/install-options/server-config/
# https://github.com/PyratLabs/ansible-role-k3s
k3s_control_node: true
k3s_server:
node-ip: "{% raw %}{{ ansible_host }}{% endraw %}"
tls-san:
- "{% raw %}{{ kube_vip_addr }}{% endraw %}"
docker: false
flannel-backend: "none" # This needs to be in quotes
disable:
- coredns # Disable coredns - replaced with Coredns Helm Chart
- flannel # Disable flannel - replaced with Cilium Helm Chart
- local-storage # Disable local-path-provisioner - installed with Flux
- metrics-server # Disable metrics-server - installed with Flux
- servicelb # Disable servicelb - replaced with Cilium Helm Chart
- traefik # Disable traefik - replaced with ingress-nginx and installed with Flux
disable-network-policy: true
disable-cloud-controller: true
disable-kube-proxy: true # Cilium uses eBPF
write-kubeconfig-mode: "644"
cluster-cidr: "{% raw %}{{ cluster_cidr }}{% endraw %}"
service-cidr: "{% raw %}{{ service_cidr }}{% endraw %}"
etcd-expose-metrics: true # Required to monitor etcd with kube-prometheus-stack
kube-controller-manager-arg:
- "bind-address=0.0.0.0" # Required to monitor kube-controller-manager with kube-prometheus-stack
kube-scheduler-arg:
- "bind-address=0.0.0.0" # Required to monitor kube-scheduler with kube-prometheus-stack
kube-apiserver-arg:
- "anonymous-auth=true" # Required for HAProxy health-checks
@@ -0,0 +1,7 @@
---
# https://rancher.com/docs/k3s/latest/en/installation/install-options/agent-config/
# https://github.com/PyratLabs/ansible-role-k3s
k3s_control_node: false
k3s_agent:
node-ip: "{% raw %}{{ ansible_host }}{% endraw %}"