Skip to content

Instantly share code, notes, and snippets.

@cdoan1
Last active August 30, 2021 14:15
Show Gist options
  • Save cdoan1/3bc3137c3b85f45ad8e5907032e7bb0e to your computer and use it in GitHub Desktop.
Save cdoan1/3bc3137c3b85f45ad8e5907032e7bb0e to your computer and use it in GitHub Desktop.
argocdCluster
---
apiVersion: cluster.open-cluster-management.io/v1alpha1
kind: Placement
metadata:
name: argocd-cluster-placement
namespace: open-cluster-management-argocd-gitops
spec:
clusterSets:
- sprint2
---
# create binding to allow placement access to the managed cluster clusterset
apiVersion: cluster.open-cluster-management.io/v1alpha1
kind: ManagedClusterSetBinding
metadata:
name: sprint2
namespace: open-cluster-management-argocd-gitops
spec:
clusterSet: sprint2
---
# bind the placement to the argocd cluster
apiVersion: apps.open-cluster-management.io/v1alpha1
kind: GitOpsCluster
metadata:
name: gitops-cluster
namespace: open-cluster-management-argocd-gitops
spec:
argoServer:
argoNamespace: openshift-gitops
cluster: local-cluster
placementRef:
apiVersion: cluster.open-cluster-management.io/v1alpha1
kind: Placement
name: argocd-cluster-placement
@cdoan1
Copy link
Author

cdoan1 commented Jun 18, 2021

  • apply
  • label managed cluster with argocdCluster: true
  • does it work?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment