v1alpha1

package
v0.0.0-...-93a508a Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2023 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the core v1alpha1 API group +kubebuilder:object:generate=true +groupName=core.tanzu.vmware.com

Index

Constants

This section is empty.

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "core.tanzu.vmware.com", Version: "v1alpha1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

This section is empty.

Types

type Capability

type Capability struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	// Spec is the capability spec that has cluster queries.
	Spec CapabilitySpec `json:"spec,omitempty"`
	// Status is the capability status that has results of cluster queries.
	Status CapabilityStatus `json:"status,omitempty"`
}

Capability is the Schema for the capabilities API

func (*Capability) DeepCopy

func (in *Capability) DeepCopy() *Capability

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Capability.

func (*Capability) DeepCopyInto

func (in *Capability) DeepCopyInto(out *Capability)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Capability) DeepCopyObject

func (in *Capability) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type CapabilityList

type CapabilityList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Capability `json:"items"`
}

CapabilityList contains a list of Capability

func (*CapabilityList) DeepCopy

func (in *CapabilityList) DeepCopy() *CapabilityList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CapabilityList.

func (*CapabilityList) DeepCopyInto

func (in *CapabilityList) DeepCopyInto(out *CapabilityList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*CapabilityList) DeepCopyObject

func (in *CapabilityList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type CapabilitySpec

type CapabilitySpec struct {
	// ServiceAccountName is the name of the service account with which requests
	// are made to the API server for evaluating queries.
	// Service account should exist in the same namespace as this resource.
	// When this field is not specified, a default service account with only the
	// ability to execute GVR queries is used.
	// +optional
	ServiceAccountName string `json:"serviceAccountName"`
	// Queries specifies set of queries that are evaluated.
	// +listType=map
	// +listMapKey=name
	Queries []Query `json:"queries"`
}

CapabilitySpec defines the desired state of Capability.

func (*CapabilitySpec) DeepCopy

func (in *CapabilitySpec) DeepCopy() *CapabilitySpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CapabilitySpec.

func (*CapabilitySpec) DeepCopyInto

func (in *CapabilitySpec) DeepCopyInto(out *CapabilitySpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CapabilityStatus

type CapabilityStatus struct {
	// Results represents the results of all the queries specified in the spec.
	// +listType=map
	// +listMapKey=name
	Results []Result `json:"results"`
}

CapabilityStatus defines the observed state of Capability

func (*CapabilityStatus) DeepCopy

func (in *CapabilityStatus) DeepCopy() *CapabilityStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CapabilityStatus.

func (*CapabilityStatus) DeepCopyInto

func (in *CapabilityStatus) DeepCopyInto(out *CapabilityStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Query

type Query struct {
	// Name is the unique name of the query.
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:MinLength:=1
	Name string `json:"name"`
	// GroupVersionResources evaluates a slice of GVR queries.
	// +listType=map
	// +listMapKey=name
	// +optional
	GroupVersionResources []QueryGVR `json:"groupVersionResources,omitempty"`
	// Objects evaluates a slice of Object queries.
	// +listType=map
	// +listMapKey=name
	// +optional
	Objects []QueryObject `json:"objects,omitempty"`
	// PartialSchemas evaluates a slice of PartialSchema queries.
	// +listType=map
	// +listMapKey=name
	// +optional
	PartialSchemas []QueryPartialSchema `json:"partialSchemas,omitempty"`
}

Query is a logical grouping of GVR, Object and PartialSchema queries.

func (*Query) DeepCopy

func (in *Query) DeepCopy() *Query

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Query.

func (*Query) DeepCopyInto

func (in *Query) DeepCopyInto(out *Query)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type QueryGVR

type QueryGVR struct {
	// Name is the unique name of the query.
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:MinLength:=1
	Name string `json:"name"`
	// Group is the API group to check for in the cluster.
	// +optional
	Group string `json:"group"`
	// Versions is the slice of versions to check for in the specified API group.
	// +optional
	Versions []string `json:"versions,omitempty"`
	// Resource is the API resource to check for given an API group and a slice of versions.
	// Specifying a Resource requires at least one version to be specified in Versions.
	// +optional
	Resource string `json:"resource,omitempty"`
}

QueryGVR queries for an API group with the optional ability to check for API versions and resource.

func (*QueryGVR) DeepCopy

func (in *QueryGVR) DeepCopy() *QueryGVR

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new QueryGVR.

func (*QueryGVR) DeepCopyInto

func (in *QueryGVR) DeepCopyInto(out *QueryGVR)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type QueryObject

type QueryObject struct {
	// Name is the unique name of the query.
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:MinLength:=1
	Name string `json:"name"`
	// ObjectReference is the ObjectReference to check for in the cluster.
	// +kubebuilder:validation:Required
	ObjectReference corev1.ObjectReference `json:"objectReference"`
	// WithAnnotations are the annotations whose presence is checked in the object.
	// The query succeeds only if all the annotations specified exists.
	// +optional
	WithAnnotations map[string]string `json:"withAnnotations,omitempty"`
	// WithAnnotations are the annotations whose absence is checked in the object.
	// The query succeeds only if all the annotations specified do not exist.
	// +optional
	WithoutAnnotations map[string]string `json:"withoutAnnotations,omitempty"`
}

QueryObject represents any runtime.Object that could exist in a cluster with the ability to check for annotations.

func (*QueryObject) DeepCopy

func (in *QueryObject) DeepCopy() *QueryObject

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new QueryObject.

func (*QueryObject) DeepCopyInto

func (in *QueryObject) DeepCopyInto(out *QueryObject)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type QueryPartialSchema

type QueryPartialSchema struct {
	// Name is the unique name of the query.
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:MinLength:=1
	Name string `json:"name"`
	// PartialSchema is the partial OpenAPI schema that will be matched in a cluster.
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:MinLength:=1
	PartialSchema string `json:"partialSchema"`
}

QueryPartialSchema queries for any OpenAPI schema that may exist on a cluster.

func (*QueryPartialSchema) DeepCopy

func (in *QueryPartialSchema) DeepCopy() *QueryPartialSchema

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new QueryPartialSchema.

func (*QueryPartialSchema) DeepCopyInto

func (in *QueryPartialSchema) DeepCopyInto(out *QueryPartialSchema)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type QueryResult

type QueryResult struct {
	// Name is the name of the query in spec whose result this struct represents.
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:MinLength:=1
	Name string `json:"name"`
	// Found is a boolean which indicates if the query condition succeeded.
	// +optional
	Found bool `json:"found"`
	// Error indicates if an error occurred while processing the query.
	// +optional
	Error bool `json:"error,omitempty"`
	// ErrorDetail represents the error detail, if an error occurred.
	// +optional
	ErrorDetail string `json:"errorDetail,omitempty"`
	// NotFoundReason provides the reason if the query condition fails.
	// This is non-empty when Found is false.
	// +optional
	NotFoundReason string `json:"notFoundReason,omitempty"`
}

QueryResult represents the result of a single query.

func (*QueryResult) DeepCopy

func (in *QueryResult) DeepCopy() *QueryResult

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new QueryResult.

func (*QueryResult) DeepCopyInto

func (in *QueryResult) DeepCopyInto(out *QueryResult)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Result

type Result struct {
	// Name is the unique name of the query.
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:MinLength:=1
	Name string `json:"name"`
	// GroupVersionResources represents results of GVR queries in spec.
	// +listType=map
	// +listMapKey=name
	// +optional
	GroupVersionResources []QueryResult `json:"groupVersionResources,omitempty"`
	// Objects represents results of Object queries in spec.
	// +listType=map
	// +listMapKey=name
	// +optional
	Objects []QueryResult `json:"objects,omitempty"`
	// PartialSchemas represents results of PartialSchema queries in spec.
	// +listType=map
	// +listMapKey=name
	// +optional
	PartialSchemas []QueryResult `json:"partialSchemas,omitempty"`
}

Result represents the results of queries in Query.

func (*Result) DeepCopy

func (in *Result) DeepCopy() *Result

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Result.

func (*Result) DeepCopyInto

func (in *Result) DeepCopyInto(out *Result)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

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