apiresourceschema

package
v0.3.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: May 30, 2025 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Overview

Package apiresourceschema contains a controller that watches for PublishedResources and CRDs and creates a matching APIResourceSchema (ARS) in kcp. The name of the generated ARS is stored in the PublishedResource's status, so that the apiexport controller can find and include it in the generated APIExport.

The ARS name contains a hash over the Group, Kind and spec of the projected CRD. This way any changes to the original CRD or projection rules will result in a new ARS.

There is no extra cleanup procedure in either of the clusters when a PublishedResource is deleted. This is to prevent accidental data loss in kcp in case a service owner accidentally (and temporarily) removed a PublishedResource.

Index

Constants

View Source
const (
	ControllerName = "syncagent-apiresourceschema"
)

Variables

This section is empty.

Functions

func Add

func Add(
	mgr manager.Manager,
	kcpCluster cluster.Cluster,
	lcName logicalcluster.Name,
	log *zap.SugaredLogger,
	numWorkers int,
	agentName string,
	prFilter labels.Selector,
) error

Add creates a new controller and adds it to the given manager.

Types

type Reconciler

type Reconciler struct {
	// contains filtered or unexported fields
}

func (*Reconciler) Reconcile

func (r *Reconciler) Reconcile(ctx context.Context, request reconcile.Request) (reconcile.Result, error)

Jump to

Keyboard shortcuts

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