data

package
v0.19.0-dev Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package data provides data types for the TKR Resolver.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OSImageQuery

type OSImageQuery struct {
	// K8sVersionPrefix is a version prefix for matching Kubernetes versions.
	K8sVersionPrefix string

	// TKRSelector is a label selector that resolved TKRs must satisfy.
	TKRSelector labels.Selector

	// OSImageSelector is a label selector that resolved OSImages must satisfy.
	OSImageSelector labels.Selector
}

OSImageQuery sets constraints for resolution of OSImages for the control plane or a machine deployment of a cluster.

type OSImageResult

type OSImageResult struct {
	// K8sVersion is the latest conforming K8s version. If empty, then no K8s version satisfied the query.
	K8sVersion string

	// TKRName is the latest conforming TKR name. If empty, then no TKRs satisfied the query.
	TKRName string

	// TKRsByK8sVersion maps resolved K8s versions to TKRs.
	TKRsByK8sVersion map[string]TKRs

	// OSImagesByTKR maps resolved TKR names to OSImages.
	OSImagesByTKR map[string]OSImages
}

OSImageResult carries the results of OSImage resolution for the control plane or a machine deployment of a cluster.

type OSImages

type OSImages map[string]*runv1.OSImage

OSImages is a set of OSImage objects implemented as a map osImage.Name -> osImage.

func (OSImages) Filter

func (osImages OSImages) Filter(f func(osImage *runv1.OSImage) bool) OSImages

Filter returns a subset of OSImages satisfying the predicate f.

type Query

type Query struct {
	// ControlPlane specifies the Query for the control plane.
	ControlPlane OSImageQuery

	// MachineDeployments specifies the OSImageQueries for worker machine deployments.
	MachineDeployments map[string]OSImageQuery
}

Query sets constraints for resolution of TKRs. Its structure reflects Cluster API cluster topology.

type Result

type Result struct {
	// ControlPlane carries the Result for the  control plane.
	ControlPlane OSImageResult

	// ControlPlane carries the Result for worker machine deployments.
	MachineDeployments map[string]OSImageResult
}

Result carries the results of TKR resolution. Its structure reflects Cluster API cluster topology.

type TKRs

TKRs is a set of TanzuKubernetesRelease objects implemented as a map tkr.Name -> tkr.

func (TKRs) Filter

func (tkrs TKRs) Filter(f func(tkr *runv1.TanzuKubernetesRelease) bool) TKRs

Filter returns a subset of TKRs satisfying the predicate f.

Jump to

Keyboard shortcuts

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