GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - hchenxa/api

BranchesTags
Open more actions menu
 
 

Latest commit

 

History

430 Commits
430 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
CHANGELOG
CHANGELOG
 
 
addon
addon
 
 
client
client
 
 
cluster
cluster
 
 
dependencymagnet
dependencymagnet
 
 
docs
docs
 
 
feature
feature
 
 
hack
hack
 
 
operator/v1
operator/v1
 
 
test
test
 
 
utils/work/v1
utils/work/v1
 
 
vendor
vendor
 
 
work
work
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
DCO
DCO
 
 
Dockerfile.build
Dockerfile.build
 
 
LICENSE
LICENSE
 
 
Makefile
Makefile
 
 
OWNERS
OWNERS
 
 
README.md
README.md
 
 
SECURITY.md
SECURITY.md
 
 
go.mod
go.mod
 
 
go.sum
go.sum
 
 

Repository files navigation

Open Cluster Management API

Go Reference Go Report Card

The official API definitions and client libraries for Open Cluster Management (OCM), a CNCF sandbox project focused on multicluster and multicloud scenarios for Kubernetes.

Purpose

This repository serves as the canonical source for all Open Cluster Management API definitions and generated client libraries. It contains API types, CRDs, client code, and helper utilities, making it lightweight and easy for external projects to import and integrate with OCM.

Why This Repository Exists

  • Easy Integration: External projects can import OCM APIs without pulling in implementation dependencies
  • API Definitions: Single source of truth for all OCM Custom Resource Definitions (CRDs)
  • Generated Clients: Kubernetes-style typed clients for all OCM APIs
  • Lightweight: No core controllers or operators, just APIs and helper utilities

API Groups

This repository defines four main API groups that cover the complete OCM ecosystem:

Cluster Management APIs (cluster.open-cluster-management.io)

Manage cluster lifecycle, registration, and placement across your fleet. The v1 APIs provide core cluster registration and grouping with ManagedCluster, ManagedClusterSet, and ManagedClusterSetBinding. The v1beta1 APIs offer advanced cluster selection and placement with Placement and PlacementDecision. The v1alpha1 APIs include cluster capabilities and scoring through ClusterClaim and AddonPlacementScore.

Work Distribution APIs (work.open-cluster-management.io)

Deploy and manage Kubernetes resources across multiple clusters. The v1 APIs provide ManifestWork and AppliedManifestWork to deploy any Kubernetes resource to managed clusters. The v1alpha1 APIs include ManifestWorkReplicaSet for bulk deployment across cluster sets.

Addon Management APIs (addon.open-cluster-management.io)

Build and manage extensions on top of the OCM foundation. The v1alpha1 APIs provide addon lifecycle and configuration through ClusterManagementAddOn, ManagedClusterAddOn, and AddonDeploymentConfig.

Operator APIs (operator.open-cluster-management.io)

Install and configure OCM components. The v1 APIs provide ClusterManager and Klusterlet for hub and agent installation and configuration.

Quick Start

Installation

Add this module to your Go project:

go get open-cluster-management.io/api@latest

Usage Example

Working with ManagedClusters

import (
    clusterv1 "open-cluster-management.io/api/cluster/v1"
    clusterclientset "open-cluster-management.io/api/client/cluster/clientset/versioned"
)

// Create a client
client := clusterclientset.NewForConfigOrDie(config)

// List all managed clusters
clusters, err := client.ClusterV1().ManagedClusters().List(ctx, metav1.ListOptions{})

// Create a new managed cluster
cluster := &clusterv1.ManagedCluster{
    ObjectMeta: metav1.ObjectMeta{
        Name: "my-cluster",
    },
    Spec: clusterv1.ManagedClusterSpec{
        HubAcceptsClient: true,
    },
}

Project Structure

api/
├── addon/           # Addon management APIs
├── cluster/         # Cluster management APIs  
├── operator/        # Operator APIs
├── work/            # Work distribution APIs
├── client/          # Generated Kubernetes clients for all APIs
└── utils/           # Utility libraries

Who Uses This Repository

Official OCM Projects

These projects implement the APIs defined in this repository:

  • registration: Implements ManagedCluster and cluster lifecycle
  • work: Implements ManifestWork for resource distribution
  • placement: Implements Placement for intelligent cluster selection
  • addon-framework: Implements addon management APIs
  • registration-operator: Implements operator APIs

External Projects

This API library is designed for external projects that want to:

  • Build OCM-compatible controllers and operators
  • Integrate with OCM clusters from existing platforms
  • Create custom tools for multicluster management
  • Develop addons and extensions for OCM

Development

Prerequisites

  • Go 1.23+
  • Kubernetes 1.28+

Building

# Update generated code
make update

# Verify code generation and formatting  
make verify

# Run tests
make test

Code Generation

This repository uses Kubernetes code generators to create:

  • DeepCopy methods: For all API types
  • Typed clients: Kubernetes-style clientsets
  • Informers and listers: For efficient caching and watching
  • OpenAPI schemas: For CRD validation

Contributing

We welcome contributions! Please see our Contributing Guide for details.

Community

Connect with the OCM community:

  • Website
  • Slack
  • Mailing group
  • Community meetings
  • YouTube channel

License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.


Open Cluster Management is a Cloud Native Computing Foundation sandbox project.

About

No description, website, or topics provided.

Resources

Readme
Apache-2.0 license

Contributing

Contributing

Security policy

Security policy
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.