Jsonnify Drone

Jack Jackson 3 weeks ago
parent b856fd2bc5
commit fcf309e5cc
  1. 36
      app-of-apps/app-definitions.libsonnet
  2. 3
      app-of-apps/drone.jsonnet

@ -35,6 +35,42 @@
syncOptions: ["CreateNamespace=true"]
}
}
},
localApplication(
name,
path="",
namespace="") ::
{
apiVersion: "argoproj.io/v1alpha1",
kind: "Application",
metadata: {
name: name,
namespace: "argo",
finalizers: ["resources-finalizer.argocd.argoproj.io"]
},
spec: {
project: "default",
source: {
repoURL: "https://gitea.scubbo.org/scubbo/helm-charts.git",
targetRevision: "HEAD",
path: if path == "" then std.join('/', ['charts', name]) else path,
// I _think_ every locally-defined chart is going to have a `values.yaml`, but we can make this
// parameterized if desired
helm: {
valueFiles: ['values.yaml']
}
},
destination: {
server: 'https://kubernetes.default.svc',
namespace: if namespace == "" then name else namespace
},
syncPolicy: {
automated: {
prune: true
},
syncOptions: ["CreateNamespace=true"]
}
}
}
}

@ -0,0 +1,3 @@
local appDef = import './app-definitions.libsonnet';
appDef.localApplication(name="drone")
Loading…
Cancel
Save