kustomize

This commit is contained in:
Danijel Simeunovic
2026-02-08 16:01:53 +01:00
parent 3e943b5405
commit 7f2b904669
2 changed files with 56 additions and 39 deletions

View File

@@ -1,29 +1,22 @@
apiVersion: argoproj.io/v1alpha1 apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet kind: Application
metadata: metadata:
name: infrastructure-apps name: infrastructure-app-of-apps
namespace: argocd namespace: argocd
spec:
goTemplate: true
generators:
- git:
repoURL: https://github.com/snothub/sturdy-adventure.git
revision: HEAD
directories:
- path: argocd/infra/*.yaml
template:
metadata:
name: "{{ .path.basenameNormalized }}"
labels: labels:
app.kubernetes.io/name: "{{ .path.basenameNormalized }}" app.kubernetes.io/name: infrastructure-app-of-apps
app.kubernetes.io/part-of: platform app.kubernetes.io/part-of: platform
app.kubernetes.io/managed-by: argocd app.kubernetes.io/managed-by: argocd
annotations:
argocd.argoproj.io/sync-wave: "-1"
spec: spec:
project: default project: default
source: source:
repoURL: https://github.com/snothub/sturdy-adventure.git repoURL: https://github.com/fortedigital/sturdy-adventure.git
targetRevision: HEAD targetRevision: HEAD
path: "{{ .path.dir }}" path: argocd
kustomize:
enable: true
destination: destination:
server: https://kubernetes.default.svc server: https://kubernetes.default.svc
namespace: argocd namespace: argocd
@@ -35,6 +28,7 @@ spec:
- CreateNamespace=true - CreateNamespace=true
- Validate=true - Validate=true
- ServerSideApply=true - ServerSideApply=true
timeout: 300s
retry: retry:
limit: 5 limit: 5
backoff: backoff:

23
argocd/kustomization.yaml Normal file
View File

@@ -0,0 +1,23 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
metadata:
name: infrastructure
# Include all infrastructure Application manifests as-is (no templating or modification)
resources:
# Platform components
- infra/traefik-application.yaml
- infra/cert-manager-application.yaml
- infra/cluster-resources-application.yaml
- infra/kyverno.yaml
- infra/sealedsecrets.yaml
- infra/trivy.yaml
# Monitoring stack
- infra/prometheus.yaml
- infra/grafana.yaml
- infra/loki.yaml
- infra/fluent-bit.yaml
# Business applications (currently empty, will auto-include any YAML files added)
- apps/