v1alpha1

package
v0.0.0-...-48efe9b Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultCatDuration = DurationString((time.Second * 5).String())

	DefaultCatMessage = "hello, world!"

	DefaultCatLives int32 = 9
)
View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "example.cats.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 Cat

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

	Spec   CatSpec   `json:"spec,omitempty"`
	Status CatStatus `json:"status,omitempty"`
}

Cat is the Schema for the cats API

func (*Cat) DeepCopy

func (in *Cat) DeepCopy() *Cat

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

func (*Cat) DeepCopyInto

func (in *Cat) DeepCopyInto(out *Cat)

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

func (*Cat) DeepCopyObject

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

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

func (*Cat) Default

func (c *Cat) Default()

Default implements webhook.Defaulter so a webhook will be registered for the type

func (*Cat) SetupWebhookWithManager

func (r *Cat) SetupWebhookWithManager(mgr ctrl.Manager) error

func (*Cat) ValidateCreate

func (c *Cat) ValidateCreate() error

ValidateCreate implements webhook.Validator so a webhook will be registered for the type

func (*Cat) ValidateDelete

func (r *Cat) ValidateDelete() error

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*Cat) ValidateUpdate

func (c *Cat) ValidateUpdate(old runtime.Object) error

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type

type CatList

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

CatList contains a list of Cat

func (*CatList) DeepCopy

func (in *CatList) DeepCopy() *CatList

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

func (*CatList) DeepCopyInto

func (in *CatList) DeepCopyInto(out *CatList)

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

func (*CatList) DeepCopyObject

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

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

type CatPhase

type CatPhase string
const (
	// CatPhaseRunning indicates that the cat is currently alive
	CatPhaseRunning CatPhase = "Alive"

	// CatPhaseCompleted indicates that the cat finished running
	CatPhaseCompleted

	// CatPhaseError indicates that the cat is at some error state
	CatPhaseError
)

type CatSpec

type CatSpec struct {

	// TotalLives is the total number of times a cat pod will be created.
	// Default is: 9
	TotalLives *int32 `json:"totalLives,omitempty"`

	// Message is what the cat would say. Default is "hello, world!"
	Message *string `json:"message,omitempty"`

	// Duration the total duration per life. Default is 5s
	Duration *DurationString `json:"duration,omitempty"`
}

CatSpec defines the desired state of Cat

func (*CatSpec) DeepCopy

func (in *CatSpec) DeepCopy() *CatSpec

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

func (*CatSpec) DeepCopyInto

func (in *CatSpec) DeepCopyInto(out *CatSpec)

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

type CatStatus

type CatStatus struct {
	// LastCatPodName is the name of the last pod that was created by this cat
	LastCatPodName string `json:"lastCatPodName,omitempty"`

	// LastCatPodFinishedTime the time the last cat pod completed
	LastCatPodFinishedTime metav1.Time `json:"lastCatPodFinishedTime,omitempty"`

	// LastCatPodPhase last pod phase
	LastCatPodPhase v1.PodPhase `json:"lastCatPodPhase,omitempty"`

	// Phase the current phase of the cat
	Phase CatPhase `json:"phase,omitempty"`

	// Message is a description of the current phase
	Message string `json:"message,omitempty"`

	// CurrentLife the current life number
	CurrentLife int32 `json:"currentLife,omitempty"`
}

CatStatus defines the observed state of Cat

func (*CatStatus) DeepCopy

func (in *CatStatus) DeepCopy() *CatStatus

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

func (*CatStatus) DeepCopyInto

func (in *CatStatus) DeepCopyInto(out *CatStatus)

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

type DurationString

type DurationString string

Jump to

Keyboard shortcuts

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