Agent and Controller built with the Open Cluster Management Add-On Framework to provide deep status for selected resources.
The OCM status addon consists of a controller and an agent. The controller is responsible for installing the agent addon on all clusters. The agent is responsible for monitoring the objects delivered by the OCM work agent, and report their statuses back to the OCM Hub using WorkStatus objects. The addon uses the OCM Add-on Framework and RBAC permissions to enable this functionality.
- go version 1.20 and up
- make
- kubectl
- docker (or compatible docker engine that works with kind)
- kind
- helm
-
Clone this repo.
-
Setup KubeStellar as described in setup, then install status add-on with helm:
helm --kube-context imbs1 upgrade --install ocm-status-addon -n open-cluster-management oci://ghcr.io/kubestellar/ocm-status-addon-chart --version 0.2.0-alpha.1
-
Check status of agent deployments
kubectl --context imbs1 -n cluster1 get managedclusteraddons addon-status kubectl --context imbs1 -n cluster2 get managedclusteraddons addon-status
After agents start and are running,
AVAILABLE`` should be
True` on both namespaces
-
Deploy a workload with KubeStellar, for example following Scenario 4
-
Verify that
WorkStatus
objects are created inimbs1
managed clusters namespaceskubectl --context imbs1 get workstatuses -n cluster1 kubectl --context imbs1 get workstatuses -n cluster2
-
Inspect one of the statuses (change
WS_NAME
based on your scenario). You should be able to see a full status.WS_NAME=appsv1-deployment-nginx-nginx-deployment kubectl --context imbs1 get workstatuses -n cluster1 ${WS_NAME} -o yaml
To uninstall the status add-on, use the following helm command:
helm --kube-context imbs1 -n open-cluster-management delete ocm-status-addon