Documentation ¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the apps v1alpha1 API group +kubebuilder:object:generate=true +groupName=apps.triton.io
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "apps.triton.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 ApplicationSpec ¶
type ApplicationSpec struct { AppID int `json:"appID"` GroupID int `json:"groupID"` AppName string `json:"appName"` InstanceName string `json:"instanceName"` // Selector is a label query over pods that should match the replica count. // It must match the pod template's labels. // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors Selector *metav1.LabelSelector `json:"selector"` // Template describes the pods that will be created. Template corev1.PodTemplateSpec `json:"template"` // Replicas defines the replicas num of app Replicas *int32 `json:"replicas,omitempty"` // ApplicationType defines the type of app, ex: cloneset, advanced statefulset ApplicationType string `json:"applicationType,omitempty"` // VolumeClaimTemplates is a list of claims that pods are allowed to reference. // Note that PVC will be deleted when its pod has been deleted. VolumeClaimTemplates []corev1.PersistentVolumeClaim `json:"volumeClaimTemplates,omitempty"` // ApplicationLabel defines the label of app ApplicationLabel map[string]string `json:"applicationLabel,omitempty"` }
ApplicationSpec describes the new application state which will be created or updated by a Deploy
func (*ApplicationSpec) DeepCopy ¶
func (in *ApplicationSpec) DeepCopy() *ApplicationSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApplicationSpec.
func (*ApplicationSpec) DeepCopyInto ¶
func (in *ApplicationSpec) DeepCopyInto(out *ApplicationSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type BaseStrategy ¶
type BaseStrategy struct { // Paused indicates that the Deploy should be paused or resumed. // Set true to pause the deploy, false to resume the deploy. Paused *bool `json:"paused,omitempty"` // Canceled indicates that the Deploy should be canceled. // Default value is false Canceled bool `json:"canceled,omitempty"` // number of pods that can be scheduled at a time. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). // Absolute number is calculated from percentage by rounding up. Defaults to the same value with Replicas // Value can be changed during a deploy. If it is changed, .status.batches needs to be calculated again. BatchSize *intstr.IntOrString `json:"batchSize,omitempty"` // Minimum time interval to wait between two batches BatchIntervalSeconds int32 `json:"batchIntervalSeconds,omitempty"` // Deploy mode, candidates are "auto" and "manual", if not set, default to "manual". // "manual" indicates that the DeployFlow is controlled by user, he can make progress by updating "Batches", // "auto" indicates that the DeployFlow will always move forward no matter what "Batches" is. Mode DeployMode `json:"mode,omitempty"` // Batches is the number of batch you want to finish Batches int `json:"batches,omitempty"` }
func (*BaseStrategy) DeepCopy ¶
func (in *BaseStrategy) DeepCopy() *BaseStrategy
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BaseStrategy.
func (*BaseStrategy) DeepCopyInto ¶
func (in *BaseStrategy) DeepCopyInto(out *BaseStrategy)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type BatchCondition ¶
type BatchCondition struct { Batch int `json:"batch"` BatchSize int `json:"batchSize"` Canary bool `json:"canary"` Phase BatchPhase `json:"phase"` FailedReplicas int `json:"failedReplicas"` // +kubebuilder:validation:Optional // +nullable Pods []PodInfo `json:"pods"` // +nullable StartedAt metav1.Time `json:"startedAt,omitempty"` // +nullable PulledInAt metav1.Time `json:"pulledInAt,omitempty"` // +nullable FinishedAt metav1.Time `json:"finishedAt,omitempty"` }
func (*BatchCondition) DeepCopy ¶
func (in *BatchCondition) DeepCopy() *BatchCondition
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BatchCondition.
func (*BatchCondition) DeepCopyInto ¶
func (in *BatchCondition) DeepCopyInto(out *BatchCondition)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type BatchPhase ¶
type BatchPhase string
const ( BatchPending BatchPhase = "Pending" BatchSmoking BatchPhase = "Smoking" BatchSmoked BatchPhase = "Smoked" BatchBaking BatchPhase = "Baking" BatchBaked BatchPhase = "Baked" BatchSmokeFailed BatchPhase = "SmokeFailed" BatchBakeFailed BatchPhase = "BakeFailed" )
type DeployFlow ¶
type DeployFlow struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec DeployFlowSpec `json:"spec,omitempty"` Status DeployFlowStatus `json:"status,omitempty"` }
DeployFlow is the Schema for the deployflows API
func (*DeployFlow) DeepCopy ¶
func (in *DeployFlow) DeepCopy() *DeployFlow
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeployFlow.
func (*DeployFlow) DeepCopyInto ¶
func (in *DeployFlow) DeepCopyInto(out *DeployFlow)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*DeployFlow) DeepCopyObject ¶
func (in *DeployFlow) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type DeployFlowList ¶
type DeployFlowList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []DeployFlow `json:"items"` }
DeployFlowList contains a list of DeployFlow
func (*DeployFlowList) DeepCopy ¶
func (in *DeployFlowList) DeepCopy() *DeployFlowList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeployFlowList.
func (*DeployFlowList) DeepCopyInto ¶
func (in *DeployFlowList) DeepCopyInto(out *DeployFlowList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*DeployFlowList) DeepCopyObject ¶
func (in *DeployFlowList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type DeployFlowSpec ¶
type DeployFlowSpec struct { // Action defines the action of deployflow, ex: create, update, restart, scale... Action string `json:"action"` // Application defines somethings about app to deploy Application *ApplicationSpec `json:"application"` // +nullable UpdateStrategy *DeployUpdateStrategy `json:"updateStrategy,omitempty"` // +nullable NonUpdateStrategy *DeployNonUpdateStrategy `json:"nonUpdateStrategy,omitempty"` }
DeployFlowSpec defines the desired state of DeployFlow
func (*DeployFlowSpec) DeepCopy ¶
func (in *DeployFlowSpec) DeepCopy() *DeployFlowSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeployFlowSpec.
func (*DeployFlowSpec) DeepCopyInto ¶
func (in *DeployFlowSpec) DeepCopyInto(out *DeployFlowSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DeployFlowStatus ¶
type DeployFlowStatus struct { // Replicas is the number of Pods created by the CloneSet controller. Replicas int32 `json:"replicas"` // ReplicasToProcess is the number of Pods which will be created/restarted/deleted in this Deploy. ReplicasToProcess int32 `json:"replicasToProcess"` // AvailableReplicas is the number of Pods created by the CloneSet controller that have a Ready Condition for at least minReadySeconds. AvailableReplicas int32 `json:"availableReplicas"` // UpdatedReplicas is the number of Pods created by the CloneSet controller from the CloneSet version // indicated by updateRevision. UpdatedReplicas int32 `json:"updatedReplicas"` // UpdatedReadyReplicas is the number of Pods created by the CloneSet controller from the CloneSet version // indicated by updateRevision and have a Ready Condition. UpdatedReadyReplicas int32 `json:"updatedReadyReplicas"` // UpdateRevision, if not empty, indicates the latest revision of the CloneSet. UpdateRevision string `json:"updateRevision,omitempty"` // +kubebuilder:validation:Optional // +nullable Conditions []BatchCondition `json:"conditions"` // +kubebuilder:validation:Optional // +nullable Pods []string `json:"pods"` // +kubebuilder:validation:Optional Paused bool `json:"paused"` // +kubebuilder:validation:Optional Phase DeployPhase `json:"phase"` // +kubebuilder:validation:Optional Finished bool `json:"finished"` // +kubebuilder:validation:Optional Batches int `json:"batches"` // +kubebuilder:validation:Optional FinishedBatches int `json:"finishedBatches"` // +kubebuilder:validation:Optional FinishedReplicas int `json:"finishedReplicas"` FailedReplicas int `json:"failedReplicas"` // +nullable StartedAt metav1.Time `json:"startedAt,omitempty"` // +nullable UpdatedAt metav1.Time `json:"updatedAt,omitempty"` // +nullable FinishedAt metav1.Time `json:"finishedAt,omitempty"` }
DeployFlowStatus defines the observed state of DeployFlow
func (*DeployFlowStatus) DeepCopy ¶
func (in *DeployFlowStatus) DeepCopy() *DeployFlowStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeployFlowStatus.
func (*DeployFlowStatus) DeepCopyInto ¶
func (in *DeployFlowStatus) DeepCopyInto(out *DeployFlowStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DeployMode ¶
type DeployMode string
const ( Auto DeployMode = "auto" Manual DeployMode = "manual" )
type DeployNonUpdateStrategy ¶
type DeployNonUpdateStrategy struct { BaseStrategy `json:",inline"` // PodsToDelete is the names of Pod should be deleted. PodsToDelete []string `json:"podsToDelete,omitempty"` }
func (*DeployNonUpdateStrategy) DeepCopy ¶
func (in *DeployNonUpdateStrategy) DeepCopy() *DeployNonUpdateStrategy
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeployNonUpdateStrategy.
func (*DeployNonUpdateStrategy) DeepCopyInto ¶
func (in *DeployNonUpdateStrategy) DeepCopyInto(out *DeployNonUpdateStrategy)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DeployPhase ¶
type DeployPhase string
const ( Pending DeployPhase = "Pending" Initializing DeployPhase = "Initializing" BatchStarted DeployPhase = "BatchStarted" BatchFinished DeployPhase = "BatchFinished" Success DeployPhase = "Success" Failed DeployPhase = "Failed" Aborted DeployPhase = "Aborted" Canceled DeployPhase = "Canceled" )
type DeployUpdateStrategy ¶
type DeployUpdateStrategy struct { BaseStrategy `json:",inline"` // NoPullIn indicates that the pullIn step in batch Baking phase will be skipped, which // means that as long as the pod is ready, traffic from outside will come in. // Default value is false NoPullIn bool `json:"noPullIn,omitempty"` // +kubebuilder:validation:Optional Canary int `json:"canary,omitempty"` // Stage describes the desired stage you want to go to. Stage BatchPhase `json:"stage,omitempty"` }
func (*DeployUpdateStrategy) DeepCopy ¶
func (in *DeployUpdateStrategy) DeepCopy() *DeployUpdateStrategy
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeployUpdateStrategy.
func (*DeployUpdateStrategy) DeepCopyInto ¶
func (in *DeployUpdateStrategy) DeepCopyInto(out *DeployUpdateStrategy)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PodInfo ¶
type PodInfo struct { Name string `json:"name"` IP string `json:"ip"` Port int32 `json:"port"` Phase string `json:"phase"` PullInStatus string `json:"pullInStatus"` }
func (*PodInfo) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodInfo.
func (*PodInfo) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.