v1alpha1

package
v0.0.0-...-d8faefa Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the cd v1alpha1 API group +kubebuilder:object:generate=true +groupName=cd.org.smart

Index

Constants

This section is empty.

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "cd.org.smart", 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 Canary

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

	Spec   CanarySpec   `json:"spec,omitempty"`
	Status CanaryStatus `json:"status,omitempty"`
}

Canary is the Schema for the canaries API

func (*Canary) DeepCopy

func (in *Canary) DeepCopy() *Canary

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

func (*Canary) DeepCopyInto

func (in *Canary) DeepCopyInto(out *Canary)

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

func (*Canary) DeepCopyObject

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

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

func (*Canary) Default

func (r *Canary) Default()

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

func (*Canary) IsPaused

func (r *Canary) IsPaused() bool

func (*Canary) SetupWebhookWithManager

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

func (*Canary) ValidateCreate

func (r *Canary) ValidateCreate() error

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

func (*Canary) ValidateDelete

func (r *Canary) ValidateDelete() error

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

func (*Canary) ValidateUpdate

func (r *Canary) ValidateUpdate(old runtime.Object) error

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

type CanaryList

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

CanaryList contains a list of Canary

func (*CanaryList) DeepCopy

func (in *CanaryList) DeepCopy() *CanaryList

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

func (*CanaryList) DeepCopyInto

func (in *CanaryList) DeepCopyInto(out *CanaryList)

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

func (*CanaryList) DeepCopyObject

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

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

type CanarySpec

type CanarySpec struct {

	// Foo is an example field of Canary. Edit canary_types.go to remove/update
	// Number of desired pods. This is a pointer to distinguish between explicit
	// zero and not specified. Defaults to 1.
	// +optional
	Replicas *int32 `json:"replicas,omitempty" protobuf:"varint,1,opt,name=replicas"`

	// Label selector for pods. Existing ReplicaSets whose pods are
	// selected by this will be the ones affected by this deployment.
	// It must match the pod template's labels.
	Selector *metav1.LabelSelector `json:"selector" protobuf:"bytes,2,opt,name=selector"`

	// Template describes the pods that will be created.
	Template SmartPodTemplateSpec `json:"template" protobuf:"bytes,3,opt,name=template"`

	// The deployment strategy to use to replace existing pods with new ones.
	// +optional
	// +patchStrategy=retainKeys
	Strategy DeploymentStrategy `json:"strategy,omitempty" patchStrategy:"retainKeys" protobuf:"bytes,4,opt,name=strategy"`

	// Minimum number of seconds for which a newly created pod should be ready
	// without any of its container crashing, for it to be considered available.
	// Defaults to 0 (pod will be considered available as soon as it is ready)
	// +optional
	MinReadySeconds int32 `json:"minReadySeconds,omitempty" protobuf:"varint,5,opt,name=minReadySeconds"`

	// The number of old ReplicaSets to retain to allow rollback.
	// This is a pointer to distinguish between explicit zero and not specified.
	// Defaults to 10.
	// +optional
	RevisionHistoryLimit *int32 `json:"revisionHistoryLimit,omitempty" protobuf:"varint,6,opt,name=revisionHistoryLimit"`

	// The maximum time in seconds for a deployment to make progress before it
	// is considered to be failed. The deployment controller will continue to
	// process failed deployments and a condition with a ProgressDeadlineExceeded
	// reason will be surfaced in the deployment status. Note that progress will
	// not be estimated during the time a deployment is paused. Defaults to 600s.
	ProgressDeadlineSeconds *int32 `json:"progressDeadlineSeconds,omitempty" protobuf:"varint,9,opt,name=progressDeadlineSeconds"`
}

EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN! NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized. CanarySpec defines the desired state of Canary

func (*CanarySpec) DeepCopy

func (in *CanarySpec) DeepCopy() *CanarySpec

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

func (*CanarySpec) DeepCopyInto

func (in *CanarySpec) DeepCopyInto(out *CanarySpec)

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

type CanaryStatus

type CanaryStatus struct {
	// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
	// Important: Run "make" to regenerate code after modifying this file
	CanaryReplicasSize    int32  `json:"canaryReplicasSize,omitempty"`
	StableReplicasSize    int32  `json:"stableReplicasSize,omitempty"`
	OldStableReplicasSize int32  `json:"old_stable_replicas_size,omitempty"`
	CanaryTraffic         string `json:"canary-traffic,omitempty"`
	Scaling               bool   `json:"scaling,omitempty"`
}

CanaryStatus defines the observed state of Canary

func (*CanaryStatus) DeepCopy

func (in *CanaryStatus) DeepCopy() *CanaryStatus

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

func (*CanaryStatus) DeepCopyInto

func (in *CanaryStatus) DeepCopyInto(out *CanaryStatus)

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

type DeploymentStrategy

type DeploymentStrategy struct {
	// Type of deployment. Can be "Recreate" or "RollingUpdate". Default is RollingUpdate.
	// +optional
	Type appsv1.DeploymentStrategyType `json:"type,omitempty" protobuf:"bytes,1,opt,name=type,casttype=DeploymentStrategyType"`

	// Rolling update config params. Present only if DeploymentStrategyType =
	// RollingUpdate.
	//---
	// TODO: Update this to follow our convention for oneOf, whatever we decide it
	// to be.
	// +optional
	RollingUpdate *appsv1.RollingUpdateDeployment `json:"rollingUpdate,omitempty" protobuf:"bytes,2,opt,name=rollingUpdate"`
	// +kubebuilder:validation:Pattern:=`^(0(\.\d{1,2})?|1(\.0{1,2})?)$`
	PodWeight     string              `json:"podWeight,omitempty"`
	Traffic       Traffic             `json:"traffic,omitempty"`
	ScaleInterval *intstr.IntOrString `json:"scaleTime,omitempty"`
}

func (*DeploymentStrategy) DeepCopy

func (in *DeploymentStrategy) DeepCopy() *DeploymentStrategy

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

func (*DeploymentStrategy) DeepCopyInto

func (in *DeploymentStrategy) DeepCopyInto(out *DeploymentStrategy)

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

type SmartObjectMeta

type SmartObjectMeta struct {
	// Map of string keys and values that can be used to organize and categorize
	// (scope and select) objects. May match selectors of replication controllers
	// and services.
	// More info: http://kubernetes.io/docs/user-guide/labels
	// +optional
	Labels map[string]string `json:"labels,omitempty" protobuf:"bytes,11,rep,name=labels"`

	// Annotations is an unstructured key value map stored with a resource that may be
	// set by external tools to store and retrieve arbitrary metadata. They are not
	// queryable and should be preserved when modifying objects.
	// More info: http://kubernetes.io/docs/user-guide/annotations
	// +optional
	Annotations map[string]string `json:"annotations,omitempty" protobuf:"bytes,12,rep,name=annotations"`
}

func (*SmartObjectMeta) DeepCopy

func (in *SmartObjectMeta) DeepCopy() *SmartObjectMeta

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

func (*SmartObjectMeta) DeepCopyInto

func (in *SmartObjectMeta) DeepCopyInto(out *SmartObjectMeta)

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

type SmartPodTemplateSpec

type SmartPodTemplateSpec struct {
	Metadata SmartObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`

	// Specification of the desired behavior of the pod.
	// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
	// +optional
	Spec v1.PodSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
}

func (*SmartPodTemplateSpec) DeepCopy

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

func (*SmartPodTemplateSpec) DeepCopyInto

func (in *SmartPodTemplateSpec) DeepCopyInto(out *SmartPodTemplateSpec)

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

type Traffic

type Traffic struct {
	// +kubebuilder:validation:Pattern:=`^(0(\.\d{1,2})?|1(\.0{1,2})?)$`
	Weight string `json:"weight,omitempty"`
	// +kubebuilder:validation:Enum:=istio;nginx;traefik
	TType string `json:"type,omitempty"`

	Host string `json:"host,omitempty"`
}

func (*Traffic) DeepCopy

func (in *Traffic) DeepCopy() *Traffic

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

func (*Traffic) DeepCopyInto

func (in *Traffic) DeepCopyInto(out *Traffic)

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
JackTT - Gopher 🇻🇳