v1alpha1

package
v0.15.1 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the lib v1alpha1 API group +kubebuilder:object:generate=true +groupName=lib.projectsveltos.io

Index

Constants

View Source
const (
	// EventBasedAddOnFinalizer allows Reconcilers to clean up resources associated with
	// EventBasedAddOn before removing it from the apiserver.
	EventBasedAddOnFinalizer = "eventbasedaddon.finalizer.projectsveltos.io"

	EventBasedAddOnKind = "EventBasedAddOn"

	FeatureEventBasedAddOn = "EventBasedAddOn"
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "lib.projectsveltos.io", 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 EventBasedAddOn

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

	Spec   EventBasedAddOnSpec   `json:"spec,omitempty"`
	Status EventBasedAddOnStatus `json:"status,omitempty"`
}

EventBasedAddOn is the Schema for the eventbasedaddons API

func (*EventBasedAddOn) DeepCopy

func (in *EventBasedAddOn) DeepCopy() *EventBasedAddOn

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

func (*EventBasedAddOn) DeepCopyInto

func (in *EventBasedAddOn) DeepCopyInto(out *EventBasedAddOn)

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

func (*EventBasedAddOn) DeepCopyObject

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

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

type EventBasedAddOnList

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

EventBasedAddOnList contains a list of EventBasedAddOn

func (*EventBasedAddOnList) DeepCopy

func (in *EventBasedAddOnList) DeepCopy() *EventBasedAddOnList

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

func (*EventBasedAddOnList) DeepCopyInto

func (in *EventBasedAddOnList) DeepCopyInto(out *EventBasedAddOnList)

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

func (*EventBasedAddOnList) DeepCopyObject

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

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

type EventBasedAddOnSpec

type EventBasedAddOnSpec struct {
	// SourceClusterSelector identifies clusters to associate to.
	// This represents the set of clusters where Sveltos will watch for
	// events defined by referenced EventSource
	SourceClusterSelector libsveltosv1alpha1.Selector `json:"sourceClusterSelector"`

	// Multiple resources in a managed cluster can be a match for referenced
	// EventSource. OneForEvent indicates whether a ClusterProfile for all
	// resource (OneForEvent = false) or one per resource (OneForEvent = true)
	// needs to be creted.
	// +optional
	OneForEvent bool `json:"oneForEvent,omitempty"`

	// EventSourceName is the name of the referenced EventSource.
	// Resources contained in the referenced ConfigMaps/Secrets and HelmCharts
	// will be customized using information from resources matching the EventSource
	// in the managed cluster.
	EventSourceName string `json:"eventSourceName"`

	// DestinationClusterSelector identifies the cluster where add-ons will be deployed.
	// By default, this is nil and add-ons will be deployed in the very same cluster the
	// event happened.
	// If DestinationClusterSelector is set though, when an event happens in any of the
	// cluster identified by SourceClusterSelector, add-ons will be deployed in each of
	// the cluster indentified by DestinationClusterSelector.
	// +omitempty
	DestinationClusterSelector *libsveltosv1alpha1.Selector `json:"destinationClusterSelector,omitempty"`

	// SyncMode specifies how features are synced in a matching workload cluster.
	// - OneTime means, first time a workload cluster matches the ClusterProfile,
	// features will be deployed in such cluster. Any subsequent feature configuration
	// change won't be applied into the matching workload clusters;
	// - Continuous means first time a workload cluster matches the ClusterProfile,
	// features will be deployed in such a cluster. Any subsequent feature configuration
	// change will be applied into the matching workload clusters.
	// - DryRun means no change will be propagated to any matching cluster. A report
	// instead will be generated summarizing what would happen in any matching cluster
	// because of the changes made to ClusterProfile while in DryRun mode.
	// +kubebuilder:default:=Continuous
	// +optional
	SyncMode configv1alpha1.SyncMode `json:"syncMode,omitempty"`

	// StopMatchingBehavior indicates what behavior should be when a Cluster stop matching
	// the ClusterProfile. By default all deployed Helm charts and Kubernetes resources will
	// be withdrawn from Cluster. Setting StopMatchingBehavior to LeavePolicies will instead
	// leave ClusterProfile deployed policies in the Cluster.
	// +kubebuilder:default:=WithdrawPolicies
	// +optional
	StopMatchingBehavior configv1alpha1.StopMatchingBehavior `json:"stopMatchingBehavior,omitempty"`

	// PolicyRefs references all the ConfigMaps/Secrets containing kubernetes resources
	// that need to be deployed in the matching clusters based on EventSource.
	// +optional
	PolicyRefs []configv1alpha1.PolicyRef `json:"policyRefs,omitempty"`

	// Helm charts to be deployed in the matching clusters based on EventSource.
	HelmCharts []configv1alpha1.HelmChart `json:"helmCharts,omitempty"`

	// Kustomization refs
	KustomizationRefs []configv1alpha1.KustomizationRef `json:"kustomizationRefs,omitempty"`
}

EventBasedAddOnSpec defines the desired state of EventBasedAddOn

func (*EventBasedAddOnSpec) DeepCopy

func (in *EventBasedAddOnSpec) DeepCopy() *EventBasedAddOnSpec

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

func (*EventBasedAddOnSpec) DeepCopyInto

func (in *EventBasedAddOnSpec) DeepCopyInto(out *EventBasedAddOnSpec)

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

type EventBasedAddOnStatus

type EventBasedAddOnStatus struct {
	// MatchingClusterRefs reference all the cluster-api Cluster currently matching
	// ClusterProfile SourceClusterSelector
	// +optional
	MatchingClusterRefs []corev1.ObjectReference `json:"matchingClusters,omitempty"`

	// DestinationMatchingClusterRefs reference all the cluster-api Cluster currently matching
	// ClusterProfile DestinationClusterSelector
	// +optional
	DestinationMatchingClusterRefs []corev1.ObjectReference `json:"destinationMatchingClusterRefs,omitempty"`

	// ClusterInfo represent the deployment status in each managed
	// cluster.
	// +optional
	ClusterInfo []libsveltosv1alpha1.ClusterInfo `json:"clusterInfo,omitempty"`
}

EventBasedAddOnStatus defines the observed state of EventBasedAddOn

func (*EventBasedAddOnStatus) DeepCopy

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

func (*EventBasedAddOnStatus) DeepCopyInto

func (in *EventBasedAddOnStatus) DeepCopyInto(out *EventBasedAddOnStatus)

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