v1beta1

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Copyright 2023 The OpenYurt Authors.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

+groupName=apps.openyurt.io

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

Index

Constants

View Source
const (
	NodeAutonomy v1.NodeConditionType = "Autonomy"
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "apps.openyurt.io", Version: "v1beta1"}

	SchemeGroupVersion = GroupVersion

	// 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 Resource

func Resource(resource string) schema.GroupResource

Resource is required by pkg/client/listers/...

Types

type ContainerImage added in v1.5.0

type ContainerImage struct {
	// Name represents name of the container in which the Image will be replaced
	Name string `json:"name"`
	// TargetImage represents the image name which is injected into the container above
	TargetImage string `json:"targetImage"`
}

ContainerImage specifies the corresponding container and the target image

func (*ContainerImage) DeepCopy added in v1.5.0

func (in *ContainerImage) DeepCopy() *ContainerImage

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

func (*ContainerImage) DeepCopyInto added in v1.5.0

func (in *ContainerImage) DeepCopyInto(out *ContainerImage)

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

type DeploymentTemplateSpec added in v1.5.0

type DeploymentTemplateSpec struct {
	// +kubebuilder:pruning:PreserveUnknownFields
	// +kubebuilder:validation:Schemaless
	metav1.ObjectMeta `json:"metadata,omitempty"`
	// +kubebuilder:pruning:PreserveUnknownFields
	// +kubebuilder:validation:Schemaless
	Spec appsv1.DeploymentSpec `json:"spec"`
}

DeploymentTemplateSpec defines the pool template of Deployment.

func (*DeploymentTemplateSpec) DeepCopy added in v1.5.0

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

func (*DeploymentTemplateSpec) DeepCopyInto added in v1.5.0

func (in *DeploymentTemplateSpec) DeepCopyInto(out *DeploymentTemplateSpec)

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

type NodePool

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

	Spec   NodePoolSpec   `json:"spec,omitempty"`
	Status NodePoolStatus `json:"status,omitempty"`
}

NodePool is the Schema for the nodepools API

func (*NodePool) DeepCopy

func (in *NodePool) DeepCopy() *NodePool

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

func (*NodePool) DeepCopyInto

func (in *NodePool) DeepCopyInto(out *NodePool)

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

func (*NodePool) DeepCopyObject

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

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

func (*NodePool) Hub added in v1.4.0

func (*NodePool) Hub()

Hub marks this type as a conversion hub.

type NodePoolList

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

NodePoolList contains a list of NodePool

func (*NodePoolList) DeepCopy

func (in *NodePoolList) DeepCopy() *NodePoolList

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

func (*NodePoolList) DeepCopyInto

func (in *NodePoolList) DeepCopyInto(out *NodePoolList)

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

func (*NodePoolList) DeepCopyObject

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

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

type NodePoolSpec

type NodePoolSpec struct {
	// The type of the NodePool
	// +optional
	Type NodePoolType `json:"type,omitempty"`

	// HostNetwork is used to specify that cni components(like flannel)
	// will not be installed on the nodes of this NodePool.
	// This means all pods on the nodes of this NodePool will use
	// HostNetwork and share network namespace with host machine.
	HostNetwork bool `json:"hostNetwork,omitempty"`

	// If specified, the Labels will be added to all nodes.
	// NOTE: existing labels with samy keys on the nodes will be overwritten.
	// +optional
	Labels map[string]string `json:"labels,omitempty"`

	// If specified, the Annotations will be added to all nodes.
	// NOTE: existing labels with samy keys on the nodes will be overwritten.
	// +optional
	Annotations map[string]string `json:"annotations,omitempty"`

	// If specified, the Taints will be added to all nodes.
	// +optional
	Taints []v1.Taint `json:"taints,omitempty"`
}

NodePoolSpec defines the desired state of NodePool

func (*NodePoolSpec) DeepCopy

func (in *NodePoolSpec) DeepCopy() *NodePoolSpec

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

func (*NodePoolSpec) DeepCopyInto

func (in *NodePoolSpec) DeepCopyInto(out *NodePoolSpec)

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

type NodePoolStatus

type NodePoolStatus struct {
	// Total number of ready nodes in the pool.
	// +optional
	ReadyNodeNum int32 `json:"readyNodeNum"`

	// Total number of unready nodes in the pool.
	// +optional
	UnreadyNodeNum int32 `json:"unreadyNodeNum"`

	// The list of nodes' names in the pool
	// +optional
	Nodes []string `json:"nodes,omitempty"`
}

NodePoolStatus defines the observed state of NodePool

func (*NodePoolStatus) DeepCopy

func (in *NodePoolStatus) DeepCopy() *NodePoolStatus

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

func (*NodePoolStatus) DeepCopyInto

func (in *NodePoolStatus) DeepCopyInto(out *NodePoolStatus)

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

type NodePoolType

type NodePoolType string
const (
	Edge  NodePoolType = "Edge"
	Cloud NodePoolType = "Cloud"
)

type Operation added in v1.5.0

type Operation string
const (
	ADD     Operation = "add"     // json patch
	REMOVE  Operation = "remove"  // json patch
	REPLACE Operation = "replace" // json patch
)

type Patch added in v1.5.0

type Patch struct {
	// Path represents the path in the json patch
	Path string `json:"path"`
	// Operation represents the operation
	// +kubebuilder:validation:Enum=add;remove;replace
	Operation Operation `json:"operation"`
	// Indicates the value of json patch
	// +optional
	Value apiextensionsv1.JSON `json:"value,omitempty"`
}

func (*Patch) DeepCopy added in v1.5.0

func (in *Patch) DeepCopy() *Patch

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

func (*Patch) DeepCopyInto added in v1.5.0

func (in *Patch) DeepCopyInto(out *Patch)

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

type StatefulSetTemplateSpec added in v1.5.0

type StatefulSetTemplateSpec struct {
	// +kubebuilder:pruning:PreserveUnknownFields
	// +kubebuilder:validation:Schemaless
	metav1.ObjectMeta `json:"metadata,omitempty"`
	// +kubebuilder:pruning:PreserveUnknownFields
	// +kubebuilder:validation:Schemaless
	Spec appsv1.StatefulSetSpec `json:"spec"`
}

StatefulSetTemplateSpec defines the pool template of StatefulSet.

func (*StatefulSetTemplateSpec) DeepCopy added in v1.5.0

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

func (*StatefulSetTemplateSpec) DeepCopyInto added in v1.5.0

func (in *StatefulSetTemplateSpec) DeepCopyInto(out *StatefulSetTemplateSpec)

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

type Tweaks added in v1.5.0

type Tweaks struct {
	// +optional
	// Replicas overrides the replicas of the workload
	Replicas *int32 `json:"replicas,omitempty"`
	// +optional
	// ContainerImages is a list of container images to be injected to a certain workload
	ContainerImages []ContainerImage `json:"containerImages,omitempty"`
	// +optional
	// Patches is a list of advanced tweaks to be applied to a certain workload
	// It can add/remove/replace the field values of specified paths in the template.
	Patches []Patch `json:"patches,omitempty"`
}

Tweaks represents configuration to be injected. Only one of its members may be specified.

func (*Tweaks) DeepCopy added in v1.5.0

func (in *Tweaks) DeepCopy() *Tweaks

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

func (*Tweaks) DeepCopyInto added in v1.5.0

func (in *Tweaks) DeepCopyInto(out *Tweaks)

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

type Workload added in v1.5.0

type Workload struct {
	// WorkloadTemplate defines the pool template under the YurtAppSet.
	WorkloadTemplate `json:"workloadTemplate"`
	// WorkloadTemplate defines the customization that will be applied to certain workloads in specified nodepools.
	// +optional
	WorkloadTweaks []WorkloadTweak `json:"workloadTweaks,omitempty"`
}

Workload defines the workload to be deployed in the nodepools

func (*Workload) DeepCopy added in v1.5.0

func (in *Workload) DeepCopy() *Workload

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

func (*Workload) DeepCopyInto added in v1.5.0

func (in *Workload) DeepCopyInto(out *Workload)

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

type WorkloadTemplate added in v1.5.0

type WorkloadTemplate struct {
	// StatefulSet template
	// +optional
	StatefulSetTemplate *StatefulSetTemplateSpec `json:"statefulSetTemplate,omitempty"`

	// Deployment template
	// +optional
	DeploymentTemplate *DeploymentTemplateSpec `json:"deploymentTemplate,omitempty"`
}

WorkloadTemplate defines the pool template under the YurtAppSet. YurtAppSet will provision every pool based on one workload templates in WorkloadTemplate. WorkloadTemplate now support statefulset and deployment Only one of its members may be specified.

func (*WorkloadTemplate) DeepCopy added in v1.5.0

func (in *WorkloadTemplate) DeepCopy() *WorkloadTemplate

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

func (*WorkloadTemplate) DeepCopyInto added in v1.5.0

func (in *WorkloadTemplate) DeepCopyInto(out *WorkloadTemplate)

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

type WorkloadTweak added in v1.5.0

type WorkloadTweak struct {
	// NodePoolSelector is a label query over nodepool in which workloads should be adjusted.
	// +optional
	NodePoolSelector *metav1.LabelSelector `json:"nodepoolSelector,omitempty"`
	// Pools is a list of selected nodepools specified with nodepool id in which workloads should be adjusted.
	// Pools is not recommended and NodePoolSelector should be preferred
	// +optional
	Pools []string `json:"pools,omitempty"`
	// Tweaks is the adjustment can be applied to a certain workload in specified nodepools such as image and replicas
	Tweaks `json:"tweaks"`
}

WorkloadTweak Describe detailed multi-region configuration of the subject BasicTweaks and AdvancedTweaks describe a set of nodepools and their shared or identical configurations

func (*WorkloadTweak) DeepCopy added in v1.5.0

func (in *WorkloadTweak) DeepCopy() *WorkloadTweak

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

func (*WorkloadTweak) DeepCopyInto added in v1.5.0

func (in *WorkloadTweak) DeepCopyInto(out *WorkloadTweak)

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

type YurtAppSet added in v1.5.0

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

	Spec   YurtAppSetSpec   `json:"spec,omitempty"`
	Status YurtAppSetStatus `json:"status,omitempty"`
}

YurtAppSet is the Schema for the YurtAppSets API

func (*YurtAppSet) DeepCopy added in v1.5.0

func (in *YurtAppSet) DeepCopy() *YurtAppSet

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

func (*YurtAppSet) DeepCopyInto added in v1.5.0

func (in *YurtAppSet) DeepCopyInto(out *YurtAppSet)

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

func (*YurtAppSet) DeepCopyObject added in v1.5.0

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

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

func (*YurtAppSet) Hub added in v1.5.0

func (*YurtAppSet) Hub()

Hub marks this type as a conversion hub.

type YurtAppSetCondition added in v1.5.0

type YurtAppSetCondition struct {
	// Type of in place set condition.
	Type YurtAppSetConditionType `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"`
}

YurtAppSetCondition describes current state of a YurtAppSet.

func (*YurtAppSetCondition) DeepCopy added in v1.5.0

func (in *YurtAppSetCondition) DeepCopy() *YurtAppSetCondition

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

func (*YurtAppSetCondition) DeepCopyInto added in v1.5.0

func (in *YurtAppSetCondition) DeepCopyInto(out *YurtAppSetCondition)

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

type YurtAppSetConditionType added in v1.5.0

type YurtAppSetConditionType string

YurtAppSetConditionType indicates valid conditions type of a YurtAppSet.

const (
	// AppDispatched means all the expected workloads are created successfully.
	AppSetAppDispatchced YurtAppSetConditionType = "AppDispatched"
	// AppDeleted means all the unexpected workloads are deleted successfully.
	AppSetAppDeleted YurtAppSetConditionType = "AppDeleted"
	// AppUpdated means all expected workloads are updated successfully.
	AppSetAppUpdated YurtAppSetConditionType = "AppUpdated"
	// AppUpdated means all workloads are ready
	AppSetAppReady YurtAppSetConditionType = "AppReady"
	// PoolFound is added to a YurtAppSet when all specified nodepools are found
	// if no nodepools meets the nodepoolselector or pools of yurtappset, PoolFound condition is set to false
	AppSetPoolFound YurtAppSetConditionType = "PoolFound"
)

type YurtAppSetList added in v1.5.0

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

YurtAppSetList contains a list of YurtAppSet

func (*YurtAppSetList) DeepCopy added in v1.5.0

func (in *YurtAppSetList) DeepCopy() *YurtAppSetList

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

func (*YurtAppSetList) DeepCopyInto added in v1.5.0

func (in *YurtAppSetList) DeepCopyInto(out *YurtAppSetList)

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

func (*YurtAppSetList) DeepCopyObject added in v1.5.0

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

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

type YurtAppSetSpec added in v1.5.0

type YurtAppSetSpec struct {
	// Workload defines the workload to be deployed in the nodepools
	Workload `json:"workload"`

	// NodePoolSelector is a label query over nodepool in which workloads should be deployed in.
	// It must match the nodepool's labels.
	// +optional
	NodePoolSelector *metav1.LabelSelector `json:"nodepoolSelector,omitempty"`

	// Pools is a list of selected nodepools specified with nodepool id in which workloads should be deployed in.
	// It is primarily used for compatibility with v1alpha1 version and NodePoolSelector should be preferred to choose nodepools
	// +optional
	Pools []string `json:"pools,omitempty"`

	// Indicates the number of histories to be conserved.
	// If unspecified, defaults to 10.
	// +optional
	RevisionHistoryLimit *int32 `json:"revisionHistoryLimit,omitempty"`
}

YurtAppSetSpec defines the desired state of YurtAppSet.

func (*YurtAppSetSpec) DeepCopy added in v1.5.0

func (in *YurtAppSetSpec) DeepCopy() *YurtAppSetSpec

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

func (*YurtAppSetSpec) DeepCopyInto added in v1.5.0

func (in *YurtAppSetSpec) DeepCopyInto(out *YurtAppSetSpec)

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

type YurtAppSetStatus added in v1.5.0

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

	// Count of hash collisions for the YurtAppSet. The YurtAppSet 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"`

	// CurrentRevision, if not empty, indicates the current version of the YurtAppSet.
	CurrentRevision string `json:"currentRevision"`

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

	// The number of ready workloads.
	ReadyWorkloads int32 `json:"readyWorkloads"`

	// The number of updated workloads.
	// +optional
	UpdatedWorkloads int32 `json:"updatedWorkloads"`

	// TotalWorkloads is the most recently observed number of workloads.
	TotalWorkloads int32 `json:"totalWorkloads"`
}

YurtAppSetStatus defines the observed state of YurtAppSet.

func (*YurtAppSetStatus) DeepCopy added in v1.5.0

func (in *YurtAppSetStatus) DeepCopy() *YurtAppSetStatus

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

func (*YurtAppSetStatus) DeepCopyInto added in v1.5.0

func (in *YurtAppSetStatus) DeepCopyInto(out *YurtAppSetStatus)

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