ocm-status-addon

module
v0.2.0-rc8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 12, 2024 License: Apache-2.0

README

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.20 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

Directories

Path Synopsis
api
v1alpha1
Package v1alpha1 contains API Schema definitions for the v1alpha1 API group +kubebuilder:object:generate=true +groupName=control.kubestellar.io
Package v1alpha1 contains API Schema definitions for the v1alpha1 API group +kubebuilder:object:generate=true +groupName=control.kubestellar.io
cmd
pkg
ocm
test
e2e

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL