v1alpha1

package
v0.23.1 Latest Latest
Warning

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

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

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the API group of version v1alpha1 +kubebuilder:object:generate=true +k8s:openapi-gen=true +groupName=control.kubestellar.io

Index

Constants

View Source
const (
	// ExecutingCountKey is the name (AKA key) of an annotation on a workload object.
	// This annotation is written by the KubeStellar implementation to report on
	// the number of executing copies of that object.
	// This annotation is maintained while that number is intended to be 1
	// (see the `WantSingletonReportedState` field above).
	// The value of this annotation is a string representing the number of
	// executing copies.  While this annotation is present with the value "1",
	// the reported state is being returned into this workload object (the design
	// of an API object typically assumes that it is taking effect in just one cluster).
	// For reported state from a general number of executing copies, see the
	// mailboxwatch library and the aspiration for summarization.
	ExecutingCountKey string = "kubestellar.io/executing-count"

	ValidationErrorKeyPrefix string = "validation-error.kubestellar.io/"

	// BindingPolicyConditionSatisfied means BindingPolicy requirements are satisfied.
	// A BindingPolicy is not satisfied only if the set of selected clusters is empty
	BindingPolicyConditionSatisfied string = "BindingPolicySatisfied"

	// BindingPolicyConditionMisconfigured means BindingPolicy configuration is incorrect.
	BindingPolicyConditionMisconfigured string = "BindingPolicyMisconfigured"
)
View Source
const PropertyConfigMapNamespace = "customization-properties"

PropertyConfigMapNamespace is the namespace in the ITS that holds ConfigMap objects that provide WEC properties to be used in customization.

View Source
const TemplateExpansionAnnotationKey string = "control.kubestellar.io/expand-templates"

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "control.kubestellar.io", Version: "v1alpha1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme.
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: mygroup.GroupName, Version: "v1alpha1"}

SchemeGroupVersion is group version used to register these objects

Functions

func AreConditionSlicesSame

func AreConditionSlicesSame(c1, c2 []BindingPolicyCondition) bool

areConditionSlicesSame compares two slices of BindingPolicyCondition structs and returns true if they are the same (ignoring order and LastTransitionTime and LastUpdateTime), false otherwise.

func AreConditionsEqual

func AreConditionsEqual(c1, c2 BindingPolicyCondition) bool

areConditionsEqual compares two BindingPolicyCondition structs and returns true if they are equal (excluding LastTransitionTime and LastUpdateTime), false otherwise.

func EnsureCondition

func EnsureCondition(cp *BindingPolicy, newCondition BindingPolicyCondition)

func Kind

func Kind(kind string) schema.GroupKind

Kind takes an unqualified kind and returns back a Group qualified GroupKind

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type AggregatorType added in v0.23.0

type AggregatorType string

AggregatorType indicates what sort of aggregation is to be done.

const (
	AggregatorTypeCount AggregatorType = "COUNT"
	AggregatorTypeSum   AggregatorType = "SUM"
	AggregatorTypeAvg   AggregatorType = "AVG"
	AggregatorTypeMin   AggregatorType = "MIN"
	AggregatorTypeMax   AggregatorType = "MAX"
)

type Binding

type Binding struct {
	metav1.TypeMeta `json:",inline"`
	// Standard object metadata.
	// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
	// +optional
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// `spec` explicitly describes a desired binding between workloads and Locations.
	// It reflects the resolution of a BindingPolicy's selectors.
	Spec BindingSpec `json:"spec,omitempty"`

	Status BindingStatus `json:"status,omitempty"`
}

Binding is mapped 1:1 to a single BindingPolicy object. Binding reflects the resolution of the BindingPolicy's selectors, and explicitly reflects which objects should go to what destinations.

+genclient +genclient:nonNamespaced +kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:resource:scope=Cluster,shortName={bdg}

func (*Binding) DeepCopy

func (in *Binding) DeepCopy() *Binding

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

func (*Binding) DeepCopyInto

func (in *Binding) DeepCopyInto(out *Binding)

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

func (*Binding) DeepCopyObject

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

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

type BindingList

type BindingList struct {
	metav1.TypeMeta `json:",inline"`
	// Standard list metadata.
	// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
	// +optional
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Binding `json:"items"`
}

BindingList is the API type for a list of Binding

+kubebuilder:object:root=true

func (*BindingList) DeepCopy

func (in *BindingList) DeepCopy() *BindingList

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

func (*BindingList) DeepCopyInto

func (in *BindingList) DeepCopyInto(out *BindingList)

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

func (*BindingList) DeepCopyObject

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

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

type BindingPolicy

type BindingPolicy struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   BindingPolicySpec   `json:"spec,omitempty"`
	Status BindingPolicyStatus `json:"status,omitempty"`
}

BindingPolicy defines in which ways the workload objects ('what') and the destinations ('where') are bound together. +genclient +genclient:nonNamespaced +kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" +kubebuilder:printcolumn:name="TYPE",type="string",JSONPath=".spec.type" +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" +kubebuilder:resource:scope=Cluster,shortName={bp}

func (*BindingPolicy) DeepCopy

func (in *BindingPolicy) DeepCopy() *BindingPolicy

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

func (*BindingPolicy) DeepCopyInto

func (in *BindingPolicy) DeepCopyInto(out *BindingPolicy)

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

func (*BindingPolicy) DeepCopyObject

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

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

type BindingPolicyCondition

type BindingPolicyCondition struct {
	Type               ConditionType          `json:"type"`
	Status             corev1.ConditionStatus `json:"status"`
	LastUpdateTime     metav1.Time            `json:"lastUpdateTime"`
	LastTransitionTime metav1.Time            `json:"lastTransitionTime"`
	Reason             ConditionReason        `json:"reason"`
	Message            string                 `json:"message"`
}

BindingPolicyCondition describes the state of a bindingpolicy at a certain point.

func ConditionAvailable

func ConditionAvailable() BindingPolicyCondition

Available returns a condition that indicates the resource is currently observed to be available for use.

func ConditionCreating

func ConditionCreating() BindingPolicyCondition

Creating returns a condition that indicates the cp is currently being created.

func ConditionDeleting

func ConditionDeleting() BindingPolicyCondition

Deleting returns a condition that indicates the cp is currently being deleted.

func ConditionReconcileError

func ConditionReconcileError(err error) BindingPolicyCondition

ReconcileError returns a condition indicating that KubeFlex encountered an error while reconciling the resource.

func ConditionReconcileSuccess

func ConditionReconcileSuccess() BindingPolicyCondition

ReconcileSuccess returns a condition indicating that KubeFlex reconciled the resource

func ConditionUnavailable

func ConditionUnavailable() BindingPolicyCondition

Unavailable returns a condition that indicates the resource is not currently available for use.

func SetCondition

func SetCondition(conditions []BindingPolicyCondition, newCondition BindingPolicyCondition) []BindingPolicyCondition

setCondition sets the supplied BindingPolicyCondition in the given slice of conditions, replacing any existing conditions of the same type. Returns the updated slice of conditions.

func (*BindingPolicyCondition) DeepCopy

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

func (*BindingPolicyCondition) DeepCopyInto

func (in *BindingPolicyCondition) DeepCopyInto(out *BindingPolicyCondition)

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

type BindingPolicyList

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

BindingPolicyList contains a list of BindingPolicies

func (*BindingPolicyList) DeepCopy

func (in *BindingPolicyList) DeepCopy() *BindingPolicyList

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

func (*BindingPolicyList) DeepCopyInto

func (in *BindingPolicyList) DeepCopyInto(out *BindingPolicyList)

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

func (*BindingPolicyList) DeepCopyObject

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

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

type BindingPolicySpec

type BindingPolicySpec struct {
	// `clusterSelectors` identifies the relevant Cluster objects in terms of their labels.
	// A Cluster is relevant if and only if it passes any of the LabelSelectors in this field.
	ClusterSelectors []metav1.LabelSelector `json:"clusterSelectors,omitempty"`

	// `downsync` selects the objects to bind with the selected WECs for downsync,
	// and describes how to collect the status from those WECs for each of the
	// selected objects.
	// An object is selected if it matches at least one member of this list.
	// All of the referenced StatusCollectors are applied to the object.
	Downsync []DownsyncObjectTestAndStatusCollection `json:"downsync,omitempty"`

	// WantSingletonReportedState means that for objects that are distributed --- taking
	// all BindingPolicies into account --- to exactly one WEC, the object's reported state
	// from the WEC should be written to the object in its WDS.
	// WantSingletonReportedState connotes an expectation that indeed the object will
	// propagate to exactly one WEC, but there is no guaranteed reaction when this
	// expectation is not met.
	// +optional
	WantSingletonReportedState bool `json:"wantSingletonReportedState,omitempty"`
}

BindingPolicySpec defines the desired state of BindingPolicy

func (*BindingPolicySpec) DeepCopy

func (in *BindingPolicySpec) DeepCopy() *BindingPolicySpec

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

func (*BindingPolicySpec) DeepCopyInto

func (in *BindingPolicySpec) DeepCopyInto(out *BindingPolicySpec)

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

type BindingPolicyStatus

type BindingPolicyStatus struct {
	Conditions         []BindingPolicyCondition `json:"conditions"`
	ObservedGeneration int64                    `json:"observedGeneration"`
	Errors             []string                 `json:"errors,omitempty"`
}

BindingPolicyStatus defines the observed state of BindingPolicy

func (*BindingPolicyStatus) DeepCopy

func (in *BindingPolicyStatus) DeepCopy() *BindingPolicyStatus

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

func (*BindingPolicyStatus) DeepCopyInto

func (in *BindingPolicyStatus) DeepCopyInto(out *BindingPolicyStatus)

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

type BindingSpec

type BindingSpec struct {
	// `workload` is a collection of namespaced and cluster scoped object references and their associated
	// data - resource versions and statuscollectors, to be propagated to destination clusters.
	Workload DownsyncObjectReferencesWithStatusCollectors `json:"workload,omitempty"`

	// `destinations` is a list of cluster-identifiers that the objects should be propagated to.
	Destinations []Destination `json:"destinations,omitempty"`
}

BindingSpec holds a list of object references with their associated resource versions, and a list of destinations which are the resolution of a BindingPolicy's `what` and `where`: what objects to propagate and to where. All objects referenced in this spec are propagated to all destinations present.

func (*BindingSpec) DeepCopy

func (in *BindingSpec) DeepCopy() *BindingSpec

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

func (*BindingSpec) DeepCopyInto

func (in *BindingSpec) DeepCopyInto(out *BindingSpec)

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

type BindingStatus added in v0.22.0

type BindingStatus struct {
	ObservedGeneration int64    `json:"observedGeneration"`
	Errors             []string `json:"errors,omitempty"`
}

func (*BindingStatus) DeepCopy added in v0.22.0

func (in *BindingStatus) DeepCopy() *BindingStatus

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

func (*BindingStatus) DeepCopyInto added in v0.22.0

func (in *BindingStatus) DeepCopyInto(out *BindingStatus)

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

type ClusterScopeDownsyncObject added in v0.21.0

type ClusterScopeDownsyncObject struct {
	metav1.GroupVersionResource `json:",inline"`
	// `name` of the object to downsync.
	Name string `json:"name"`
	// `resourceVersion` is the version of the resource to downsync.
	ResourceVersion string `json:"resourceVersion"`
}

ClusterScopeDownsyncObject references a specific cluster-scoped object to downsync, identified by its GroupVersionResource and name. The ResourceVersion specifies the exact version of the object to downsync.

func (*ClusterScopeDownsyncObject) DeepCopy added in v0.21.0

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

func (*ClusterScopeDownsyncObject) DeepCopyInto added in v0.21.0

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

type ClusterScopeDownsyncObjectAndStatusCollectors added in v0.23.0

type ClusterScopeDownsyncObjectAndStatusCollectors struct {
	ClusterScopeDownsyncObject `json:",inline"`
	// `statusCollectors` is a list of StatusCollectors name references that are applied to the object.
	StatusCollectors []string `json:"statusCollectors,omitempty"`
}

ClusterScopeDownsyncObjectAndStatusCollectors references a specific cluster-scoped object to downsync, and the status collectors that should be applied to it.

func (*ClusterScopeDownsyncObjectAndStatusCollectors) DeepCopy added in v0.23.0

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

func (*ClusterScopeDownsyncObjectAndStatusCollectors) DeepCopyInto added in v0.23.0

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

type CombinedStatus added in v0.23.0

type CombinedStatus struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// `results` has an entry for every applicable StatusCollector.
	// +optional
	Results []NamedStatusCombination `json:"results,omitempty"`
}

CombinedStatus holds the combined status from the WECs for one particular (workload object, BindingPolicy) pair. The namespace of the CombinedStatus object is the namespace of the workload object, or "kubestellar-report" if the workload object has no namespace. The name of the CombinedStatus object is the concatenation of: - the UID of the workload object - the string ":" - the UID of the BindingPolicy object. The CombinedStatus object has the following labels: - "status.kubestellar.io/api-group" holding the API Group (not verison) of the workload object; - "status.kubestellar.io/resource" holding the resource (lowercase plural) of the workload object; - "status.kubestellar.io/namespace" holding the namespace of the workload object; - "status.kubestellar.io/name" holding the name of the workload object; - "status.kubestellar.io/binding-policy" holding the name of the BindingPolicy object. This API is under development and is not yet functional.

+genclient +kubebuilder:object:root=true +kubebuilder:resource:shortName={cs} +kubebuilder:printcolumn:name="SUBJECT_GROUP",type="string",JSONPath=".metadata.labels['status\\.kubestellar\\.io/api-group']" +kubebuilder:printcolumn:name="SUBJECT_RSC",type="string",JSONPath=".metadata.labels['status\\.kubestellar\\.io/resource']" +kubebuilder:printcolumn:name="SUBJECT_NS",type="string",JSONPath=".metadata.labels['status\\.kubestellar\\.io/namespace']" +kubebuilder:printcolumn:name="SUBJECT_NAME",type="string",JSONPath=".metadata.labels['status\\.kubestellar\\.io/name']" +kubebuilder:printcolumn:name="BINDINGPOLICY",type="string",JSONPath=".metadata.labels['status\\.kubestellar\\.io/policy']"

func (*CombinedStatus) DeepCopy added in v0.23.0

func (in *CombinedStatus) DeepCopy() *CombinedStatus

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

func (*CombinedStatus) DeepCopyInto added in v0.23.0

func (in *CombinedStatus) DeepCopyInto(out *CombinedStatus)

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

func (*CombinedStatus) DeepCopyObject added in v0.23.0

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

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

type CombinedStatusList added in v0.23.0

type CombinedStatusList struct {
	metav1.TypeMeta `json:",inline"`
	// Standard list metadata.
	// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
	// +optional
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []CombinedStatus `json:"items"`
}

CombinedStatusList is the API type for a list of CombinedStatus.

+kubebuilder:object:root=true

func (*CombinedStatusList) DeepCopy added in v0.23.0

func (in *CombinedStatusList) DeepCopy() *CombinedStatusList

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

func (*CombinedStatusList) DeepCopyInto added in v0.23.0

func (in *CombinedStatusList) DeepCopyInto(out *CombinedStatusList)

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

func (*CombinedStatusList) DeepCopyObject added in v0.23.0

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

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

type ConditionReason

type ConditionReason string
const (
	ReasonAvailable   ConditionReason = "Available"
	ReasonUnavailable ConditionReason = "Unavailable"
	ReasonCreating    ConditionReason = "Creating"
	ReasonDeleting    ConditionReason = "Deleting"
)
const (
	ReasonReconcileSuccess ConditionReason = "ReconcileSuccess"
	ReasonReconcileError   ConditionReason = "ReconcileError"
	ReasonReconcilePaused  ConditionReason = "ReconcilePaused"
)

type ConditionType

type ConditionType string
const (
	TypeReady  ConditionType = "Ready"
	TypeSynced ConditionType = "Synced"
)

type CustomTransform added in v0.22.0

type CustomTransform struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   CustomTransformSpec   `json:"spec,omitempty"`
	Status CustomTransformStatus `json:"status,omitempty"`
}

CustomTransform describes how to select and transform some objects on their way from WDS to WEC, without regard to the WEC (i.e., not changes that are specific to the individual WEC). The transformation specified here is in addition to, and follows, whatever is built into KubeStellar for that object.

+genclient +genclient:nonNamespaced +kubebuilder:object:root=true +kubebuilder:resource:scope=Cluster,shortName={ct},categories={all} +kubebuilder:subresource:status +kubebuilder:printcolumn:name="SUBJECT_GROUP",type="string",JSONPath=".spec.apiGroup" +kubebuilder:printcolumn:name="SUBJECT_RESOURCE",type="string",JSONPath=".spec.resource"

func (*CustomTransform) DeepCopy added in v0.22.0

func (in *CustomTransform) DeepCopy() *CustomTransform

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

func (*CustomTransform) DeepCopyInto added in v0.22.0

func (in *CustomTransform) DeepCopyInto(out *CustomTransform)

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

func (*CustomTransform) DeepCopyObject added in v0.22.0

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

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

type CustomTransformList added in v0.22.0

type CustomTransformList struct {
	metav1.TypeMeta `json:",inline"`
	// Standard list metadata.
	// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
	// +optional
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []CustomTransform `json:"items"`
}

CustomTransformList is the API type for a list of CustomTransform

+kubebuilder:object:root=true

func (*CustomTransformList) DeepCopy added in v0.22.0

func (in *CustomTransformList) DeepCopy() *CustomTransformList

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

func (*CustomTransformList) DeepCopyInto added in v0.22.0

func (in *CustomTransformList) DeepCopyInto(out *CustomTransformList)

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

func (*CustomTransformList) DeepCopyObject added in v0.22.0

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

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

type CustomTransformSpec added in v0.22.0

type CustomTransformSpec struct {
	// `apiGroup` holds just the group, not also the version
	APIGroup string `json:"apiGroup"`

	// `resource` is the lowercase plural way of identifying a sort of object.
	// "subresources" can not be directly bound to, only whole (top-level) objects.
	Resource string `json:"resource"`

	// `remove` is a list of JSONPath expressions (https://goessner.net/articles/JsonPath/)
	// that identify part of the object to remove if present.
	// Only a subset of JSONPath is supported.
	// The expression used in a filter must be a conjunction of field == literal tests.
	// Examples:
	// - "$.spec.resources.GenericItems[*].generictemplate.metadata.resourceVersion"
	// - "$.store.book[?(@.author == 'Kilgore Trout' && @.category == 'fiction')].price"
	// +optional
	Remove []string `json:"remove,omitempty"`
}

CustomTransformSpec selects some objects and describes how to transform them. The selected objects are those that match the `apiGroup` and `resource` fields.

func (*CustomTransformSpec) DeepCopy added in v0.22.0

func (in *CustomTransformSpec) DeepCopy() *CustomTransformSpec

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

func (*CustomTransformSpec) DeepCopyInto added in v0.22.0

func (in *CustomTransformSpec) DeepCopyInto(out *CustomTransformSpec)

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

type CustomTransformStatus added in v0.22.0

type CustomTransformStatus struct {
	ObservedGeneration int64 `json:"observedGeneration"`

	// +optional
	Errors []string `json:"errors,omitempty"`

	// +optional
	Warnings []string `json:"warnings,omitempty"`
}

func (*CustomTransformStatus) DeepCopy added in v0.22.0

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

func (*CustomTransformStatus) DeepCopyInto added in v0.22.0

func (in *CustomTransformStatus) DeepCopyInto(out *CustomTransformStatus)

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

type Destination

type Destination struct {
	ClusterId string `json:"clusterId,omitempty"`
}

Destination wraps the identifiers required to uniquely identify a destination cluster.

func (*Destination) DeepCopy

func (in *Destination) DeepCopy() *Destination

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

func (*Destination) DeepCopyInto

func (in *Destination) DeepCopyInto(out *Destination)

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

type DownsyncObjectReferencesWithStatusCollectors added in v0.23.0

type DownsyncObjectReferencesWithStatusCollectors struct {
	// `clusterScope` holds a list of cluster-scoped object references with their associated
	// resource versions to downsync.
	ClusterScope []ClusterScopeDownsyncObjectAndStatusCollectors `json:"clusterScope,omitempty"`

	// `namespaceScope` holds a list of namespace-scoped object references with their associated
	// resource versions to downsync.
	NamespaceScope []NamespaceScopeDownsyncObjectAndStatusCollectors `json:"namespaceScope,omitempty"`
}

DownsyncObjectReferencesWithStatusCollectors defines the objects to be down-synced, grouping them by scope. It specifies a set of object references with their associated resource versions, to be downsynced. Each object reference is associated with a set of statuscollectors that should be applied to it.

func (*DownsyncObjectReferencesWithStatusCollectors) DeepCopy added in v0.23.0

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

func (*DownsyncObjectReferencesWithStatusCollectors) DeepCopyInto added in v0.23.0

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

type DownsyncObjectTest

type DownsyncObjectTest struct {
	// `apiGroup` is the API group of the referenced object, empty string for the core API group.
	// `nil` matches every API group.
	// +optional
	APIGroup *string `json:"apiGroup"`

	// `resources` is a list of lowercase plural names for the sorts of objects to match.
	// An entry of `"*"` means that all match.
	// If this list contains `"*"` then it should contain nothing else.
	// Empty list is a special case, it matches every object.
	// +optional
	Resources []string `json:"resources,omitempty"`

	// `namespaces` is a list of acceptable names for the object's namespace.
	// An entry of `"*"` means that any namespace is acceptable;
	// this is the only way to match a cluster-scoped object.
	// If this list contains `"*"` then it should contain nothing else.
	// Empty list is a special case, it matches every object.
	// +optional
	Namespaces []string `json:"namespaces,omitempty"`

	// `namespaceSelectors` a list of label selectors.
	// For a namespaced object, at least one of these label selectors has to match
	// the labels of the Namespace object that defines the namespace of the object that this DownsyncObjectTest is testing.
	// For a cluster-scoped object, at least one of these label selectors must be `{}`.
	// Empty list is a special case, it matches every object.
	// +optional
	NamespaceSelectors []metav1.LabelSelector `json:"namespaceSelectors,omitempty"`

	// `objectSelectors` is a list of label selectors.
	// At least one of them must match the labels of the object being tested.
	// Empty list is a special case, it matches every object.
	// +optional
	ObjectSelectors []metav1.LabelSelector `json:"objectSelectors,omitempty"`

	// `objectNames` is a list of object names that match.
	// An entry of `"*"` means that all match.
	// If this list contains `"*"` then it should contain nothing else.
	// Empty list is a special case, it matches every object.
	// +optional
	ObjectNames []string `json:"objectNames,omitempty"`
}

DownsyncObjectTest is a set of criteria that characterize matching objects. An object matches if: - the `apiGroup` criterion is satisfied; - the `resources` criterion is satisfied; - the `namespaces` criterion is satisfied; - the `namespaceSelectors` criterion is satisfied; - the `objectNames` criterion is satisfied; and - the `objectSelectors` criterion is satisfied. At least one of the fields must make some discrimination; it is not valid for every field to match all objects. Validation might not be fully checked by apiservers until the Kubernetes dependency is release 1.25; in the meantime validation error messages will appear in annotations whose key is `validation-error.kubestellar.io/{number}`.

func (*DownsyncObjectTest) DeepCopy

func (in *DownsyncObjectTest) DeepCopy() *DownsyncObjectTest

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

func (*DownsyncObjectTest) DeepCopyInto

func (in *DownsyncObjectTest) DeepCopyInto(out *DownsyncObjectTest)

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

type DownsyncObjectTestAndStatusCollection added in v0.23.0

type DownsyncObjectTestAndStatusCollection struct {
	DownsyncObjectTest `json:",inline"`
	// statusCollectors is a list of StatusCollectors name references that are applied to the selected objects.
	// This API is under development and is not yet functional.
	StatusCollectors []string `json:"statusCollectors,omitempty"`
}

DownsyncObjectTestAndStatusCollection identifies some objects (by a predicate) and asks for some combined status to be returned from those objects. The latter is dictated through applying a set of StatusCollectors.

func (*DownsyncObjectTestAndStatusCollection) DeepCopy added in v0.23.0

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

func (*DownsyncObjectTestAndStatusCollection) DeepCopyInto added in v0.23.0

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

type Expression added in v0.23.0

type Expression string

Expression is written in the [Common Expression Language](https://cel.dev/). See github.com/google/cel-go for the Go implementation used in Kubernetes, and https://kubernetes.io/docs/reference/using-api/cel/ about CEL's uses in Kubernetes. The expression will be type-checked against the schema for the object type at hand, using the Kubernetes library code for converting an OpenAPI schema to a CEL type (e.g., https://github.com/kubernetes/apiserver/blob/v0.28.2/pkg/cel/common/schemas.go#L40). Parsing errors are posted to the status.Errors of the StatusCollector. Type checking errors are posted to the status.Errors of the Binding and BindingPolicy.

type NamedAggregator added in v0.23.0

type NamedAggregator struct {
	Type AggregatorType `json:"type"`

	// +optional
	Subject *Expression `json:"subject,omitempty"`
}

NamedAggregator pairs a name with a way to aggregate over some objects.

- For `type=="COUNT"`, `subject` is omitted and the aggregate is the count of those objects that are not `null`.

- For the other types, `subject` is required and SHOULD evaluate to a numeric value; exceptions are handled as follows. For a string value: if it parses as an int64 or float64 then that is used. Otherwise this is an error condition: a value of 0 is used, and the error is reported in the BindingPolicyStatus.Errors (not necessarily repeated for each WEC).

func (*NamedAggregator) DeepCopy added in v0.23.0

func (in *NamedAggregator) DeepCopy() *NamedAggregator

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

func (*NamedAggregator) DeepCopyInto added in v0.23.0

func (in *NamedAggregator) DeepCopyInto(out *NamedAggregator)

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

type NamedExpression added in v0.23.0

type NamedExpression struct {
	Name string     `json:"name"`
	Def  Expression `json:"def"`
}

NamedExpression pairs a name with a way of extracting a value from a JSON object.

func (*NamedExpression) DeepCopy added in v0.23.0

func (in *NamedExpression) DeepCopy() *NamedExpression

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

func (*NamedExpression) DeepCopyInto added in v0.23.0

func (in *NamedExpression) DeepCopyInto(out *NamedExpression)

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

type NamedStatusCombination added in v0.23.0

type NamedStatusCombination struct {
	Name string `json:"name"`

	ColumnNames []string `json:"columnNames"`

	// +optional
	Rows []StatusCombinationRow `json:"rows,omitempty"`
}

NamedStatusCombination holds the rows that come from evaluating one StatusCollector.

func (*NamedStatusCombination) DeepCopy added in v0.23.0

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

func (*NamedStatusCombination) DeepCopyInto added in v0.23.0

func (in *NamedStatusCombination) DeepCopyInto(out *NamedStatusCombination)

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

type NamespaceScopeDownsyncObject added in v0.21.0

type NamespaceScopeDownsyncObject struct {
	metav1.GroupVersionResource `json:",inline"`
	// `namespace` of the object to downsync.
	Namespace string `json:"namespace"`
	// `name` of the object to downsync.
	Name string `json:"name"`
	// `resourceVersion` is the version of the resource to downsync.
	ResourceVersion string `json:"resourceVersion"`
}

NamespaceScopeDownsyncObject references a specific namespace-scoped object to downsync, identified by its GroupVersionResource, namespace, and name. The ResourceVersion specifies the exact version of the object to downsync.

func (*NamespaceScopeDownsyncObject) DeepCopy added in v0.21.0

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

func (*NamespaceScopeDownsyncObject) DeepCopyInto added in v0.21.0

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

type NamespaceScopeDownsyncObjectAndStatusCollectors added in v0.23.0

type NamespaceScopeDownsyncObjectAndStatusCollectors struct {
	NamespaceScopeDownsyncObject `json:",inline"`
	// `statusCollectors` is a list of StatusCollectors name references that are applied to the object.
	StatusCollectors []string `json:"statusCollectors,omitempty"`
}

NamespaceScopeDownsyncObjectAndStatusCollectors references a specific namespace-scoped object to downsync, and the status collectors that should be applied to it.

func (*NamespaceScopeDownsyncObjectAndStatusCollectors) DeepCopy added in v0.23.0

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

func (*NamespaceScopeDownsyncObjectAndStatusCollectors) DeepCopyInto added in v0.23.0

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

type StatusCollector added in v0.23.0

type StatusCollector struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   StatusCollectorSpec   `json:"spec,omitempty"`
	Status StatusCollectorStatus `json:"status,omitempty"`
}

StatusCollector defines one way to collect status about a given workload object from the set of WECs that it propagates to. This is modeled after an SQL SELECT statement that does aggregation. This API is under development and is not yet functional.

+genclient +genclient:nonNamespaced +kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:resource:scope=Cluster,shortName={sc}

func (*StatusCollector) DeepCopy added in v0.23.0

func (in *StatusCollector) DeepCopy() *StatusCollector

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

func (*StatusCollector) DeepCopyInto added in v0.23.0

func (in *StatusCollector) DeepCopyInto(out *StatusCollector)

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

func (*StatusCollector) DeepCopyObject added in v0.23.0

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

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

type StatusCollectorList added in v0.23.0

type StatusCollectorList struct {
	metav1.TypeMeta `json:",inline"`
	// Standard list metadata.
	// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
	// +optional
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []StatusCollector `json:"items"`
}

StatusCollectorList is the API type for a list of StatusCollector.

+kubebuilder:object:root=true

func (*StatusCollectorList) DeepCopy added in v0.23.0

func (in *StatusCollectorList) DeepCopy() *StatusCollectorList

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

func (*StatusCollectorList) DeepCopyInto added in v0.23.0

func (in *StatusCollectorList) DeepCopyInto(out *StatusCollectorList)

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

func (*StatusCollectorList) DeepCopyObject added in v0.23.0

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

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

type StatusCollectorSpec added in v0.23.0

type StatusCollectorSpec struct {
	// `filter`, if given, is applied first.
	// It must evaluate to a boolean or null (which is treated as false).
	// This is like the WHERE clause in an SQL SELECT statement.
	// +optional
	Filter *Expression `json:"filter,omitempty"`

	// `groupBy` says how to group workload objects for aggregation (if there is any).
	// Each expression must evaluate to an atomic value.
	// `groupBy` must be empty if `combinedFields` is.
	// +optional
	GroupBy []NamedExpression `json:"groupBy,omitempty"`

	// `combinedFields` defines the aggregations to do, if any.
	// `combinedFields` must be empty if `select` is not.
	// +optional
	CombinedFields []NamedAggregator `json:"combinedFields,omitempty"`

	// `select` defines named values to extract from each object.
	// `select` must be emtpy when `combinedFields` is not.
	// +optional
	Select []NamedExpression `json:"select,omitempty"`

	// `limit` limits the number of rows returned.
	// The default value is 20.
	Limit int64 `json:"limit"`
}

StatusCollectorSpec defines the desired state of StatusCollector.

func (*StatusCollectorSpec) DeepCopy added in v0.23.0

func (in *StatusCollectorSpec) DeepCopy() *StatusCollectorSpec

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

func (*StatusCollectorSpec) DeepCopyInto added in v0.23.0

func (in *StatusCollectorSpec) DeepCopyInto(out *StatusCollectorSpec)

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

type StatusCollectorStatus added in v0.23.0

type StatusCollectorStatus struct {
	ObservedGeneration int64 `json:"observedGeneration"`

	// +optional
	Errors []string `json:"errors,omitempty"`
}

StatusCollectorStatus defines the observed state of StatusCollector.

func (*StatusCollectorStatus) DeepCopy added in v0.23.0

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

func (*StatusCollectorStatus) DeepCopyInto added in v0.23.0

func (in *StatusCollectorStatus) DeepCopyInto(out *StatusCollectorStatus)

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

type StatusCombinationRow added in v0.23.0

type StatusCombinationRow struct {
	Columns []Value `json:"columns"`
}

func (*StatusCombinationRow) DeepCopy added in v0.23.0

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

func (*StatusCombinationRow) DeepCopyInto added in v0.23.0

func (in *StatusCombinationRow) DeepCopyInto(out *StatusCombinationRow)

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

type Value added in v0.23.0

type Value struct {
	Type ValueType `json:"type"`

	// +optional
	String *string `json:"string,omitempty"`

	// Integer or floating-point, in JavaScript Object Notation.
	// +optional
	Number *string `json:"float,omitempty"`

	// +optional
	Bool *bool `json:"bool,omitempty"`

	// +optional
	Object map[string]Value `json:"object,omitempty"`

	// +optional
	Array []Value `json:"array,omitempty"`
}

Value holds a JSON value. This is a union type.

func (*Value) DeepCopy added in v0.23.0

func (in *Value) DeepCopy() *Value

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

func (*Value) DeepCopyInto added in v0.23.0

func (in *Value) DeepCopyInto(out *Value)

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

type ValueType added in v0.23.0

type ValueType string
const (
	TypeString ValueType = "String"
	TypeNumber ValueType = "Number"
	TypeBool   ValueType = "Bool"
	TypeNull   ValueType = "Null"
	TypeObject ValueType = "Object"
	TypeArray  ValueType = "Array"
)

Jump to

Keyboard shortcuts

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