refactor!: project updates (#1326)

* refactor!: flux is required again

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

* fix: delimiter that chomps

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

* fix: bootstrap_cloudflare logic

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

* fix: update tests

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

* fix: remove last quote

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

* chore: update readme

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-02-15 20:03:24 -05:00
1 parent 04ff4ef994
commit c17d543b21
93 files changed
+591 -755

No files matched your search

@@ -1 +0,0 @@
main = lambda data: data.get("flux", {}).get("enabled", False) == True
@@ -6,13 +6,13 @@ metadata:
namespace: flux-system
spec:
interval: 30m
url: "{{ flux.github.address }}"
{% if flux.github.private.enabled %}
url: "#{ bootstrap_github_address }#"
#% if bootstrap_github_private_key %#
secretRef:
name: github-deploy-key
{% endif %}
#% endif %#
ref:
branch: "{{ flux.github.branch|default('main', true) }}"
branch: "#{ bootstrap_github_branch|default('main', true) }#"
ignore: |
# exclude all
/*
@@ -1,4 +1,4 @@
{% if cloudflare.enabled %}
#% if bootstrap_cloudflare.enabled %#
---
apiVersion: source.toolkit.fluxcd.io/v1beta2
kind: HelmRepository
@@ -8,4 +8,4 @@ metadata:
spec:
interval: 1h
url: https://kubernetes-sigs.github.io/external-dns
{% endif %}
#% endif %#
@@ -1,4 +1,4 @@
{% if cloudflare.enabled %}
#% if bootstrap_cloudflare.enabled %#
---
apiVersion: source.toolkit.fluxcd.io/v1beta2
kind: HelmRepository
@@ -8,4 +8,4 @@ metadata:
spec:
interval: 1h
url: https://kubernetes.github.io/ingress-nginx
{% endif %}
#% endif %#
@@ -1,4 +1,4 @@
{% if cloudflare.enabled %}
#% if bootstrap_cloudflare.enabled %#
---
apiVersion: source.toolkit.fluxcd.io/v1beta2
kind: HelmRepository
@@ -8,4 +8,4 @@ metadata:
spec:
interval: 1h
url: https://ori-edge.github.io/k8s_gateway
{% endif %}
#% endif %#
@@ -4,18 +4,18 @@ kind: Kustomization
resources:
- ./bjw-s.yaml
- ./cilium.yaml
{% if cloudflare.enabled %}
#% if bootstrap_cloudflare.enabled %#
- ./external-dns.yaml
- ./ingress-nginx.yaml
- ./k8s-gateway.yaml
{% endif %}
#% endif %#
- ./jetstack.yaml
- ./metrics-server.yaml
- ./openebs.yaml
{% if distribution.type in ["talos"] %}
#% if bootstrap_distribution in ["talos"] %#
- ./postfinance.yaml
{% endif %}
#% endif %#
- ./stakater.yaml
{% if distribution.type in ["talos"] %}
#% if bootstrap_distribution in ["talos"] %#
- ./xenitab.yaml
{% endif %}
#% endif %#
@@ -1,4 +1,4 @@
{% if distribution.type in ["talos"] %}
#% if bootstrap_distribution in ["talos"] %#
---
apiVersion: source.toolkit.fluxcd.io/v1beta2
kind: HelmRepository
@@ -8,4 +8,4 @@ metadata:
spec:
interval: 1h
url: https://postfinance.github.io/kubelet-csr-approver
{% endif %}
#% endif %#
@@ -1,4 +1,4 @@
{% if distribution.type in ["talos"] %}
#% if bootstrap_distribution in ["talos"] %#
---
apiVersion: source.toolkit.fluxcd.io/v1beta2
kind: HelmRepository
@@ -9,4 +9,4 @@ spec:
type: oci
interval: 5m
url: oci://ghcr.io/xenitab/helm-charts
{% endif %}
#% endif %#
@@ -6,8 +6,8 @@ metadata:
namespace: flux-system
stringData:
SECRET_EXAMPLE: Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit...
{% if cloudflare.enabled %}
SECRET_DOMAIN: "{{ cloudflare.domain }}"
SECRET_ACME_EMAIL: "{{ cloudflare.acme.email }}"
SECRET_CLOUDFLARE_TUNNEL_ID: "{{ cloudflare.tunnel.id }}"
{% endif %}
#% if bootstrap_cloudflare.enabled %#
SECRET_DOMAIN: "#{ bootstrap_cloudflare.domain }#"
SECRET_ACME_EMAIL: "#{ bootstrap_cloudflare.acme.email }#"
SECRET_CLOUDFLARE_TUNNEL_ID: "#{ bootstrap_cloudflare.tunnel.id }#"
#% endif %#
@@ -5,12 +5,12 @@ metadata:
name: cluster-settings
namespace: flux-system
data:
TIMEZONE: "{{ timezone }}"
CLUSTER_CIDR: "{{ cluster.pod_network.split(',')[0] }}"
NODE_CIDR: "{{ nodes.host_network }}"
{% if feature_gates.dual_stack_ipv4_first %}
CLUSTER_CIDR_V6: "{{ cluster.pod_network.split(',')[1] }}"
{% endif %}
{% if distribution.talos.bgp.enabled %}
LOADBALANCER_CIDR: "{{ distribution.talos.bgp.loadbalancer_network }}"
{% endif %}
TIMEZONE: "#{ bootstrap_timezone }#"
CLUSTER_CIDR: "#{ bootstrap_pod_network.split(',')[0] }#"
NODE_CIDR: "#{ bootstrap_node_network }#"
#% if bootstrap_feature_gates.dual_stack_ipv4_first %#
CLUSTER_CIDR_V6: "#{ bootstrap_pod_network.split(',')[1] }#"
#% endif %#
#% if bootstrap_bgp.enabled %#
BGP_ADVERTISED_CIDR: "#{ bootstrap_bgp.advertised_network }#"
#% endif %#