refactor(manifests): move _templates into manifests path
This commit is contained in:
parent
3d1e3d3ae7
commit
72f4403752
6 changed files with 5 additions and 5 deletions
|
@ -1,79 +0,0 @@
|
|||
{
|
||||
# generic parameters
|
||||
name:: $.chart,
|
||||
namespace:: $.name,
|
||||
|
||||
syncOptions:: ["CreateNamespace=true"],
|
||||
retryLimit:: 5,
|
||||
sync_wave:: 0,
|
||||
|
||||
# source parameters
|
||||
repo:: error "repository must be defined",
|
||||
version:: error "version must be defined",
|
||||
|
||||
# helm chart parameters
|
||||
chart:: "",
|
||||
skipCrds:: false,
|
||||
values:: "",
|
||||
|
||||
# directory parameters
|
||||
path:: "",
|
||||
recursive:: true,
|
||||
|
||||
|
||||
apiVersion: "argoproj.io/v1alpha1",
|
||||
kind: "Application",
|
||||
metadata: {
|
||||
name: $.name,
|
||||
namespace: "argocd",
|
||||
annotations: { "argocd.argoproj.io/sync-wave": std.toString($.sync_wave) },
|
||||
finalizers: ["resources-finalizer.argocd.argoproj.io"],
|
||||
},
|
||||
spec: {
|
||||
project: "baseline",
|
||||
destination: {
|
||||
server: "https://kubernetes.default.svc",
|
||||
namespace: $.namespace,
|
||||
},
|
||||
source: {
|
||||
repoURL: $.repo,
|
||||
targetRevision: $.version,
|
||||
},
|
||||
syncPolicy: {
|
||||
automated: {
|
||||
selfHeal: true,
|
||||
prune: true,
|
||||
},
|
||||
retry: {
|
||||
limit: $.retryLimit,
|
||||
backoff: {
|
||||
duration: "5s",
|
||||
factor: 2,
|
||||
maxDuration: "5m",
|
||||
},
|
||||
},
|
||||
syncOptions: $.syncOptions,
|
||||
}
|
||||
}
|
||||
|
||||
+ ( # append chart name if defined
|
||||
if std.length($.chart) > 0 then
|
||||
{ source+: { chart: $.chart, } } else {}
|
||||
)
|
||||
|
||||
+ ( # set helm values
|
||||
if std.length($.values) > 0 then
|
||||
{ source+: { helm+: { values: $.values } } } else {}
|
||||
)
|
||||
|
||||
+ ( # set skipCRDs if defined
|
||||
if $.skipCrds then
|
||||
{ source+: { helm+: { skipCrds: true } } } else {}
|
||||
)
|
||||
|
||||
+ ( # append generic directory path and recurse option
|
||||
if std.length($.path) > 0 then
|
||||
{ source+: { path: $.path, directory: { recurse: $.recursive } } } else {}
|
||||
)
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue