v1alpha1

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2024 License: Apache-2.0 Imports: 12 Imported by: 10

Documentation

Overview

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

Index

Constants

View Source
const (
	DefaultWebhookInterval = int64(5)
	DefaultWebhookTimeout  = int64(60)
)
View Source
const (
	PodAvailableConditionsAnnotation = "pod.kusionstack.io/available-conditions" // indicate the available conditions of a pod

	LastPodStatusAnnotationKey = "collaset.kusionstack.io/last-pod-status"
)
View Source
const (
	AnnotationPodSkipRuleConditions         = "podtransitionrule.kusionstack.io/skip-rule-conditions"
	AnnotationPodTransitionRuleDetailPrefix = "detail.podtransitionrule.kusionstack.io"
)

PodTransitionRule Annotation

View Source
const (
	ControlledByKusionStackLabelKey = "kusionstack.io/control"

	PodOperatingLabelPrefix           = "operating.podopslifecycle.kusionstack.io"            // indicate a pod is operating
	PodOperationTypeLabelPrefix       = "operation-type.podopslifecycle.kusionstack.io"       // indicate the type of operation
	PodOperationPermissionLabelPrefix = "operation-permission.podopslifecycle.kusionstack.io" // indicate the permission of operation
	PodUndoOperationTypeLabelPrefix   = "undo-operation-type.podopslifecycle.kusionstack.io"  // indicate the type of operation has been canceled
	PodDoneOperationTypeLabelPrefix   = "done-operation-type.podopslifecycle.kusionstack.io"  // indicate the type of operation has been done

	PodPreCheckLabelPrefix    = "pre-check.podopslifecycle.kusionstack.io"    // indicate a pod is in pre-check phase
	PodPreCheckedLabelPrefix  = "pre-checked.podopslifecycle.kusionstack.io"  // indicate a pod has finished pre-check phase
	PodPreparingLabelPrefix   = "preparing.podopslifecycle.kusionstack.io"    // indicate a pod is preparing for operation
	PodOperateLabelPrefix     = "operate.podopslifecycle.kusionstack.io"      // indicate a pod is in operate phase
	PodOperatedLabelPrefix    = "operated.podopslifecycle.kusionstack.io"     // indicate a pod has finished operate phase
	PodPostCheckLabelPrefix   = "post-check.podopslifecycle.kusionstack.io"   // indicate a pod is in post-check phase
	PodPostCheckedLabelPrefix = "post-checked.podopslifecycle.kusionstack.io" // indicate a pod has finished post-check phase
	PodCompletingLabelPrefix  = "completing.podopslifecycle.kusionstack.io"   // indicate a pod is completing operation

	PodServiceAvailableLabel      = "podopslifecycle.kusionstack.io/service-available" // indicate a pod is available to serve
	PodDeletionIndicationLabelKey = "podopslifecycle.kusionstack.io/to-delete"         // users can use this label to indicate a pod to delete

	PodInstanceIDLabelKey = "collaset.kusionstack.io/instance-id" // used to attach Pod instance ID on Pod
)

pod ops lifecyle labels

View Source
const (
	PodOpsLifecyclePreCheckStage  = "PreCheck"
	PodOpsLifecyclePostCheckStage = "PostCheck"
)

well known variables

View Source
const (
	CollaSetUpdateIndicateLabelKey = "collaset.kusionstack.io/update-included"
)
View Source
const (
	DefaultImageTag = "latest"
)
View Source
const (
	PodOperationProtectionFinalizerPrefix = "prot.podopslifecycle.kusionstack.io"
)

well known finalizer

View Source
const (
	ReadinessGatePodServiceReady = "pod.kusionstack.io/service-ready"
)

well known readiness gate

Variables

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

func ParseImageName

func ParseImageName(image string) (string, string, string, error)

ParseImageName parses a docker image string into three parts: repo, tag and digest. If both tag and digest are empty, a default image tag will be returned.

func SetDefaults_AzureDiskVolumeSource

func SetDefaults_AzureDiskVolumeSource(obj *corev1.AzureDiskVolumeSource)

func SetDefaults_ConfigMap

func SetDefaults_ConfigMap(obj *corev1.ConfigMap)

func SetDefaults_ConfigMapVolumeSource

func SetDefaults_ConfigMapVolumeSource(obj *corev1.ConfigMapVolumeSource)

func SetDefaults_Container

func SetDefaults_Container(obj *corev1.Container)

func SetDefaults_ContainerPort

func SetDefaults_ContainerPort(obj *corev1.ContainerPort)

func SetDefaults_DownwardAPIVolumeSource

func SetDefaults_DownwardAPIVolumeSource(obj *corev1.DownwardAPIVolumeSource)

func SetDefaults_Endpoints

func SetDefaults_Endpoints(obj *corev1.Endpoints)

func SetDefaults_HTTPGetAction

func SetDefaults_HTTPGetAction(obj *corev1.HTTPGetAction)

func SetDefaults_HostPathVolumeSource

func SetDefaults_HostPathVolumeSource(obj *corev1.HostPathVolumeSource)

func SetDefaults_ISCSIPersistentVolumeSource

func SetDefaults_ISCSIPersistentVolumeSource(obj *corev1.ISCSIPersistentVolumeSource)

func SetDefaults_ISCSIVolumeSource

func SetDefaults_ISCSIVolumeSource(obj *corev1.ISCSIVolumeSource)

func SetDefaults_LimitRangeItem

func SetDefaults_LimitRangeItem(obj *corev1.LimitRangeItem)

func SetDefaults_NamespaceStatus

func SetDefaults_NamespaceStatus(obj *corev1.NamespaceStatus)

func SetDefaults_ObjectFieldSelector

func SetDefaults_ObjectFieldSelector(obj *corev1.ObjectFieldSelector)

func SetDefaults_PodSpec

func SetDefaults_PodSpec(podSpec *corev1.PodSpec)

func SetDefaults_PodSpecConfig

func SetDefaults_PodSpecConfig(obj *corev1.PodSpec)

func SetDefaults_Probe

func SetDefaults_Probe(obj *corev1.Probe)

func SetDefaults_ProjectedVolumeSource

func SetDefaults_ProjectedVolumeSource(obj *corev1.ProjectedVolumeSource)

func SetDefaults_RBDPersistentVolumeSource

func SetDefaults_RBDPersistentVolumeSource(obj *corev1.RBDPersistentVolumeSource)

func SetDefaults_RBDVolumeSource

func SetDefaults_RBDVolumeSource(obj *corev1.RBDVolumeSource)

func SetDefaults_ResourceList

func SetDefaults_ResourceList(obj *corev1.ResourceList)

func SetDefaults_ScaleIOPersistentVolumeSource

func SetDefaults_ScaleIOPersistentVolumeSource(obj *corev1.ScaleIOPersistentVolumeSource)

func SetDefaults_ScaleIOVolumeSource

func SetDefaults_ScaleIOVolumeSource(obj *corev1.ScaleIOVolumeSource)

func SetDefaults_Secret

func SetDefaults_Secret(obj *corev1.Secret)

func SetDefaults_SecretVolumeSource

func SetDefaults_SecretVolumeSource(obj *corev1.SecretVolumeSource)

func SetDefaults_ServiceAccountTokenProjection

func SetDefaults_ServiceAccountTokenProjection(obj *corev1.ServiceAccountTokenProjection)

func SetDefaults_Volume

func SetDefaults_Volume(obj *corev1.Volume)

Types

type AvailableRule

type AvailableRule struct {
	// MaxUnavailableValue is the expected max unavailable replicas which is allowed to be a integer or a percentage of the whole
	// number of the target resources.
	MaxUnavailableValue *intstr.IntOrString `json:"maxUnavailableValue,omitempty"`

	// MinAvailableValue is the expected min available replicas which is allowed to be a integer or a percentage of the whole
	// number of the target resources.
	MinAvailableValue *intstr.IntOrString `json:"minAvailableValue,omitempty"`
}

func (*AvailableRule) DeepCopy

func (in *AvailableRule) DeepCopy() *AvailableRule

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

func (*AvailableRule) DeepCopyInto

func (in *AvailableRule) DeepCopyInto(out *AvailableRule)

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

type ByLabel

type ByLabel struct {
}

func (*ByLabel) DeepCopy

func (in *ByLabel) DeepCopy() *ByLabel

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

func (*ByLabel) DeepCopyInto

func (in *ByLabel) DeepCopyInto(out *ByLabel)

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

type ByPartition

type ByPartition struct {
	// Partition controls the update progress by indicating how many pods should be updated.
	// Defaults to nil (all pods will be updated)
	// +optional
	Partition *int32 `json:"partition,omitempty"`
}

func (*ByPartition) DeepCopy

func (in *ByPartition) DeepCopy() *ByPartition

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

func (*ByPartition) DeepCopyInto

func (in *ByPartition) DeepCopyInto(out *ByPartition)

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

type ClientConfig

type ClientConfig struct {
	// `url` gives the location of the webhook, in standard URL form
	// (`scheme://host:port/path`). Exactly one of `url` or `service`
	// must be specified.
	URL string `json:"url"`

	// `caBundle` is a PEM encoded CA bundle which will be used to validate the webhook's server certificate.
	// If unspecified, system trust roots on the apiserver are used. After Base64.
	// +optional
	CABundle string `json:"caBundle,omitempty"`

	// interval give the request time interval, default 5s
	// +optional
	IntervalSeconds *int64 `json:"intervalSeconds,omitempty"`

	// timeout give the request time timeout, default 60s
	// +optional
	TraceTimeoutSeconds *int64 `json:"traceTimeoutSeconds,omitempty"`
}

func (*ClientConfig) DeepCopy

func (in *ClientConfig) DeepCopy() *ClientConfig

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

func (*ClientConfig) DeepCopyInto

func (in *ClientConfig) DeepCopyInto(out *ClientConfig)

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

type CollaSet

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

	Spec   CollaSetSpec   `json:"spec,omitempty"`
	Status CollaSetStatus `json:"status,omitempty"`
}

CollaSet is the Schema for the collasets API +k8s:openapi-gen=true +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +kubebuilder:resource:shortName=cls +kubebuilder:subresource:status +kubebuilder:printcolumn:name="DESIRED",type="integer",JSONPath=".spec.replicas",description="The desired number of pods." +kubebuilder:printcolumn:name="CURRENT",type="integer",JSONPath=".status.replicas",description="The number of currently all pods." +kubebuilder:printcolumn:name="AVAILABLE",type="integer",JSONPath=".status.availableReplicas",description="The number of pods available." +kubebuilder:printcolumn:name="UPDATED",type="integer",JSONPath=".status.updatedReplicas",description="The number of pods updated." +kubebuilder:printcolumn:name="UPDATED_READY",type="integer",JSONPath=".status.updatedReadyReplicas",description="The number of pods ready." +kubebuilder:printcolumn:name="UPDATED_AVAILABLE",type="integer",JSONPath=".status.updatedAvailableReplicas",description="The number of pods updated available." +kubebuilder:printcolumn:name="CURRENT_REVISION",type="string",JSONPath=".status.currentRevision",description="The current revision." +kubebuilder:printcolumn:name="UPDATED_REVISION",type="string",JSONPath=".status.updatedRevision",description="The updated revision." +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" +resource:path=collasets

func (*CollaSet) DeepCopy

func (in *CollaSet) DeepCopy() *CollaSet

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

func (*CollaSet) DeepCopyInto

func (in *CollaSet) DeepCopyInto(out *CollaSet)

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

func (*CollaSet) DeepCopyObject

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

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

type CollaSetCondition

type CollaSetCondition struct {
	// Type of in place set condition.
	Type CollaSetConditionType `json:"type,omitempty"`

	// Status of the condition, one of True, False, Unknown.
	Status corev1.ConditionStatus `json:"status,omitempty"`

	// Last time the condition transitioned from one status to another.
	LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"`

	// The reason for the condition's last transition.
	Reason string `json:"reason,omitempty"`

	// A human readable message indicating details about the transition.
	Message string `json:"message,omitempty"`
}

func (*CollaSetCondition) DeepCopy

func (in *CollaSetCondition) DeepCopy() *CollaSetCondition

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

func (*CollaSetCondition) DeepCopyInto

func (in *CollaSetCondition) DeepCopyInto(out *CollaSetCondition)

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

type CollaSetConditionType

type CollaSetConditionType string
const (
	CollaSetScale  CollaSetConditionType = "Scale"
	CollaSetUpdate CollaSetConditionType = "Update"
)

type CollaSetList

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

CollaSetList contains a list of CollaSet

func (*CollaSetList) DeepCopy

func (in *CollaSetList) DeepCopy() *CollaSetList

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

func (*CollaSetList) DeepCopyInto

func (in *CollaSetList) DeepCopyInto(out *CollaSetList)

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

func (*CollaSetList) DeepCopyObject

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

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

type CollaSetSpec

type CollaSetSpec struct {
	// Indicates that the scaling and updating is paused and will not be processed by the
	// CollaSet controller.
	// +optional
	Paused bool `json:"paused,omitempty"`
	// Replicas is the desired number of replicas of the given Template.
	// These are replicas in the sense that they are instantiations of the
	// same Template, but individual replicas also have a consistent identity.
	// If unspecified, defaults to 0.
	// +optional
	Replicas *int32 `json:"replicas,omitempty"`

	// Selector is a label query over pods that should match the replica count.
	// It must match the pod template's labels.
	Selector *metav1.LabelSelector `json:"selector,omitempty"`

	// Template is the object that describes the pod that will be created if
	// insufficient replicas are detected. Each pod stamped out by the CollaSet
	// will fulfill this Template, but have a unique identity from the rest
	// of the CollaSet.
	// +kubebuilder:pruning:PreserveUnknownFields
	// +kubebuilder:validation:Schemaless
	Template corev1.PodTemplateSpec `json:"template,omitempty"`

	// VolumeClaimTemplates is a list of claims that pods are allowed to reference.
	// The StatefulSet controller is responsible for mapping network identities to
	// claims in a way that maintains the identity of a pod. Every claim in
	// this list must have at least one matching (by name) volumeMount in one
	// container in the template. A claim in this list takes precedence over
	// any volumes in the template, with the same name.
	// +optional
	VolumeClaimTemplates []corev1.PersistentVolumeClaim `json:"volumeClaimTemplates,omitempty"`

	// UpdateStrategy indicates the CollaSetUpdateStrategy that will be
	// employed to update Pods in the CollaSet when a revision is made to
	// Template.
	// +optional
	UpdateStrategy UpdateStrategy `json:"updateStrategy,omitempty"`

	// ScaleStrategy indicates the strategy detail that will be used during pod scaling.
	// +optional
	ScaleStrategy ScaleStrategy `json:"scaleStrategy,omitempty"`

	// Indicate the number of histories to be conserved
	// If unspecified, defaults to 20
	// +optional
	HistoryLimit int32 `json:"historyLimit,omitempty"`
}

CollaSetSpec defines the desired state of CollaSet

func (*CollaSetSpec) DeepCopy

func (in *CollaSetSpec) DeepCopy() *CollaSetSpec

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

func (*CollaSetSpec) DeepCopyInto

func (in *CollaSetSpec) DeepCopyInto(out *CollaSetSpec)

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

type CollaSetStatus

type CollaSetStatus struct {
	// ObservedGeneration is the most recent generation observed for this CollaSet. It corresponds to the
	// CollaSet's generation, which is updated on mutation by the API Server.
	// +optional
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`

	// CurrentRevision, if not empty, indicates the version of the CollaSet.
	// +optional
	CurrentRevision string `json:"currentRevision,omitempty"`

	// UpdatedRevision, if not empty, indicates the version of the CollaSet currently updated.
	// +optional
	UpdatedRevision string `json:"updatedRevision,omitempty"`

	// Count of hash collisions for the CollaSet. The CollaSet controller
	// uses this field as a collision avoidance mechanism when it needs to
	// create the name for the newest ControllerRevision.
	// +optional
	CollisionCount *int32 `json:"collisionCount,omitempty"`

	// the number of scheduled replicas for the CollaSet.
	// +optional
	ScheduledReplicas int32 `json:"scheduledReplicas,omitempty"`

	// ReadyReplicas indicates the number of the pod with ready condition
	// +optional
	ReadyReplicas int32 `json:"readyReplicas,omitempty"`

	// The number of available replicas (ready for at least minReadySeconds) for this replica set.
	// +optional
	AvailableReplicas int32 `json:"availableReplicas,omitempty"`

	// Replicas is the most recently observed number of replicas.
	// +optional
	Replicas int32 `json:"replicas,omitempty"`

	// The number of pods in updated version.
	// +optional
	UpdatedReplicas int32 `json:"updatedReplicas,omitempty"`

	// OperatingReplicas indicates the number of pods during pod ops lifecycle and not finish update-phase.
	// +optional
	OperatingReplicas int32 `json:"operatingReplicas,omitempty"`

	// UpdatedReadyReplicas indicates the number of the pod with updated revision and ready condition
	// +optional
	UpdatedReadyReplicas int32 `json:"updatedReadyReplicas,omitempty"`

	// UpdatedAvailableReplicas indicates the number of available updated revision replicas for this CollaSet.
	// A pod is updated available means the pod is ready for updated revision and accessible
	// +optional
	UpdatedAvailableReplicas int32 `json:"updatedAvailableReplicas,omitempty"`

	// Represents the latest available observations of a CollaSet's current state.
	// +optional
	Conditions []CollaSetCondition `json:"conditions,omitempty"`
}

CollaSetStatus defines the observed state of CollaSet

func (*CollaSetStatus) DeepCopy

func (in *CollaSetStatus) DeepCopy() *CollaSetStatus

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

func (*CollaSetStatus) DeepCopyInto

func (in *CollaSetStatus) DeepCopyInto(out *CollaSetStatus)

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

type ContextDetail

type ContextDetail struct {
	ID   int               `json:"id"`
	Data map[string]string `json:"data,omitempty"`
}

func (*ContextDetail) Contains

func (cd *ContextDetail) Contains(key, value string) bool

Contains is used to check whether the key-value pair in contained in Data.

func (*ContextDetail) DeepCopy

func (in *ContextDetail) DeepCopy() *ContextDetail

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

func (*ContextDetail) DeepCopyInto

func (in *ContextDetail) DeepCopyInto(out *ContextDetail)

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

func (*ContextDetail) Put

func (cd *ContextDetail) Put(key, value string)

Put is used to specify the value with the specified key in Data .

func (*ContextDetail) Remove

func (cd *ContextDetail) Remove(key string)

Remove is used to remove the specified key from Data .

type Detail

type Detail struct {
	Name        string       `json:"name,omitempty"`
	Stage       string       `json:"stage,omitempty"`
	Passed      bool         `json:"passed"`
	PassedRules []string     `json:"passedRules,omitempty"`
	RejectInfo  []RejectInfo `json:"rejectInfo,omitempty"`
}

func (*Detail) DeepCopy

func (in *Detail) DeepCopy() *Detail

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

func (*Detail) DeepCopyInto

func (in *Detail) DeepCopyInto(out *Detail)

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

type FailurePolicyType

type FailurePolicyType string

FailurePolicyType specifies the type of failure policy

const (
	// Ignore means that an error calling the webhook is ignored.
	Ignore FailurePolicyType = "Ignore"
	// Fail means that an error calling the webhook causes the admission to fail.
	Fail FailurePolicyType = "Fail"
)

type ItemStatus

type ItemStatus struct {
	// Name representing the name of pod
	Name string `json:"name,omitempty"`

	// WebhookChecked representing the pod has pass check
	WebhookChecked bool `json:"webhookChecked"`

	// TraceId representing async request traceId
	TraceId string `json:"traceId,omitempty"`
}

ItemStatus defines async request info of resources

func (*ItemStatus) DeepCopy

func (in *ItemStatus) DeepCopy() *ItemStatus

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

func (*ItemStatus) DeepCopyInto

func (in *ItemStatus) DeepCopyInto(out *ItemStatus)

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

type LabelCheckRule

type LabelCheckRule struct {
	// Requires is the expected labels on pods
	Requires *metav1.LabelSelector `json:"requires"`
}

func (*LabelCheckRule) DeepCopy

func (in *LabelCheckRule) DeepCopy() *LabelCheckRule

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

func (*LabelCheckRule) DeepCopyInto

func (in *LabelCheckRule) DeepCopyInto(out *LabelCheckRule)

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

type Parameter

type Parameter struct {
	// Key is the parameter key.
	Key string `json:"key,omitempty"`

	// Value is the string value of this parameter.
	// Defaults to "".
	// +optional
	Value string `json:"value,omitempty"`

	// Source for the parameter's value. Cannot be used if value is not empty.
	// +optional
	ValueFrom *ParameterSource `json:"valueFrom,omitempty"`
}

func (*Parameter) DeepCopy

func (in *Parameter) DeepCopy() *Parameter

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

func (*Parameter) DeepCopyInto

func (in *Parameter) DeepCopyInto(out *Parameter)

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

type ParameterSource

type ParameterSource struct {

	// Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations,
	// spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP.
	// +optional
	FieldRef *corev1.ObjectFieldSelector `json:"fieldRef,omitempty"`
}

func (*ParameterSource) DeepCopy

func (in *ParameterSource) DeepCopy() *ParameterSource

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

func (*ParameterSource) DeepCopyInto

func (in *ParameterSource) DeepCopyInto(out *ParameterSource)

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

type PersistentVolumeClaimRetentionPolicy

type PersistentVolumeClaimRetentionPolicy struct {
	// WhenDeleted specifies what happens to PVCs created from CollaSet
	// VolumeClaimTemplates when the CollaSet is deleted. The default policy
	// of `Delete` policy causes those PVCs to be deleted.
	//`Retain` causes PVCs to not be affected by StatefulSet deletion. The
	// +optional
	WhenDeleted PersistentVolumeClaimRetentionPolicyType `json:"whenDeleted,omitempty"`

	// WhenScaled specifies what happens to PVCs created from StatefulSet
	// VolumeClaimTemplates when the StatefulSet is scaled down. The default
	// policy of `Retain` causes PVCs to not be affected by a scaledown. The
	// `Delete` policy causes the associated PVCs for any excess pods above
	// the replica count to be deleted.
	// +optional
	WhenScaled PersistentVolumeClaimRetentionPolicyType `json:"whenScaled,omitempty"`
}

func (*PersistentVolumeClaimRetentionPolicy) DeepCopy

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

func (*PersistentVolumeClaimRetentionPolicy) DeepCopyInto

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

type PersistentVolumeClaimRetentionPolicyType

type PersistentVolumeClaimRetentionPolicyType string

PersistentVolumeClaimRetentionPolicyType is a string enumeration of the policies that will determine which action will be applied on volumes from the VolumeClaimTemplates when the CollaSet is deleted or scaled down.

const (
	// RetainPersistentVolumeClaimRetentionPolicyType specifies that
	// PersistentVolumeClaims associated with CollaSet VolumeClaimTemplates
	// will not be deleted.
	RetainPersistentVolumeClaimRetentionPolicyType PersistentVolumeClaimRetentionPolicyType = "Retain"
	// DeletePersistentVolumeClaimRetentionPolicyType is the default policy, which specifies that
	// PersistentVolumeClaims associated with CollaSet VolumeClaimTemplates
	// will be deleted in the scenario specified in PersistentVolumeClaimRetentionPolicy.
	DeletePersistentVolumeClaimRetentionPolicyType PersistentVolumeClaimRetentionPolicyType = "Delete"
)

type PodAvailableConditions

type PodAvailableConditions struct {
	ExpectedFinalizers map[string]string `json:"expectedFinalizers,omitempty"` // indicate the expected finalizers of a pod
}

+kubebuilder:object:generate=false

type PodTransitionRule added in v0.1.1

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

	Spec   PodTransitionRuleSpec   `json:"spec,omitempty"`
	Status PodTransitionRuleStatus `json:"status,omitempty"`
}

PodTransitionRule is the Schema for the podtransitionrules API

func (*PodTransitionRule) DeepCopy added in v0.1.1

func (in *PodTransitionRule) DeepCopy() *PodTransitionRule

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

func (*PodTransitionRule) DeepCopyInto added in v0.1.1

func (in *PodTransitionRule) DeepCopyInto(out *PodTransitionRule)

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

func (*PodTransitionRule) DeepCopyObject added in v0.1.1

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

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

type PodTransitionRuleList added in v0.1.1

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

PodTransitionRuleList contains a list of PodTransitionRule

func (*PodTransitionRuleList) DeepCopy added in v0.1.1

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

func (*PodTransitionRuleList) DeepCopyInto added in v0.1.1

func (in *PodTransitionRuleList) DeepCopyInto(out *PodTransitionRuleList)

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

func (*PodTransitionRuleList) DeepCopyObject added in v0.1.1

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

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

type PodTransitionRuleSpec added in v0.1.1

type PodTransitionRuleSpec struct {
	// Selector select the targets controlled by podtransitionrule
	Selector *metav1.LabelSelector `json:"selector,omitempty"`

	// Rules is a set of rules that need to be checked in certain situations
	Rules []TransitionRule `json:"rules,omitempty"`
}

PodTransitionRuleSpec defines the desired state of PodTransitionRule

func (*PodTransitionRuleSpec) DeepCopy added in v0.1.1

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

func (*PodTransitionRuleSpec) DeepCopyInto added in v0.1.1

func (in *PodTransitionRuleSpec) DeepCopyInto(out *PodTransitionRuleSpec)

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

type PodTransitionRuleStatus added in v0.1.1

type PodTransitionRuleStatus struct {
	UpdateTime *metav1.Time `json:"updateTime,omitempty"`

	// ObservedGeneration is the most recent generation observed for PodTransitionRule
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`

	// Targets contains the target resource names this PodTransitionRule is able to select.
	Targets []string `json:"targets,omitempty"`

	// RuleStates contains the RuleState resource info in webhook processing progress.
	// +optional
	RuleStates []*RuleState `json:"ruleStates,omitempty"`

	// Details contains all pods podtransitionrule details
	// +optional
	Details []*Detail `json:"details,omitempty"`
}

PodTransitionRuleStatus defines the observed state of PodTransitionRule

func (*PodTransitionRuleStatus) DeepCopy added in v0.1.1

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

func (*PodTransitionRuleStatus) DeepCopyInto added in v0.1.1

func (in *PodTransitionRuleStatus) DeepCopyInto(out *PodTransitionRuleStatus)

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

type PodUpdateStrategyType

type PodUpdateStrategyType string

PodUpdateStrategyType is a string enumeration type that enumerates all possible ways we can update a Pod when updating application

const (
	// CollaSetRecreatePodUpdateStrategyType indicates that CollaSet will always update Pod by deleting and recreate it.
	CollaSetRecreatePodUpdateStrategyType PodUpdateStrategyType = "ReCreate"
	// CollaSetInPlaceIfPossiblePodUpdateStrategyType indicates thath CollaSet will try to update Pod by in-place update
	// when it is possible. Recently, only Pod image can be updated in-place. Any other Pod spec change will make the
	// policy fall back to CollaSetRecreatePodUpdateStrategyType.
	CollaSetInPlaceIfPossiblePodUpdateStrategyType PodUpdateStrategyType = "InPlaceIfPossible"
	// CollaSetInPlaceOnlyPodUpdateStrategyType indicates that CollaSet will always update Pod in-place, instead of
	// recreating pod. It will encounter an error on original Kubernetes cluster.
	CollaSetInPlaceOnlyPodUpdateStrategyType PodUpdateStrategyType = "InPlaceOnly"
)

type RejectInfo

type RejectInfo struct {
	RuleName string `json:"ruleName,omitempty"`
	Reason   string `json:"reason,omitempty"`
}

func (*RejectInfo) DeepCopy

func (in *RejectInfo) DeepCopy() *RejectInfo

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

func (*RejectInfo) DeepCopyInto

func (in *RejectInfo) DeepCopyInto(out *RejectInfo)

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

type ResourceContext

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

	Spec ResourceContextSpec `json:"spec,omitempty"`
}

ResourceContext is the Schema for the resourcecontext API +k8s:openapi-gen=true +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +kubebuilder:resource:shortName=rc

func (*ResourceContext) DeepCopy

func (in *ResourceContext) DeepCopy() *ResourceContext

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

func (*ResourceContext) DeepCopyInto

func (in *ResourceContext) DeepCopyInto(out *ResourceContext)

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

func (*ResourceContext) DeepCopyObject

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

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

type ResourceContextList

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

ResourceContextList contains a list of ResourceContext

func (*ResourceContextList) DeepCopy

func (in *ResourceContextList) DeepCopy() *ResourceContextList

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

func (*ResourceContextList) DeepCopyInto

func (in *ResourceContextList) DeepCopyInto(out *ResourceContextList)

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

func (*ResourceContextList) DeepCopyObject

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

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

type ResourceContextSpec

type ResourceContextSpec struct {
	Contexts []ContextDetail `json:"contexts,omitempty"`
}

ResourceContextSpec defines the desired state of ResourceContext

func (*ResourceContextSpec) DeepCopy

func (in *ResourceContextSpec) DeepCopy() *ResourceContextSpec

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

func (*ResourceContextSpec) DeepCopyInto

func (in *ResourceContextSpec) DeepCopyInto(out *ResourceContextSpec)

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

type ResourceParameter

type ResourceParameter struct {
	// APIVersion defines the versioned schema of this representation of an object.
	ApiVersion string `json:"apiVersion"`

	// Kind is a string value representing the REST resource this object represents.
	Kind string `json:"kind"`

	// Name is a string value representing resource name
	Name string `json:"name,omitempty"`

	// Parameters is a string map representing parameters
	Parameters map[string]string `json:"parameters,omitempty"`
}

ResourceParameter is representing the request body of resource parameter

func (*ResourceParameter) DeepCopy

func (in *ResourceParameter) DeepCopy() *ResourceParameter

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

func (*ResourceParameter) DeepCopyInto

func (in *ResourceParameter) DeepCopyInto(out *ResourceParameter)

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

type RollingUpdateCollaSetStrategy

type RollingUpdateCollaSetStrategy struct {
	// ByPartition indicates the update progress is controlled by partition value.
	// +optional
	ByPartition *ByPartition `json:"byPartition,omitempty"`

	// ByLabel indicates the update progress is controlled by attaching pod label.
	// +optional
	ByLabel *ByLabel `json:"byLabel,omitempty"`
}

RollingUpdateCollaSetStrategy is used to communicate parameter for rolling update.

func (*RollingUpdateCollaSetStrategy) DeepCopy

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

func (*RollingUpdateCollaSetStrategy) DeepCopyInto

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

type RuleState

type RuleState struct {
	// Name is the name representing the rule
	Name string `json:"name,omitempty"`

	// WebhookStatus is the webhook status representing processing progress
	WebhookStatus *WebhookStatus `json:"webhookStatus,omitempty"`
}

RuleState defines the resource info in webhook processing progress.

func (*RuleState) DeepCopy

func (in *RuleState) DeepCopy() *RuleState

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

func (*RuleState) DeepCopyInto

func (in *RuleState) DeepCopyInto(out *RuleState)

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

type ScaleStrategy

type ScaleStrategy struct {
	// Context indicates the pool from which to allocate Pod instance ID. CollaSets are allowed to share the
	// same Context. It is not allowed to change.
	// Context defaults to be CollaSet's name.
	// +optional
	Context string `json:"context,omitempty"`

	// PodToExclude indicates the pods which will be orphaned by CollaSet.
	// +optional
	PodToExclude []string `json:"podToExclude,omitempty"`

	// PodToInclude indicates the pods which will be adapted by CollaSet.
	// +optional
	PodToInclude []string `json:"podToInclude,omitempty"`

	// PersistentVolumeClaimRetentionPolicy describes the lifecycle of PersistentVolumeClaim
	// created from volumeClaimTemplates. By default, all persistent volume claims are created as needed and
	// deleted after no pod is using them. This policy allows the lifecycle to be altered, for example
	// by deleting persistent volume claims when their CollaSet is deleted, or when their pod is scaled down.
	// +optional
	PersistentVolumeClaimRetentionPolicy *PersistentVolumeClaimRetentionPolicy `json:"persistentVolumeClaimRetentionPolicy,omitempty"`

	// OperationDelaySeconds indicates how many seconds it should delay before operating scale.
	// +optional
	OperationDelaySeconds *int32 `json:"operationDelaySeconds,omitempty"`
}

func (*ScaleStrategy) DeepCopy

func (in *ScaleStrategy) DeepCopy() *ScaleStrategy

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

func (*ScaleStrategy) DeepCopyInto

func (in *ScaleStrategy) DeepCopyInto(out *ScaleStrategy)

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

type TraceInfo

type TraceInfo struct {
	TraceId string `json:"traceId,omitempty"`

	BeginTime *metav1.Time `json:"beginTime,omitempty"`

	LastTime *metav1.Time `json:"lastTime,omitempty"`

	Message string `json:"message,omitempty"`
}

func (*TraceInfo) DeepCopy

func (in *TraceInfo) DeepCopy() *TraceInfo

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

func (*TraceInfo) DeepCopyInto

func (in *TraceInfo) DeepCopyInto(out *TraceInfo)

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

type TransitionRule added in v0.1.1

type TransitionRule struct {
	// Name is the name of this rule.
	Name string `json:"name,omitempty"`

	// Disabled is the switch to control this rule enable or not.
	// +optional
	Disabled bool `json:"disabled,omitempty"`

	// +optional
	Stage *string `json:"stage,omitempty"`

	// Conditions is the condition to control this rule enable or not.
	// +optional
	Conditions []string `json:"conditions,omitempty"`

	// Filter is used to filter the resource which will be applied with this rule.
	// +optional
	Filter *TransitionRuleFilter `json:"filter,omitempty"`

	// TransitionRuleDefinition describes the detail of the rule.
	TransitionRuleDefinition `json:",inline"`
}

func (*TransitionRule) DeepCopy added in v0.1.1

func (in *TransitionRule) DeepCopy() *TransitionRule

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

func (*TransitionRule) DeepCopyInto added in v0.1.1

func (in *TransitionRule) DeepCopyInto(out *TransitionRule)

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

type TransitionRuleDefinition added in v0.1.1

type TransitionRuleDefinition struct {

	// AvailablePolicy is the rule to check if the max unavailable number is reached by current resource updated.
	// +optional
	AvailablePolicy *AvailableRule `json:"availablePolicy,omitempty"`

	// LabelCheck is the rule to check labels on pods.
	// +optional
	LabelCheck *LabelCheckRule `json:"labelCheck,omitempty"`

	// +optional
	Webhook *TransitionRuleWebhook `json:"webhook,omitempty"`
}

func (*TransitionRuleDefinition) DeepCopy added in v0.1.1

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

func (*TransitionRuleDefinition) DeepCopyInto added in v0.1.1

func (in *TransitionRuleDefinition) DeepCopyInto(out *TransitionRuleDefinition)

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

type TransitionRuleFilter added in v0.1.1

type TransitionRuleFilter struct {
	// LabelSelector is used to filter resource with label match expresion.
	// +optional
	LabelSelector *metav1.LabelSelector `json:"labelSelector,omitempty"`
}

func (*TransitionRuleFilter) DeepCopy added in v0.1.1

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

func (*TransitionRuleFilter) DeepCopyInto added in v0.1.1

func (in *TransitionRuleFilter) DeepCopyInto(out *TransitionRuleFilter)

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

type TransitionRuleWebhook added in v0.1.1

type TransitionRuleWebhook struct {

	// ClientConfig is the configuration for accessing webhook.
	ClientConfig ClientConfig `json:"clientConfig,omitempty"`

	// FailurePolicy defines how unrecognized errors from the admission endpoint are handled -
	// allowed values are Ignore or Fail. Defaults to Ignore.
	// +optional
	FailurePolicy *FailurePolicyType `json:"failurePolicy,omitempty"`

	// Parameters contains the list of parameters which will be passed in webhook body.
	// +optional
	Parameters []Parameter `json:"parameters,omitempty"`
}

func (*TransitionRuleWebhook) DeepCopy added in v0.1.1

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

func (*TransitionRuleWebhook) DeepCopyInto added in v0.1.1

func (in *TransitionRuleWebhook) DeepCopyInto(out *TransitionRuleWebhook)

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

type UpdateStrategy

type UpdateStrategy struct {
	// RollingUpdate is used to communicate parameters when Type is RollingUpdateStatefulSetStrategyType.
	// +optional
	RollingUpdate *RollingUpdateCollaSetStrategy `json:"rollingUpdate,omitempty"`

	// PodUpdatePolicy indicates the policy by to update pods.
	// +optional
	PodUpdatePolicy PodUpdateStrategyType `json:"podUpgradePolicy,omitempty"`

	// OperationDelaySeconds indicates how many seconds it should delay before operating update.
	// +optional
	OperationDelaySeconds *int32 `json:"operationDelaySeconds,omitempty"`
}

func (*UpdateStrategy) DeepCopy

func (in *UpdateStrategy) DeepCopy() *UpdateStrategy

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

func (*UpdateStrategy) DeepCopyInto

func (in *UpdateStrategy) DeepCopyInto(out *UpdateStrategy)

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

type WebhookStatus

type WebhookStatus struct {
	// PodTransitionRulePodStatus is async request status representing the info of pods
	ItemStatus []*ItemStatus `json:"itemStatus,omitempty"`

	// TraceStates is a list of tracing info
	TraceStates []TraceInfo `json:"traceStates,omitempty"`
}

WebhookStatus defines the webhook processing status

func (*WebhookStatus) DeepCopy

func (in *WebhookStatus) DeepCopy() *WebhookStatus

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

func (*WebhookStatus) DeepCopyInto

func (in *WebhookStatus) DeepCopyInto(out *WebhookStatus)

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