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 ¶
- Variables
- type Cat
- func (in *Cat) DeepCopy() *Cat
- func (in *Cat) DeepCopyInto(out *Cat)
- func (in *Cat) DeepCopyObject() runtime.Object
- func (c *Cat) Default()
- func (r *Cat) SetupWebhookWithManager(mgr ctrl.Manager) error
- func (c *Cat) ValidateCreate() error
- func (r *Cat) ValidateDelete() error
- func (c *Cat) ValidateUpdate(old runtime.Object) error
- type CatList
- type CatPhase
- type CatSpec
- type CatStatus
- type DurationString
Constants ¶
This section is empty.
Variables ¶
var ( DefaultCatDuration = DurationString((time.Second * 5).String()) DefaultCatMessage = "hello, world!" DefaultCatLives int32 = 9 )
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Cat.
func (*Cat) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Cat) DeepCopyObject ¶
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) ValidateCreate ¶
ValidateCreate implements webhook.Validator so a webhook will be registered for the type
func (*Cat) ValidateDelete ¶
ValidateDelete 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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CatList.
func (*CatList) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*CatList) DeepCopyObject ¶
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CatSpec.
func (*CatSpec) DeepCopyInto ¶
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CatStatus.
func (*CatStatus) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DurationString ¶
type DurationString string