This document explains how to add KubeStellar’s ‘workspaces’ as Argo CD’s ‘clusters’.
Add KubeStellar’s workspaces to Argo CD as clusters
As of today, the ‘workspaces’, aka ‘logical clusters’ used by KubeStellar are not identical with ordinary Kubernetes clusters. Thus, in order to add them as Argo CD’s ‘clusters’, there are a few more steps to take.
For KubeStellar’s Inventory Management Workspace (IMW) and Workload Management Workspace (WMW). The steps are similar. Let’s take WMW as an example:
Create kube-system namespace in the workspace.
Make sure necessary apibindings exist in the workspace.
For WMW, we need for Kubernetes and for KubeStellar’s edge API.
Exclude ClusterWorkspace from discovery and sync.
kubectl -n argocd edit cm argocd-cmMake sure resource.exclusions exists in the data field of the argocd-cm configmap as follows:
data:
resource.exclusions: |
- apiGroups:
- "tenancy.kcp.io"
kinds:
- "ClusterWorkspace"
clusters:
- "*"Restart the Argo CD server.
kubectl -n argocd rollout restart deployment argocd-serverArgo CD’s documentation mentions this feature as Resource Exclusion/Inclusion .
Make sure the current context uses WMW, then identify the admin.kubeconfig. The command and output should be similar to
$ argocd cluster add --name wmw --kubeconfig ./admin.kubeconfig workspace.kcp.io/current
WARNING: This will create a service account `argocd-manager` on the cluster referenced by context `workspace.kcp.io/current` with full cluster level privileges. Do you want to continue [y/N]? y
INFO[0001] ServiceAccount "argocd-manager" already exists in namespace "kube-system"
INFO[0001] ClusterRole "argocd-manager-role" updated
INFO[0001] ClusterRoleBinding "argocd-manager-role-binding" updated
Cluster 'https://172.31.31.125:6443/clusters/root:my-org:wmw-turbo' addedCreate Argo CD Applications KubeStellar’s workspaces are added, Argo CD Applications can be created as normal.
There are a few examples listed here , and the commands to use the examples are listed as follows.
Create Argo CD Applications against KubeStellar’s IMW
Create two Locations. The command and output should be similar to
$ argocd app create locations \
--repo https://github.com/edge-experiments/gitops-source.git \
--path kubestellar/locations/ \
--dest-server https://172.31.31.125:6443/clusters/root:imw-turbo \
--sync-policy automated
application 'locations' createdCreate two SyncTargets. The command and output should be similar to
$ argocd app create synctargets \
--repo https://github.com/edge-experiments/gitops-source.git \
--path kubestellar/synctargets/ \
--dest-server https://172.31.31.125:6443/clusters/root:imw-turbo \
--sync-policy automated
application 'synctargets' createdCreate Argo CD Application against KubeStellar’s WMW
Create a Namespace. The command and output should be similar to
$ argocd app create namespace \
--repo https://github.com/edge-experiments/gitops-source.git \
--path kubestellar/namespaces/ \
--dest-server https://172.31.31.125:6443/clusters/root:my-org:wmw-turbo \
--sync-policy automated
application 'namespace' createdCreate a Deployment for ‘cpumemload’. The command and output should be similar to
$ argocd app create cpumemload \
--repo https://github.com/edge-experiments/gitops-source.git \
--path kubestellar/workloads/cpumemload/ \
--dest-server https://172.31.31.125:6443/clusters/root:my-org:wmw-turbo \
--sync-policy automated
application 'cpumemload' createdCreate an EdgePlacement. The command and output should be similar to
$ argocd app create edgeplacement \
--repo https://github.com/edge-experiments/gitops-source.git \
--path kubestellar/placements/ \
--dest-server https://172.31.31.125:6443/clusters/root:my-org:wmw-turbo \
--sync-policy automated
application 'edgeplacement' createdOther Resources
Medium - Sync 10,000 ArgoCD Applications in ShotÂ
Medium - Sync 10,000 ArgoCD Applications in Shot, by YourselfÂ
Medium - GitOpsCon - here we comeÂ
ArgoCD Scale Experiment - KubeStellar Community Demo Day

GitOpsCon 2023 - A Quantitative Study on Argo Scalability - Andrew Anderson & Jun Duan, IBM

ArgoCD and KubeStellar in the news



