add multi envs app
This commit is contained in:
parent
bc0e97dfbe
commit
5de0f3e738
@ -1,29 +1,29 @@
|
||||
# file: applicationsets/envs-appset.yaml in app-definition.git (optional location)
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: ApplicationSet
|
||||
metadata:
|
||||
name: net-envs-appset
|
||||
name: envs-appset
|
||||
namespace: argocd
|
||||
spec:
|
||||
generators:
|
||||
- git:
|
||||
repoURL: https://git.dvirlabs.com/app-definition.git
|
||||
repoURL: https://git.dvirlabs.com/dvirlabs/app-definition.git
|
||||
revision: HEAD
|
||||
files:
|
||||
- path: net-envs/*/metadata.yaml
|
||||
- path: env-sets/*/metadata.yaml
|
||||
extract:
|
||||
env: '{{.env}}'
|
||||
project: '{{.project}}'
|
||||
namespace: '{{.namespace}}'
|
||||
project: '{{.project}}'
|
||||
template:
|
||||
metadata:
|
||||
name: net-env-{{env}}
|
||||
name: env-{{env}}
|
||||
spec:
|
||||
project: '{{project}}'
|
||||
source:
|
||||
repoURL: https://git.dvirlabs.com/app-definition.git
|
||||
path: env-sets
|
||||
directory:
|
||||
recurse: true
|
||||
repoURL: https://git.dvirlabs.com/dvirlabs/app-definition.git
|
||||
targetRevision: HEAD
|
||||
path: env-sets/{{env}}
|
||||
destination:
|
||||
server: https://kubernetes.default.svc
|
||||
namespace: '{{namespace}}'
|
||||
|
||||
@ -1,15 +1,15 @@
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: ApplicationSet
|
||||
metadata:
|
||||
name: dev-ms-apps
|
||||
name: dev-microservices
|
||||
namespace: argocd
|
||||
spec:
|
||||
generators:
|
||||
- git:
|
||||
repoURL: https://github.com/your-org/apps-config.git
|
||||
repoURL: https://git.dvirlabs.com/dvirlabs/app-definition.git
|
||||
revision: HEAD
|
||||
files:
|
||||
- path: net-envs/dev/*.yaml
|
||||
- path: env-sets/dev/services/*.yaml
|
||||
template:
|
||||
metadata:
|
||||
name: dev-{{basenameNormalized}}
|
||||
@ -18,10 +18,10 @@ spec:
|
||||
source:
|
||||
repoURL: https://git.dvirlabs.com/dvirlabs/app-provision.git
|
||||
targetRevision: HEAD
|
||||
chart: charts/nginx-message
|
||||
chart: ngnix-message
|
||||
helm:
|
||||
valueFiles:
|
||||
- env-sets/dev/values.yaml
|
||||
- env-sets/dev/services/{{path.basename}}
|
||||
destination:
|
||||
server: https://kubernetes.default.svc
|
||||
namespace: dev
|
||||
|
||||
@ -0,0 +1,3 @@
|
||||
env: dev
|
||||
namespace: dev
|
||||
project: sandbox
|
||||
0
env-sets/dev/services/svc-1.yaml
Normal file
0
env-sets/dev/services/svc-1.yaml
Normal file
0
env-sets/dev/services/svc-2.yaml
Normal file
0
env-sets/dev/services/svc-2.yaml
Normal file
@ -0,0 +1,31 @@
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: ApplicationSet
|
||||
metadata:
|
||||
name: int-microservices
|
||||
namespace: argocd
|
||||
spec:
|
||||
generators:
|
||||
- git:
|
||||
repoURL: https://git.dvirlabs.com/dvirlabs/app-definition.git
|
||||
revision: HEAD
|
||||
files:
|
||||
- path: env-sets/int/services/*.yaml
|
||||
template:
|
||||
metadata:
|
||||
name: int-{{basenameNormalized}}
|
||||
spec:
|
||||
project: default
|
||||
source:
|
||||
repoURL: https://git.dvirlabs.com/dvirlabs/app-provision.git
|
||||
targetRevision: HEAD
|
||||
chart: ngnix-message
|
||||
helm:
|
||||
valueFiles:
|
||||
- env-sets/int/services/{{path.basename}}
|
||||
destination:
|
||||
server: https://kubernetes.default.svc
|
||||
namespace: int
|
||||
syncPolicy:
|
||||
automated:
|
||||
selfHeal: true
|
||||
prune: true
|
||||
@ -0,0 +1,3 @@
|
||||
env: int
|
||||
namespace: int
|
||||
project: sandbox
|
||||
0
env-sets/int/services/svc-1.yaml
Normal file
0
env-sets/int/services/svc-1.yaml
Normal file
0
env-sets/int/services/svc-2.yaml
Normal file
0
env-sets/int/services/svc-2.yaml
Normal file
@ -0,0 +1,31 @@
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: ApplicationSet
|
||||
metadata:
|
||||
name: prod-microservices
|
||||
namespace: argocd
|
||||
spec:
|
||||
generators:
|
||||
- git:
|
||||
repoURL: https://git.dvirlabs.com/dvirlabs/app-definition.git
|
||||
revision: HEAD
|
||||
files:
|
||||
- path: env-sets/prod/services/*.yaml
|
||||
template:
|
||||
metadata:
|
||||
name: prod-{{basenameNormalized}}
|
||||
spec:
|
||||
project: default
|
||||
source:
|
||||
repoURL: https://git.dvirlabs.com/dvirlabs/app-provision.git
|
||||
targetRevision: HEAD
|
||||
chart: ngnix-message
|
||||
helm:
|
||||
valueFiles:
|
||||
- env-sets/prod/services/{{path.basename}}
|
||||
destination:
|
||||
server: https://kubernetes.default.svc
|
||||
namespace: prod
|
||||
syncPolicy:
|
||||
automated:
|
||||
selfHeal: true
|
||||
prune: true
|
||||
@ -0,0 +1,3 @@
|
||||
env: prod
|
||||
namespace: prod
|
||||
project: sandbox
|
||||
0
env-sets/prod/services/svc-1.yaml
Normal file
0
env-sets/prod/services/svc-1.yaml
Normal file
0
env-sets/prod/services/svc-2.yaml
Normal file
0
env-sets/prod/services/svc-2.yaml
Normal file
Loading…
x
Reference in New Issue
Block a user