Skip to content

Latest commit

 

History

History
62 lines (47 loc) · 2.26 KB

README.md

File metadata and controls

62 lines (47 loc) · 2.26 KB

Status-AddOn

Agent and Controller built with the Open Cluster Management Add-On Framework to provide deep status for selected resources.

TL;DR

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.

Prereqs

  • go version 1.22 and up
  • make
  • kubectl
  • docker (or compatible docker engine that works with kind)
  • kind
  • helm

Setup

  1. Clone this repo.

  2. 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 <latest version>
  3. 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

Using the Add-On

  1. Deploy a workload with KubeStellar, for example following Scenario 4

  2. Verify that WorkStatus objects are created in imbs1 managed clusters namespaces

    kubectl --context imbs1 get workstatuses -n cluster1 
    kubectl --context imbs1 get workstatuses -n cluster2
  3. 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

Uninstalling the add-on

To uninstall the status add-on, use the following helm command:

helm --kube-context imbs1 -n open-cluster-management delete ocm-status-addon