forked from DevFW-CICD/stacks
Added second kindcluster creation and deployment demo
This commit is contained in:
parent
6eb4993863
commit
e89c869d4e
5 changed files with 115 additions and 0 deletions
22
kind/registry/second-cluster.yaml
Normal file
22
kind/registry/second-cluster.yaml
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
apiVersion: argoproj.io/v1alpha1
|
||||||
|
kind: Application
|
||||||
|
metadata:
|
||||||
|
name: second-cluster
|
||||||
|
namespace: argocd
|
||||||
|
labels:
|
||||||
|
env: dev
|
||||||
|
spec:
|
||||||
|
destination:
|
||||||
|
name: in-cluster
|
||||||
|
namespace: argocd
|
||||||
|
source:
|
||||||
|
path: stacks/second-cluster
|
||||||
|
repoURL: 'https://gitea.cnoe.localtest.me/giteaAdmin/edfbuilder-shoot'
|
||||||
|
targetRevision: HEAD
|
||||||
|
project: default
|
||||||
|
syncPolicy:
|
||||||
|
automated:
|
||||||
|
prune: true
|
||||||
|
selfHeal: true
|
||||||
|
syncOptions:
|
||||||
|
- CreateNamespace=true
|
23
kind/stacks/second-cluster/create-new-cluster-guestbook.yaml
Normal file
23
kind/stacks/second-cluster/create-new-cluster-guestbook.yaml
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
apiVersion: argoproj.io/v1alpha1
|
||||||
|
kind: Application
|
||||||
|
metadata:
|
||||||
|
name: create-new-cluster-guestbook
|
||||||
|
namespace: argocd
|
||||||
|
labels:
|
||||||
|
env: dev
|
||||||
|
finalizers:
|
||||||
|
- resources-finalizer.argocd.argoproj.io
|
||||||
|
spec:
|
||||||
|
project: default
|
||||||
|
syncPolicy:
|
||||||
|
automated:
|
||||||
|
selfHeal: true
|
||||||
|
syncOptions:
|
||||||
|
- CreateNamespace=true
|
||||||
|
destination:
|
||||||
|
name: in-cluster
|
||||||
|
namespace: crossplane-system
|
||||||
|
source:
|
||||||
|
path: stacks/second-cluster/create-new-cluster-guestbook
|
||||||
|
repoURL: https://gitea.cnoe.localtest.me/giteaAdmin/edfbuilder-shoot.git
|
||||||
|
targetRevision: HEAD
|
|
@ -0,0 +1,18 @@
|
||||||
|
apiVersion: cluster.argocd.crossplane.io/v1alpha1
|
||||||
|
kind: Cluster
|
||||||
|
metadata:
|
||||||
|
name: argo-app-test
|
||||||
|
labels:
|
||||||
|
purpose: dev
|
||||||
|
annotations:
|
||||||
|
argocd.argoproj.io/sync-wave: "2"
|
||||||
|
spec:
|
||||||
|
forProvider:
|
||||||
|
config:
|
||||||
|
kubeconfigSecretRef:
|
||||||
|
key: kubeconfig
|
||||||
|
namespace: crossplane-system
|
||||||
|
name: argo-app-test-kubeconf
|
||||||
|
name: argo-app-test-cluster
|
||||||
|
providerConfigRef:
|
||||||
|
name: argocd-provider
|
|
@ -0,0 +1,28 @@
|
||||||
|
apiVersion: argoproj.io/v1alpha1
|
||||||
|
kind: Application
|
||||||
|
metadata:
|
||||||
|
name: argo-second-cluster-demo
|
||||||
|
namespace: argocd
|
||||||
|
annotations:
|
||||||
|
argocd.argoproj.io/sync-wave: "3"
|
||||||
|
spec:
|
||||||
|
destination:
|
||||||
|
namespace: jojo
|
||||||
|
name: argo-app-test-cluster
|
||||||
|
project: default
|
||||||
|
source:
|
||||||
|
path: guestbook
|
||||||
|
repoURL: https://github.com/argoproj/argocd-example-apps.git
|
||||||
|
targetRevision: HEAD
|
||||||
|
syncPolicy:
|
||||||
|
automated:
|
||||||
|
prune: true
|
||||||
|
selfHeal: true
|
||||||
|
syncOptions:
|
||||||
|
- CreateNamespace=true
|
||||||
|
retry:
|
||||||
|
limit: -1
|
||||||
|
backoff:
|
||||||
|
duration: 5s
|
||||||
|
factor: 2
|
||||||
|
maxDuration: 1m
|
|
@ -0,0 +1,24 @@
|
||||||
|
apiVersion: container.kind.crossplane.io/v1alpha1
|
||||||
|
kind: KindCluster
|
||||||
|
metadata:
|
||||||
|
name: argo-app-test
|
||||||
|
annotations:
|
||||||
|
argocd.argoproj.io/sync-wave: "1"
|
||||||
|
spec:
|
||||||
|
forProvider:
|
||||||
|
kindConfig: |
|
||||||
|
kind: Cluster
|
||||||
|
apiVersion: kind.x-k8s.io/v1alpha4
|
||||||
|
nodes:
|
||||||
|
- role: control-plane
|
||||||
|
kubeadmConfigPatches:
|
||||||
|
- |
|
||||||
|
kind: InitConfiguration
|
||||||
|
nodeRegistration:
|
||||||
|
kubeletExtraArgs:
|
||||||
|
node-labels: "ingress-ready=true"
|
||||||
|
providerConfigRef:
|
||||||
|
name: kind-provider
|
||||||
|
writeConnectionSecretToRef:
|
||||||
|
namespace: crossplane-system
|
||||||
|
name: argo-app-test-kubeconf
|
Loading…
Reference in a new issue