propertyprovider

package
v0.10.9 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package propertyprovider features interfaces and other components that can be used to build a Fleet property provider.

Index

Constants

View Source
const (

	// The non-resource properties.
	// NodeCountProperty is a property that describes the number of nodes in the cluster.
	NodeCountProperty = "kubernetes-fleet.io/node-count"

	// The resource properties.
	// Total and allocatable CPU resource properties.
	TotalCPUCapacityProperty       = "resources.kubernetes-fleet.io/total-cpu"
	AllocatableCPUCapacityProperty = "resources.kubernetes-fleet.io/allocatable-cpu"
	AvailableCPUCapacityProperty   = "resources.kubernetes-fleet.io/available-cpu"

	// Total and allocatable memory resource properties.
	TotalMemoryCapacityProperty       = "resources.kubernetes-fleet.io/total-memory"
	AllocatableMemoryCapacityProperty = "resources.kubernetes-fleet.io/allocatable-memory"
	AvailableMemoryCapacityProperty   = "resources.kubernetes-fleet.io/available-memory"

	// ResourcePropertyNamePrefix is the prefix (also known as the subdomain) of the label name
	// associated with all resource properties.
	ResourcePropertyNamePrefix = "resources.kubernetes-fleet.io/"

	// Below are a list of supported capacity types.
	TotalCapacityName       = "total"
	AllocatableCapacityName = "allocatable"
	AvailableCapacityName   = "available"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type PropertyCollectionResponse

type PropertyCollectionResponse struct {
	// Properties is an array of non-resource properties and their values. The key should be the
	// name of the property, which is a Kubernetes label name; the value is the property data.
	Properties map[clusterv1beta1.PropertyName]clusterv1beta1.PropertyValue
	// Resources is a group of resources, described by their allocatable capacity and
	// available capacity.
	Resources clusterv1beta1.ResourceUsage
	// Conditions is an array of conditions that explains the property collection status.
	//
	// Last transition time of each added condition is omitted if set and will instead be added
	// by the Fleet member agent.
	Conditions []metav1.Condition
}

PropertyCollectionResponse is returned by a Fleet property provider to report cluster properties and their property collection status.

type PropertyProvider

type PropertyProvider interface {
	// Collect is called periodically by the Fleet member agent to collect properties.
	//
	// Note that this call should complete promptly. Fleet member agent will cancel the
	// context if the call does not complete in time.
	Collect(ctx context.Context) PropertyCollectionResponse
	// Start is called when the Fleet member agent starts up to initialize the property provider.
	// This call should not block.
	//
	// Note that Fleet member agent will cancel the context when it exits.
	Start(ctx context.Context, config *rest.Config) error
}

PropertyProvider is the interface that every property provider must implement.

Directories

Path Synopsis
Package azure features the Azure property provider for Fleet.
Package azure features the Azure property provider for Fleet.
controllers
Package controllers feature a number of controllers that are in use by the Azure property provider.
Package controllers feature a number of controllers that are in use by the Azure property provider.
trackers
Package trackers feature implementations that help track specific stats about Kubernetes resources, e.g., nodes and pods in the Azure property provider.
Package trackers feature implementations that help track specific stats about Kubernetes resources, e.g., nodes and pods in the Azure property provider.

Jump to

Keyboard shortcuts

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