v1alpha1

package
v0.0.0-...-2db42ee Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the component v1alpha1 API group +kubebuilder:object:generate=true +groupName=operator.kyma-project.io

Index

Constants

View Source
const (
	WatcherKind   = "Watcher"
	WatcherPlural = "watchers"
	Version       = "v1alpha1"
)
View Source
const ManagedBylabel = "operator.kyma-project.io/managed-by"

Variables

View Source
var (
	// GroupVersion is group version used to register these objects.
	GroupVersion = schema.GroupVersion{Group: "operator.kyma-project.io", Version: Version} //nolint:gochecknoglobals

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

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

Functions

This section is empty.

Types

type FieldName

type FieldName string
const (
	// SpecField represents FieldName spec, which indicates that resource spec will be watched.
	SpecField FieldName = "spec"
	// StatusField represents FieldName status, which indicates that only resource status will be watched.
	StatusField FieldName = "status"
)

type Service

type Service struct {
	// Port describes the service port.
	Port int64 `json:"port"`

	// Name describes the service name.
	Name string `json:"name"`

	// Namespace describes the service namespace.
	Namespace string `json:"namespace"`
}

Service describes the service specification for the corresponding operator container.

func (*Service) DeepCopy

func (in *Service) DeepCopy() *Service

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

func (*Service) DeepCopyInto

func (in *Service) DeepCopyInto(out *Service)

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

type Watcher

type Watcher struct {
	metav1.TypeMeta `json:",inline"`

	// +kubebuilder:validation:Optional
	metav1.ObjectMeta `json:"metadata"`

	// +kubebuilder:validation:Optional
	Spec WatcherSpec `json:"spec"`

	// +kubebuilder:validation:Optional
	Status WatcherStatus `json:"status"`
}

Watcher is the Schema for the watchers API.

func (*Watcher) AddOrUpdateReadyCondition

func (w *Watcher) AddOrUpdateReadyCondition(state WatcherConditionStatus, msg string)

func (*Watcher) DeepCopy

func (in *Watcher) DeepCopy() *Watcher

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

func (*Watcher) DeepCopyInto

func (in *Watcher) DeepCopyInto(out *Watcher)

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

func (*Watcher) DeepCopyObject

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

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

func (*Watcher) GetModuleName

func (w *Watcher) GetModuleName() string

func (*Watcher) SetObservedGeneration

func (w *Watcher) SetObservedGeneration() *Watcher

type WatcherCondition

type WatcherCondition struct {
	// Type is used to reflect what type of condition we are dealing with. Most commonly ConditionTypeReady it is used
	// as extension marker in the future
	Type WatcherConditionType `json:"type"`

	// Status of the Watcher Condition.
	// Value can be one of ("True", "False", "Unknown").
	Status WatcherConditionStatus `json:"status"`

	// Human-readable message indicating details about the last status transition.
	// +kubebuilder:validation:Optional
	Message string `json:"message"`

	// Machine-readable text indicating the reason for the condition's last transition.
	// +kubebuilder:validation:Optional
	Reason string `json:"reason"`

	// Timestamp for when Watcher last transitioned from one status to another.
	// +kubebuilder:validation:Optional
	LastTransitionTime *metav1.Time `json:"lastTransitionTime"`
}

WatcherCondition describes condition information for Watcher.

func (*WatcherCondition) DeepCopy

func (in *WatcherCondition) DeepCopy() *WatcherCondition

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

func (*WatcherCondition) DeepCopyInto

func (in *WatcherCondition) DeepCopyInto(out *WatcherCondition)

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

type WatcherConditionStatus

type WatcherConditionStatus string
const (
	// ConditionStatusTrue signifies WatcherConditionStatus true.
	ConditionStatusTrue WatcherConditionStatus = "True"

	// ConditionStatusFalse signifies WatcherConditionStatus false.
	ConditionStatusFalse WatcherConditionStatus = "False"

	// ConditionStatusUnknown signifies WatcherConditionStatus unknown.
	ConditionStatusUnknown WatcherConditionStatus = "Unknown"
)

Valid WatcherConditionStatus.

type WatcherConditionType

type WatcherConditionType string

+kubebuilder:validation:Enum=Ready

const (
	// ConditionTypeReady represents WatcherConditionType Ready, meaning as soon as its true we will reconcile Watcher
	// into WatcherStateReady.
	ConditionTypeReady WatcherConditionType = "Ready"
)

type WatcherList

type WatcherList struct {
	metav1.TypeMeta `json:",inline"`

	// +kubebuilder:validation:Optional
	metav1.ListMeta `json:"metadata"`
	Items           []Watcher `json:"items"`
}

WatcherList contains a list of Watcher.

func (*WatcherList) DeepCopy

func (in *WatcherList) DeepCopy() *WatcherList

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

func (*WatcherList) DeepCopyInto

func (in *WatcherList) DeepCopyInto(out *WatcherList)

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

func (*WatcherList) DeepCopyObject

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

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

type WatcherSpec

type WatcherSpec struct {
	// ServiceInfo describes the service information of the operator
	ServiceInfo Service `json:"serviceInfo"`

	// LabelsToWatch describes the labels that should be watched
	LabelsToWatch map[string]string `json:"labelsToWatch"`

	// Field describes the subresource that should be watched
	// Value can be one of ("spec", "status")
	Field FieldName `json:"field"`
}

WatcherSpec defines the desired state of Watcher.

func (*WatcherSpec) DeepCopy

func (in *WatcherSpec) DeepCopy() *WatcherSpec

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

func (*WatcherSpec) DeepCopyInto

func (in *WatcherSpec) DeepCopyInto(out *WatcherSpec)

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

type WatcherState

type WatcherState string

+kubebuilder:validation:Enum=Processing;Deleting;Ready;Error

const (
	// WatcherStateReady signifies Watcher is ready and has been installed successfully.
	WatcherStateReady WatcherState = "Ready"

	// WatcherStateProcessing signifies Watcher is reconciling and is in the process of installation.
	WatcherStateProcessing WatcherState = "Processing"

	// WatcherStateError signifies an error for Watcher. This signifies that the Installation
	// process encountered an error.
	WatcherStateError WatcherState = "Error"

	// WatcherStateDeleting signifies Watcher is being deleted.
	WatcherStateDeleting WatcherState = "Deleting"
)

Valid Watcher States.

type WatcherStatus

type WatcherStatus struct {
	// State signifies current state of a Watcher.
	// Value can be one of ("Ready", "Processing", "Error", "Deleting")
	State WatcherState `json:"state"`

	// List of status conditions to indicate the status of a Watcher.
	// +kubebuilder:validation:Optional
	Conditions []WatcherCondition `json:"conditions"`

	// ObservedGeneration
	// +kubebuilder:validation:Optional
	ObservedGeneration int64 `json:"observedGeneration"`
}

WatcherStatus defines the observed state of Watcher.

func (*WatcherStatus) DeepCopy

func (in *WatcherStatus) DeepCopy() *WatcherStatus

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

func (*WatcherStatus) DeepCopyInto

func (in *WatcherStatus) DeepCopyInto(out *WatcherStatus)

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