add root app and appset for k3s-cluster
This commit is contained in:
39
appsets/k3s-cluster-appset.yaml
Normal file
39
appsets/k3s-cluster-appset.yaml
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
apiVersion: argoproj.io/v1alpha1
|
||||||
|
kind: ApplicationSet
|
||||||
|
metadata:
|
||||||
|
name: k3s-cluster-appset
|
||||||
|
namespace: argocd
|
||||||
|
spec:
|
||||||
|
goTemplate: true
|
||||||
|
goTemplateOptions: ["missingkey=error"]
|
||||||
|
generators:
|
||||||
|
- git:
|
||||||
|
repoURL: https://github.com/3dwardch3ng/home-cluster-ops.git
|
||||||
|
revision: HEAD
|
||||||
|
directories:
|
||||||
|
- path: apps/*/envs/k3s-cluster
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
name: '{{index .path.segments 1}}-{{index .path.segments 3}}'
|
||||||
|
spec:
|
||||||
|
# The project the application belongs to.
|
||||||
|
project: k3s-cluster-ops
|
||||||
|
|
||||||
|
# Source of the application manifests
|
||||||
|
source:
|
||||||
|
repoURL: https://github.com/3dwardch3ng/home-cluster-ops.git
|
||||||
|
targetRevision: HEAD
|
||||||
|
path: '{{.path.path}}'
|
||||||
|
|
||||||
|
# Destination cluster and namespace to deploy the application
|
||||||
|
destination:
|
||||||
|
server: https://kubernetes.default.svc
|
||||||
|
namespace: '{{index .path.segments 1}}-{{index .path.segments 3}}'
|
||||||
|
|
||||||
|
# Sync policy
|
||||||
|
syncPolicy:
|
||||||
|
syncOptions:
|
||||||
|
- CreateNamespace=true
|
||||||
|
automated: # automated sync by default retries failed attempts 5 times with following delays between attempts ( 5s, 10s, 20s, 40s, 80s ); retry controlled using `retry` field.
|
||||||
|
prune: true # Specifies if resources should be pruned during auto-syncing ( false by default ).
|
||||||
|
selfHeal: true # Specifies if partial app sync should be executed when resources are changed only in target Kubernetes cluster and no git change detected ( false by default ).
|
||||||
20
root-argocd-app.yaml
Normal file
20
root-argocd-app.yaml
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
apiVersion: argoproj.io/v1alpha1
|
||||||
|
kind: Application
|
||||||
|
metadata:
|
||||||
|
name: all-apps
|
||||||
|
namespace: argocd
|
||||||
|
spec:
|
||||||
|
project: home-cluster-ops
|
||||||
|
source:
|
||||||
|
repoURL: https://github.com/3dwardch3ng/home-cluster-ops.git
|
||||||
|
targetRevision: HEAD
|
||||||
|
path: appsets
|
||||||
|
destination:
|
||||||
|
server: https://kubernetes.default.svc
|
||||||
|
namespace: argocd
|
||||||
|
syncPolicy:
|
||||||
|
syncOptions:
|
||||||
|
- CreateNamespace=true
|
||||||
|
automated:
|
||||||
|
prune: true
|
||||||
|
selfHeal: true
|
||||||
Reference in New Issue
Block a user