9 changed files with 131 additions and 0 deletions
@ -0,0 +1,38 @@ |
|||||
|
|
||||
|
apiVersion: argoproj.io/v1alpha1 |
||||
|
kind: ApplicationSet |
||||
|
metadata: |
||||
|
name: test-appset |
||||
|
namespace: argocd |
||||
|
spec: |
||||
|
generators: |
||||
|
- list: |
||||
|
elements: |
||||
|
# v0.2.0+ form - does not require cluster/URL keys (but are still supported) |
||||
|
- overlay: qa |
||||
|
gitRepo: git@github.com:evercas-chris/argocd-example-apps.git |
||||
|
appPath: overlays |
||||
|
appBranch: master |
||||
|
cluster: test2 |
||||
|
url: https://kubernetes.default.svc |
||||
|
- overlay: stage |
||||
|
gitRepo: git@github.com:evercast-chris/argocd-example-apps.git |
||||
|
appPath: overlays |
||||
|
appBranch: master |
||||
|
cluster: test1 |
||||
|
url: https://kubernetes.default.svc |
||||
|
template: |
||||
|
metadata: |
||||
|
name: 'demo-{{cluster}}' |
||||
|
spec: |
||||
|
project: default |
||||
|
syncPolicy: |
||||
|
automated: |
||||
|
prune: true |
||||
|
selfHeal: true |
||||
|
source: |
||||
|
repoURL: '{{gitRepo}}' |
||||
|
targetRevision: '{{appBranch}}' |
||||
|
path: '{{appPath}}/{{overlay}}' |
||||
|
destination: |
||||
|
server: '{{url}}' |
@ -0,0 +1,17 @@ |
|||||
|
apiVersion: argoproj.io/v1alpha1 |
||||
|
kind: Application |
||||
|
metadata: |
||||
|
name: applicationset |
||||
|
namespace: argocd |
||||
|
spec: |
||||
|
project: default |
||||
|
syncPolicy: |
||||
|
automated: |
||||
|
prune: true |
||||
|
selfHeal: true |
||||
|
source: |
||||
|
repoURL: git@github.com:evercast-chris/argocd-example-apps.git |
||||
|
targetRevision: master |
||||
|
path: applicationsets |
||||
|
destination: |
||||
|
server: https://kubernetes.default.svc |
@ -0,0 +1,6 @@ |
|||||
|
apiVersion: kustomize.config.k8s.io/v1beta1 |
||||
|
kind: Kustomization |
||||
|
|
||||
|
resources: |
||||
|
- nginx-deployment.yaml |
||||
|
- nginx-svc.yaml |
@ -0,0 +1,20 @@ |
|||||
|
apiVersion: apps/v1 |
||||
|
kind: Deployment |
||||
|
metadata: |
||||
|
labels: |
||||
|
app: nginx |
||||
|
name: nginx |
||||
|
spec: |
||||
|
replicas: 3 |
||||
|
selector: |
||||
|
matchLabels: |
||||
|
app: nginx |
||||
|
template: |
||||
|
metadata: |
||||
|
labels: |
||||
|
app: nginx |
||||
|
spec: |
||||
|
containers: |
||||
|
- image: nginx |
||||
|
name: nginx |
||||
|
|
@ -0,0 +1,14 @@ |
|||||
|
apiVersion: v1 |
||||
|
kind: Service |
||||
|
metadata: |
||||
|
labels: |
||||
|
app: nginx |
||||
|
name: nginx |
||||
|
spec: |
||||
|
ports: |
||||
|
- port: 80 |
||||
|
protocol: TCP |
||||
|
targetPort: 80 |
||||
|
selector: |
||||
|
app: nginx |
||||
|
type: ClusterIP |
@ -0,0 +1,13 @@ |
|||||
|
apiVersion: kustomize.config.k8s.io/v1beta1 |
||||
|
kind: Kustomization |
||||
|
|
||||
|
bases: |
||||
|
- ../../base |
||||
|
|
||||
|
namespace: nginx-qa |
||||
|
|
||||
|
resources: |
||||
|
- nginx-namespace.yaml |
||||
|
|
||||
|
commonLabels: |
||||
|
env: qa |
@ -0,0 +1,4 @@ |
|||||
|
apiVersion: v1 |
||||
|
kind: Namespace |
||||
|
metadata: |
||||
|
name: nginx-qa |
@ -0,0 +1,14 @@ |
|||||
|
apiVersion: kustomize.config.k8s.io/v1beta1 |
||||
|
kind: Kustomization |
||||
|
|
||||
|
bases: |
||||
|
- ../../base |
||||
|
|
||||
|
namespace: nginx-stage |
||||
|
|
||||
|
resources: |
||||
|
- nginx-namespace.yaml |
||||
|
|
||||
|
commonLabels: |
||||
|
env: stage |
||||
|
|
@ -0,0 +1,5 @@ |
|||||
|
apiVersion: v1 |
||||
|
kind: Namespace |
||||
|
metadata: |
||||
|
name: nginx-stage |
||||
|
|
Loading…
Reference in new issue