Migrate blog to a) -deployment repo, b) jsonnet-format definition
This commit is contained in:
parent
5e08c653a3
commit
fb7e8cd98e
@ -72,6 +72,38 @@
|
|||||||
syncOptions: ["CreateNamespace=true"]
|
syncOptions: ["CreateNamespace=true"]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
kustomizeApplication(
|
||||||
|
name,
|
||||||
|
repoUrl="",
|
||||||
|
namespace="",
|
||||||
|
path="") ::
|
||||||
|
{
|
||||||
|
apiVersion: "argoproj.io/v1alpha1",
|
||||||
|
kind: "Application",
|
||||||
|
metadata: {
|
||||||
|
name: name,
|
||||||
|
namespace: "argo",
|
||||||
|
finalizers: ["resources-finalizer.argocd.argoproj.io"]
|
||||||
|
},
|
||||||
|
spec: {
|
||||||
|
project: "default",
|
||||||
|
source: {
|
||||||
|
repoURL: if repoUrl=="" then std.join('', ['https://gitea.scubbo.org/scubbo/', name, '-deployment']) else repoUrl,
|
||||||
|
targetRevision: "HEAD",
|
||||||
|
path: if path == "" then "." else path
|
||||||
|
},
|
||||||
|
destination: {
|
||||||
|
server: 'https://kubernetes.default.svc',
|
||||||
|
namespace: if namespace == "" then name else namespace
|
||||||
|
},
|
||||||
|
syncPolicy: {
|
||||||
|
automated: {
|
||||||
|
prune: true
|
||||||
|
},
|
||||||
|
syncOptions: ["CreateNamespace=true"]
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -364,36 +364,3 @@ spec:
|
|||||||
prune: true
|
prune: true
|
||||||
syncOptions:
|
syncOptions:
|
||||||
- CreateNamespace=true
|
- CreateNamespace=true
|
||||||
---
|
|
||||||
apiVersion: argoproj.io/v1alpha1
|
|
||||||
kind: Application
|
|
||||||
metadata:
|
|
||||||
name: blog
|
|
||||||
namespace: argo
|
|
||||||
finalizers:
|
|
||||||
- resources-finalizer.argocd.argoproj.io
|
|
||||||
spec:
|
|
||||||
project: default
|
|
||||||
|
|
||||||
source:
|
|
||||||
repoURL: https://gitea.scubbo.org/scubbo/blog-infrastructure.git
|
|
||||||
targetRevision: HEAD
|
|
||||||
path: helm
|
|
||||||
|
|
||||||
helm:
|
|
||||||
valueFiles:
|
|
||||||
- values.yaml
|
|
||||||
|
|
||||||
parameters:
|
|
||||||
- name: targetEnv
|
|
||||||
value: prod
|
|
||||||
|
|
||||||
destination:
|
|
||||||
server: "https://kubernetes.default.svc"
|
|
||||||
namespace: blog
|
|
||||||
|
|
||||||
syncPolicy:
|
|
||||||
automated:
|
|
||||||
prune: true
|
|
||||||
syncOptions:
|
|
||||||
- CreateNamespace=true
|
|
||||||
|
5
app-of-apps/blog.jsonnet
Normal file
5
app-of-apps/blog.jsonnet
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
local appDef = import './app-definitions.libsonnet';
|
||||||
|
|
||||||
|
[
|
||||||
|
appDef.kustomizeApplication(name="blog")
|
||||||
|
]
|
Loading…
x
Reference in New Issue
Block a user