v1beta1

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// SchemeBuilder registers the addKnownTypes function.
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
	// AddToScheme applies all the stored functions to the scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: policy.DuckGroupName, Version: "v1beta1"}

SchemeGroupVersion is group version used to register these objects

Functions

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

func WithPodScalableDefaulter

func WithPodScalableDefaulter(ctx context.Context, psd PodScalableDefaulter) context.Context

func WithPodScalableValidator

func WithPodScalableValidator(ctx context.Context, psv PodScalableValidator) context.Context

Types

type PodScalable

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

	Spec   PodScalableSpec   `json:"spec"`
	Status PodScalableStatus `json:"status"`
}

PodScalable is a duck type that the are PodSpecable but also can scale. These are used to validate resources that can be modified to scale down even if they contain invalid images.

func (*PodScalable) DeepCopy

func (in *PodScalable) DeepCopy() *PodScalable

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

func (*PodScalable) DeepCopyInto

func (in *PodScalable) DeepCopyInto(out *PodScalable)

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

func (*PodScalable) DeepCopyObject

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

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

func (*PodScalable) GetFullType

func (*PodScalable) GetFullType() duck.Populatable

GetFullType implements duck.Implementable

func (*PodScalable) GetListType

func (*PodScalable) GetListType() runtime.Object

GetListType implements apis.Listable

func (*PodScalable) IsScalingDown

func (ps *PodScalable) IsScalingDown(ctx context.Context) bool

IsScalingDown returns true if PodScalable is being scaled down

func (*PodScalable) Populate

func (ps *PodScalable) Populate()

Populate implements duck.Populatable

func (*PodScalable) SetDefaults

func (ps *PodScalable) SetDefaults(ctx context.Context)

SetDefaults implements apis.Defaultable

func (*PodScalable) Validate

func (ps *PodScalable) Validate(ctx context.Context) *apis.FieldError

Validate implements apis.Validatable

type PodScalableDefaulter

type PodScalableDefaulter func(context.Context, *PodScalable)

PodScalableDefaulter is a callback to validate a PodScalable.

func GetPodScalableDefaulter

func GetPodScalableDefaulter(ctx context.Context) PodScalableDefaulter

GetPodScalableDefaulter extracts the PodScalableDefaulter from the context.

type PodScalableList

type PodScalableList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`

	Items []PodScalable `json:"items"`
}

PodScalableList is a list of PodScalable resources

func (*PodScalableList) DeepCopy

func (in *PodScalableList) DeepCopy() *PodScalableList

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

func (*PodScalableList) DeepCopyInto

func (in *PodScalableList) DeepCopyInto(out *PodScalableList)

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

func (*PodScalableList) DeepCopyObject

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

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

type PodScalableSpec

type PodScalableSpec struct {
	Replicas *int32                 `json:"replicas,omitempty"`
	Selector *metav1.LabelSelector  `json:"selector"`
	Template corev1.PodTemplateSpec `json:"template"`
}

PodScalableSpec is the specification for the desired state of a PodScalable (or at least our shared portion).

func (*PodScalableSpec) DeepCopy

func (in *PodScalableSpec) DeepCopy() *PodScalableSpec

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

func (*PodScalableSpec) DeepCopyInto

func (in *PodScalableSpec) DeepCopyInto(out *PodScalableSpec)

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

type PodScalableStatus

type PodScalableStatus struct {
	Replicas int32 `json:"replicas,omitempty"`
}

PodScalableStatus is the observed state of a PodScalable (or at least our shared portion).

func (*PodScalableStatus) DeepCopy

func (in *PodScalableStatus) DeepCopy() *PodScalableStatus

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

func (*PodScalableStatus) DeepCopyInto

func (in *PodScalableStatus) DeepCopyInto(out *PodScalableStatus)

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

type PodScalableValidator

type PodScalableValidator func(context.Context, *PodScalable) *apis.FieldError

PodScalableValidator is a callback to validate a PodScalable.

func GetPodScalableValidator

func GetPodScalableValidator(ctx context.Context) PodScalableValidator

GetPodScalableValidator extracts the PodSpecValidator from the context.

Jump to

Keyboard shortcuts

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