homelab/k8s/clusters/dolo/infrastructure.yaml

64 lines
1.6 KiB
YAML

---
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: infrastructure-01
namespace: flux-system
spec:
interval: 1h
retryInterval: 30s
timeout: 5m
sourceRef:
kind: GitRepository
name: flux-system
path: ./k8s/infrastructure/01
wait: true
prune: true
---
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: infrastructure-02
namespace: flux-system
spec:
interval: 1h
retryInterval: 30s
timeout: 5m
sourceRef:
kind: GitRepository
name: flux-system
path: ./k8s/infrastructure/02
wait: true
prune: true
dependsOn:
- name: infrastructure-01
---
# What I want is one single unit that the rest of my applications relying on
# general infrastructure stuff can use `dependsOn` for by creating a single
# logical unit around the infrastructure kustomizations. I'm not sure how
# to do this other than creating a dummy Kustomization that doesn't actually
# apply anything meaningful, but just depends on everything else on this file.
# Maybe [components](https://fluxcd.io/flux/components/kustomize/kustomizations/#components)
# would help with this, but I'm not sure how it works and there's currently a
# warning that this feature is experimental and might change soon.
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: infrastructure
namespace: flux-system
spec:
interval: 1h
retryInterval: 10s
timeout: 5m
sourceRef:
kind: GitRepository
name: flux-system
path: ./k8s/infrastructure/dummy
wait: true
prune: false
dependsOn:
- name: infrastructure-01
- name: infrastructure-02