
Need to remove `Chart.yaml` so that Argo doesn't try to treat `app-of-apps/` as a Helm application (because that would stop it from using Jsonnet parsing).
36 lines
945 B
Jsonnet
36 lines
945 B
Jsonnet
{
|
|
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"]
|
|
}
|
|
}
|
|
}
|
|
}
|