diff --git a/app-of-apps/Chart.yaml b/app-of-apps/Chart.yaml deleted file mode 100644 index fd6c6fd..0000000 --- a/app-of-apps/Chart.yaml +++ /dev/null @@ -1,7 +0,0 @@ -apiVersion: v2 -name: jackjack-app-of-apps -description: App-of-apps for deployment to Homelab - -type: application -version: 0.1.0 -appVersion: "0.1.0" diff --git a/app-of-apps/app-definitions.libsonnet b/app-of-apps/app-definitions.libsonnet new file mode 100644 index 0000000..badef80 --- /dev/null +++ b/app-of-apps/app-definitions.libsonnet @@ -0,0 +1,35 @@ +{ + helmApplication( + name, + sourceRepoUrl, + sourceChart, + sourceTargetRevision, + namespace="") :: + { + apiVersion: "argoproj.io/v1alpha1", + kind: "Application", + metadata: { + name: name, + namespace: "argo", + finalizers: ["resources-finalizer.argocd.argoproj.io"] + }, + spec: { + project: "default", + source: { + chart: sourceChart, + repoURL: sourceRepoUrl, + targetRevision: sourceTargetRevision + }, + destination: { + server: "https://kubernetes.default.svc", + namespace: if namespace == "" then name else namespace + }, + syncPolicy: { + automated: { + prune: true + }, + syncOptions: ["CreateNamespace=true"] + } + } + } +} diff --git a/app-of-apps/templates/apps.yaml b/app-of-apps/apps.yaml similarity index 100% rename from app-of-apps/templates/apps.yaml rename to app-of-apps/apps.yaml diff --git a/app-of-apps/crossplane.jsonnet b/app-of-apps/crossplane.jsonnet new file mode 100644 index 0000000..8d26534 --- /dev/null +++ b/app-of-apps/crossplane.jsonnet @@ -0,0 +1,10 @@ +// https://docs.crossplane.io/v1.15/software/install/#installed-deployments +local appDef = import './app-definitions.libsonnet'; + +appDef.helmApplication( + name="crossplane", + sourceRepoUrl="https://charts.crossplane.io/stable", + sourceChart="crossplane", + sourceTargetRevision="1.15.0", + namespace="crossplane-system" +) diff --git a/app-of-apps/templates/open-project.yaml b/app-of-apps/open-project.yaml similarity index 100% rename from app-of-apps/templates/open-project.yaml rename to app-of-apps/open-project.yaml