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:
Devin Buhl authored and GitHub committed 2024-01-24 14:52:50 -05:00
1 parent 9d175fcc99
commit 5d849727d8
112 files changed
+81 -184

No files matched your search

@@ -0,0 +1 @@
main = lambda data: data.get("bootstrap_distribution") in ['k0s', 'k3s'] and data.get("addon_longhorn", {}).get("enabled", False) == True
@@ -1,8 +1,6 @@
#% if bootstrap_distribution in ['k0s', 'k3s'] and addon_longhorn.enabled %#
---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ./namespace.yaml
- ./longhorn/ks.yaml
#% endif %#
@@ -1,4 +1,3 @@
#% if bootstrap_distribution in ['k0s', 'k3s'] and addon_longhorn.enabled %#
---
apiVersion: helm.toolkit.fluxcd.io/v2beta2
kind: HelmRelease
@@ -45,4 +44,3 @@ spec:
ingressClassName: internal
host: longhorn.${SECRET_DOMAIN}
tls: true
#% endif %#
@@ -1,8 +1,6 @@
#% if bootstrap_distribution in ['k0s', 'k3s'] and addon_longhorn.enabled %#
---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ./helmrelease.yaml
- ./snapshot.yaml
#% endif %#
@@ -1,4 +1,3 @@
#% if bootstrap_distribution in ['k0s', 'k3s'] and addon_longhorn.enabled %#
---
apiVersion: storage.k8s.io/v1
kind: StorageClass
@@ -13,4 +12,3 @@ allowVolumeExpansion: true
volumeBindingMode: Immediate
metadata:
name: longhorn-snapshot
#% endif %#
@@ -1,4 +1,3 @@
#% if bootstrap_distribution in ['k0s', 'k3s'] and addon_longhorn.enabled %#
---
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
@@ -19,4 +18,3 @@ spec:
interval: 30m
retryInterval: 1m
timeout: 5m
#% endif %#
@@ -1,4 +1,3 @@
#% if bootstrap_distribution in ['k0s', 'k3s'] and addon_longhorn.enabled %#
---
apiVersion: v1
kind: Namespace
@@ -6,4 +5,3 @@ metadata:
name: longhorn-system
labels:
kustomize.toolkit.fluxcd.io/prune: disabled
#% endif %#