Documentation ¶
Overview ¶
Copyright 2019 yametech 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.
Package v1 contains API Schema definitions for the nuwa v1 API group +kubebuilder:object:generate=true +groupName=nuwa.nip.io
Index ¶
- Constants
- Variables
- func GVK(kind string) schema.GroupVersionKind
- func In(slice Coordinates, c Coordinate) bool
- func Kind(kind string) schema.GroupKind
- func Resource(resource string) schema.GroupResource
- type Coordinate
- type Coordinates
- type CoordinatesGroup
- type InPlaceUpdateContainerStatus
- type InPlaceUpdateState
- type Injector
- type InjectorList
- type InjectorSpec
- type InjectorStatus
- type Pod
- type PodUpdateStrategyType
- type RollingUpdateStatefulSetStrategy
- type StatefulSet
- type StatefulSetList
- type StatefulSetSpec
- type StatefulSetStatus
- type StatefulSetUpdateStrategy
- type Stone
- type StoneList
- type StoneSpec
- type StoneStatus
- type StrategyType
- type UpdatePriorityOrderTerm
- type UpdatePriorityStrategy
- type UpdatePriorityWeightTerm
- type Water
- type WaterList
- type WaterSpec
- type WaterStatus
Constants ¶
const ( NuwaZoneFlag = "nuwa.io/zone" NuwaRackFlag = "nuwa.io/rack" NuwaHostFlag = "nuwa.io/host" )
const ( // StatefulSetInPlaceUpdateReady must be added into template.spec.readinessGates when pod podUpdatePolicy // is InPlaceIfPossible or InPlaceOnly. The condition in podStatus will be updated to False before in-place // updating and updated to True after the update is finished. This ensures pod to remain at NotReady state while // in-place update is happening. StatefulSetInPlaceUpdateReady v1.PodConditionType = "InPlaceUpdateReady" // StatefulSetInPlaceUpdateStateAnnotation records the state of inplace-update. // The value of annotation is inPlaceUpdateState. StatefulSetInPlaceUpdateStateAnnotation string = "inplace-update-state" )
const ( FailedCreatePod apps.StatefulSetConditionType = "FailedCreatePod" FailedUpdatePod apps.StatefulSetConditionType = "FailedUpdatePod" )
These are valid conditions of a statefulset.
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "nuwa.nip.io", Version: "v1"} // 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 In ¶
func In(slice Coordinates, c Coordinate) bool
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource takes an unqualified resource and returns a Group qualified GroupResource
Types ¶
type Coordinate ¶
type Coordinate struct { // +optional Zone string `json:"zone,omitempty"` // +optional Rack string `json:"rack,omitempty"` // +optional Host string `json:"host,omitempty"` // If not specified,default value 0 then the average distribution is sorted according to the above three fields // +optional Replicas int32 `json:"replicas,omitempty"` }
+kubebuilder:object:root=false +k8s:deepcopy-gen=false
func (Coordinate) Equal ¶
func (c Coordinate) Equal(c1 Coordinate) bool
type Coordinates ¶
type Coordinates []Coordinate
Coordinates defines the desired identity pod of nodes
func Difference ¶
func Difference(slice1 Coordinates, slice2 Coordinates) Coordinates
func (Coordinates) DeepCopy ¶
func (in Coordinates) DeepCopy() Coordinates
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Coordinates.
func (Coordinates) DeepCopyInto ¶
func (in Coordinates) DeepCopyInto(out *Coordinates)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Coordinates) Len ¶
func (c *Coordinates) Len() int
func (*Coordinates) Less ¶
func (c *Coordinates) Less(i, j int) bool
func (*Coordinates) Swap ¶
func (c *Coordinates) Swap(i, j int)
type CoordinatesGroup ¶
type CoordinatesGroup struct { Group string `json:"group,omitempty"` Zoneset Coordinates `json:"zoneset,omitempty"` Replicas *int32 `json:"replicas,omitempty"` }
CoordinatesGroup ..
func (*CoordinatesGroup) DeepCopy ¶
func (in *CoordinatesGroup) DeepCopy() *CoordinatesGroup
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CoordinatesGroup.
func (*CoordinatesGroup) DeepCopyInto ¶
func (in *CoordinatesGroup) DeepCopyInto(out *CoordinatesGroup)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type InPlaceUpdateContainerStatus ¶
type InPlaceUpdateContainerStatus struct {
ImageID string `json:"imageID,omitempty"`
}
InPlaceUpdateContainerStatus records the statuses of the container that are mainly used to determine whether the InPlaceUpdate is completed.
func (*InPlaceUpdateContainerStatus) DeepCopy ¶
func (in *InPlaceUpdateContainerStatus) DeepCopy() *InPlaceUpdateContainerStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InPlaceUpdateContainerStatus.
func (*InPlaceUpdateContainerStatus) DeepCopyInto ¶
func (in *InPlaceUpdateContainerStatus) DeepCopyInto(out *InPlaceUpdateContainerStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type InPlaceUpdateState ¶
type InPlaceUpdateState struct { // Revision is the updated statefulset revision hash. Revision string `json:"revision"` // UpdateTimestamp is the time when the in-place update happens. UpdateTimestamp metav1.Time `json:"updateTimestamp"` // LastContainerStatuses records the before-in-place-update container statuses. It is a map from ContainerName // to InPlaceUpdateContainerStatus LastContainerStatuses map[string]InPlaceUpdateContainerStatus `json:"lastContainerStatuses"` }
InPlaceUpdateState records latest inplace-update state, including old statuses of containers.
func (*InPlaceUpdateState) DeepCopy ¶
func (in *InPlaceUpdateState) DeepCopy() *InPlaceUpdateState
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InPlaceUpdateState.
func (*InPlaceUpdateState) DeepCopyInto ¶
func (in *InPlaceUpdateState) DeepCopyInto(out *InPlaceUpdateState)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Injector ¶
type Injector struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec InjectorSpec `json:"spec,omitempty"` Status InjectorStatus `json:"status,omitempty"` }
+kubebuilder:object:root=true +kubebuilder:resource:shortName=nuwainj Injector is the Schema for the injectors API
func (*Injector) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Injector.
func (*Injector) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Injector) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type InjectorList ¶
type InjectorList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []Injector `json:"items"` }
InjectorList contains a list of Injector
func (*InjectorList) DeepCopy ¶
func (in *InjectorList) DeepCopy() *InjectorList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InjectorList.
func (*InjectorList) DeepCopyInto ¶
func (in *InjectorList) DeepCopyInto(out *InjectorList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*InjectorList) DeepCopyObject ¶
func (in *InjectorList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type InjectorSpec ¶
type InjectorSpec struct { PreContainers []corev1.Container `json:"preContainers,omitempty"` PostContainers []corev1.Container `json:"postContainers,omitempty"` ResourceType string `json:"resourceType,omitempty"` NameSpace string `json:"namespace,omitempty"` Name string `json:"name,omitempty"` Volumes []v1.Volume `json:"volumes,omitempty"` // Selector is a label query over a set of resources, in this case pods. // Required. Selector metav1.LabelSelector `json:"selector"` }
InjectorSpec defines the desired state of Injector
func (*InjectorSpec) DeepCopy ¶
func (in *InjectorSpec) DeepCopy() *InjectorSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InjectorSpec.
func (*InjectorSpec) DeepCopyInto ¶
func (in *InjectorSpec) DeepCopyInto(out *InjectorSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type InjectorStatus ¶
type InjectorStatus struct { }
InjectorStatus defines the observed state of Injector
func (*InjectorStatus) DeepCopy ¶
func (in *InjectorStatus) DeepCopy() *InjectorStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InjectorStatus.
func (*InjectorStatus) DeepCopyInto ¶
func (in *InjectorStatus) DeepCopyInto(out *InjectorStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Pod ¶
+kubebuilder:object:root=false +k8s:deepcopy-gen=false
func (*Pod) ServeMutatePods ¶
func (p *Pod) ServeMutatePods(w http.ResponseWriter, r *http.Request)
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 ( // RecreatePodUpdateStrategyType indicates that we always delete Pod and create new Pod // during Pod update, which is the default behavior RecreatePodUpdateStrategyType PodUpdateStrategyType = "ReCreate" // InPlaceIfPossiblePodUpdateStrategyType indicates that we try to in-place update Pod instead of // recreating Pod when possible. Currently, only image update of pod spec is allowed. Any other changes to the pod // spec will fall back to ReCreate PodUpdateStrategyType where pod will be recreated. InPlaceIfPossiblePodUpdateStrategyType PodUpdateStrategyType = "InPlaceIfPossible" // InPlaceOnlyPodUpdateStrategyType indicates that we will in-place update Pod instead of // recreating pod. Currently we only allow image update for pod spec. Any other changes to the pod spec will be // rejected by kube-apiserver InPlaceOnlyPodUpdateStrategyType PodUpdateStrategyType = "InPlaceOnly" )
type RollingUpdateStatefulSetStrategy ¶
type RollingUpdateStatefulSetStrategy struct { // Partition indicates the number of pods with non-updated revisions when rolling update. // This means controller will update $(replicas - partition) number of pod // Default value is 0. // +optional Partition *int32 `json:"partition,omitempty"` // Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). // Absolute number is calculated from percentage by rounding down. // Also, maxUnavailable can just be allowed to work with Parallel podManagementPolicy. // Defaults to 1. // +optional MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty"` // PodUpdatePolicy indicates how pods should be updated // Default value is "ReCreate" // +optional PodUpdatePolicy PodUpdateStrategyType `json:"podUpdatePolicy,omitempty"` // Paused indicates that the StatefulSet is paused. // Default value is false // +optional Paused bool `json:"paused,omitempty"` // Priorities are the rules for calculating the priority of updating pods. // Each pod to be updated, will pass through these terms and get a sum of weights. // Also, priorityStrategy can just be allowed to work with Parallel podManagementPolicy. // +optional PriorityStrategy *UpdatePriorityStrategy `json:"priorityStrategy,omitempty"` }
RollingUpdateStatefulSetStrategy is used to communicate parameter for RollingUpdateStatefulSetStrategyType.
func (*RollingUpdateStatefulSetStrategy) DeepCopy ¶
func (in *RollingUpdateStatefulSetStrategy) DeepCopy() *RollingUpdateStatefulSetStrategy
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RollingUpdateStatefulSetStrategy.
func (*RollingUpdateStatefulSetStrategy) DeepCopyInto ¶
func (in *RollingUpdateStatefulSetStrategy) DeepCopyInto(out *RollingUpdateStatefulSetStrategy)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type StatefulSet ¶
type StatefulSet struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec StatefulSetSpec `json:"spec,omitempty"` Status StatefulSetStatus `json:"status,omitempty"` }
+kubebuilder:object:root=true StatefulSet is the Schema for the statefulsets API +kubebuilder:subresource:status +kubebuilder:subresource:scale:specpath=.spec.replicas,statuspath=.status.replicas,selectorpath=.status.labelSelector +kubebuilder:resource:shortName=nuwasts +kubebuilder:subresource:scale:specpath=.spec.replicas,statuspath=.status.replicas,selectorpath=.status.labelSelector +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="UPDATED",type="integer",JSONPath=".status.updatedReplicas",description="The number of pods updated." +kubebuilder:printcolumn:name="READY",type="integer",JSONPath=".status.readyReplicas",description="The number of pods ready." +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp",description="CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC." StatefulSet is the Schema for the statefulsets API
func (*StatefulSet) DeepCopy ¶
func (in *StatefulSet) DeepCopy() *StatefulSet
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StatefulSet.
func (*StatefulSet) DeepCopyInto ¶
func (in *StatefulSet) DeepCopyInto(out *StatefulSet)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*StatefulSet) DeepCopyObject ¶
func (in *StatefulSet) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type StatefulSetList ¶
type StatefulSetList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []StatefulSet `json:"items"` }
StatefulSetList contains a list of StatefulSet
func (*StatefulSetList) DeepCopy ¶
func (in *StatefulSetList) DeepCopy() *StatefulSetList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StatefulSetList.
func (*StatefulSetList) DeepCopyInto ¶
func (in *StatefulSetList) DeepCopyInto(out *StatefulSetList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*StatefulSetList) DeepCopyObject ¶
func (in *StatefulSetList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type StatefulSetSpec ¶
type StatefulSetSpec struct { // 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 1. // TODO: Consider a rename of this field. // +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. // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors Selector *metav1.LabelSelector `json:"selector"` // template is the object that describes the pod that will be created if // insufficient replicas are detected. Each pod stamped out by the StatefulSet // will fulfill this Template, but have a unique identity from the rest // of the StatefulSet. Template v1.PodTemplateSpec `json:"template"` // 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. // TODO: Define the behavior if a claim already exists with the same name. // +optional VolumeClaimTemplates []v1.PersistentVolumeClaim `json:"volumeClaimTemplates,omitempty"` // serviceName is the name of the service that governs this StatefulSet. // This service must exist before the StatefulSet, and is responsible for // the network identity of the set. Pods get DNS/hostnames that follow the // pattern: pod-specific-string.serviceName.default.svc.cluster.local // where "pod-specific-string" is managed by the StatefulSet controller. ServiceName string `json:"serviceName,omitempty"` // podManagementPolicy controls how pods are created during initial scale up, // when replacing pods on nodes, or when scaling down. The default policy is // `OrderedReady`, where pods are created in increasing order (pod-0, then // pod-1, etc) and the controller will wait until each pod is ready before // continuing. When scaling down, the pods are removed in the opposite order. // The alternative policy is `Parallel` which will create pods in parallel // to match the desired scale without waiting, and on scale down will delete // all pods at once. // +optional PodManagementPolicy apps.PodManagementPolicyType `json:"podManagementPolicy,omitempty"` // updateStrategy indicates the StatefulSetUpdateStrategy that will be // employed to update Pods in the StatefulSet when a revision is made to // Template. UpdateStrategy *StatefulSetUpdateStrategy `json:"updateStrategy,omitempty"` // revisionHistoryLimit is the maximum number of revisions that will // be maintained in the StatefulSet's revision history. The revision history // consists of all revisions not represented by a currently applied // StatefulSetSpec version. The default value is 10. RevisionHistoryLimit int32 `json:"revisionHistoryLimit,omitempty"` }
StatefulSetSpec defines the desired state of StatefulSet
func (*StatefulSetSpec) DeepCopy ¶
func (in *StatefulSetSpec) DeepCopy() *StatefulSetSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StatefulSetSpec.
func (*StatefulSetSpec) DeepCopyInto ¶
func (in *StatefulSetSpec) DeepCopyInto(out *StatefulSetSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type StatefulSetStatus ¶
type StatefulSetStatus struct { // observedGeneration is the most recent generation observed for this StatefulSet. It corresponds to the // StatefulSet's generation, which is updated on mutation by the API Server. // +optional ObservedGeneration int64 `json:"observedGeneration,omitempty"` // replicas is the number of Pods created by the StatefulSet controller. Replicas int32 `json:"replicas"` // readyReplicas is the number of Pods created by the StatefulSet controller that have a Ready Condition. ReadyReplicas int32 `json:"readyReplicas"` // currentReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version // indicated by currentRevision. CurrentReplicas int32 `json:"currentReplicas"` // updatedReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version // indicated by updateRevision. UpdatedReplicas int32 `json:"updatedReplicas"` // currentRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the // sequence [0,currentReplicas). CurrentRevision string `json:"currentRevision,omitempty"` // updateRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence // [replicas-updatedReplicas,replicas) UpdateRevision string `json:"updateRevision,omitempty"` // collisionCount is the count of hash collisions for the StatefulSet. The StatefulSet 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"` // Represents the latest available observations of a statefulset's current state. // +optional // +patchMergeKey=type // +patchStrategy=merge Conditions []apps.StatefulSetCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"` }
StatefulSetStatus defines the observed state of StatefulSet
func (*StatefulSetStatus) DeepCopy ¶
func (in *StatefulSetStatus) DeepCopy() *StatefulSetStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StatefulSetStatus.
func (*StatefulSetStatus) DeepCopyInto ¶
func (in *StatefulSetStatus) DeepCopyInto(out *StatefulSetStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type StatefulSetUpdateStrategy ¶
type StatefulSetUpdateStrategy struct { // Type indicates the type of the StatefulSetUpdateStrategy. // Default is RollingUpdate. // +optional Type apps.StatefulSetUpdateStrategyType `json:"type,omitempty"` // RollingUpdate is used to communicate parameters when Type is RollingUpdateStatefulSetStrategyType. // +optional RollingUpdate *RollingUpdateStatefulSetStrategy `json:"rollingUpdate,omitempty"` }
StatefulSetUpdateStrategy indicates the strategy that the StatefulSet controller will use to perform updates. It includes any additional parameters necessary to perform the update for the indicated strategy.
func (*StatefulSetUpdateStrategy) DeepCopy ¶
func (in *StatefulSetUpdateStrategy) DeepCopy() *StatefulSetUpdateStrategy
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StatefulSetUpdateStrategy.
func (*StatefulSetUpdateStrategy) DeepCopyInto ¶
func (in *StatefulSetUpdateStrategy) DeepCopyInto(out *StatefulSetUpdateStrategy)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Stone ¶
type Stone struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec StoneSpec `json:"spec,omitempty"` Status StoneStatus `json:"status,omitempty"` }
+kubebuilder:object:root=true Water is the Schema for the waters API +kubebuilder:subresource:status +kubebuilder:resource:shortName=nuwaste +kubebuilder:printcolumn:name="REPLICAS",type="integer",JSONPath=".status.replicas",description="The desired number of pods." +kubebuilder:printcolumn:name="STATEFULSET",type="integer",JSONPath=".status.statefulset",description="The desired number of statefulset." +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp",description="CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC."
func (*Stone) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Stone.
func (*Stone) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Stone) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type StoneList ¶
type StoneList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []Stone `json:"items"` }
StoneList contains a list of Stone
func (*StoneList) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StoneList.
func (*StoneList) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*StoneList) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type StoneSpec ¶
type StoneSpec struct { // INSERT ADDITIONAL SPEC FIELDS - desired state of cluster // Important: Run "make" to regenerate code after modifying this file // INSERT ADDITIONAL SPEC FIELDS - desired state of cluster // Important: Run "make" to regenerate code after modifying this file // Template describes the pods that will be created. Template corev1.PodTemplateSpec `json:"template"` // Refer to the StatefulSet template // 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. // TODO: Define the behavior if a claim already exists with the same name. //tional VolumeClaimTemplates []corev1.PersistentVolumeClaim `json:"volumeClaimTemplates,omitempty"` // Strategy // @Alpha : Only one node that meets expectations is selected to publish 1 application // @Beta : All node that meets expectations is selected to publish each node 1 application // @Release : The number of copies(Replicas) based on beta release more than nodes will be published evenly in the nodes that conform to the specification // +optional // +patchStrategy=retainKeys // +patchMergeKey=type Strategy StrategyType `json:"strategy"` // Identify the deployment status expected by the current resource // Identify node params ZONE-{N}_RACK-{N}_HOST-{N} // +optional Coordinates []CoordinatesGroup `json:"coordinates,omitempty"` // Identify the deployment service expected by the current resource // +optional Service corev1.ServiceSpec `json:"service,omitempty"` }
StoneSpec defines the desired state of Stone
func (*StoneSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StoneSpec.
func (*StoneSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type StoneStatus ¶
type StoneStatus struct { // INSERT ADDITIONAL STATUS FIELD - define observed state of cluster // Important: Run "make" to regenerate code after modifying this file Replicas int32 `json:"replicas,omitempty"` StatefulSet int32 `json:"statefulset,omitempty"` }
StoneStatus defines the observed state of Stone
func (*StoneStatus) DeepCopy ¶
func (in *StoneStatus) DeepCopy() *StoneStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StoneStatus.
func (*StoneStatus) DeepCopyInto ¶
func (in *StoneStatus) DeepCopyInto(out *StoneStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type StrategyType ¶
type StrategyType string
const ( Alpha StrategyType = "Alpha" Beta StrategyType = "Beta" Omega StrategyType = "Omega" Release StrategyType = "Release" )
type UpdatePriorityOrderTerm ¶
type UpdatePriorityOrderTerm struct { // Calculate priority by value of this key. // Values of this key, will be sorted by GetInt(val). GetInt method will find the last int in value, // such as getting 5 in value '5', getting 10 in value 'sts-10'. OrderedKey string `json:"orderedKey"` }
UpdatePriorityOrder defines order priority.
func (*UpdatePriorityOrderTerm) DeepCopy ¶
func (in *UpdatePriorityOrderTerm) DeepCopy() *UpdatePriorityOrderTerm
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UpdatePriorityOrderTerm.
func (*UpdatePriorityOrderTerm) DeepCopyInto ¶
func (in *UpdatePriorityOrderTerm) DeepCopyInto(out *UpdatePriorityOrderTerm)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type UpdatePriorityStrategy ¶
type UpdatePriorityStrategy struct { // Order priority terms, pods will be sorted by the value of orderedKey. // For example: // “` // orderPriority: // - orderedKey: key1 // - orderedKey: key2 // “` // First, all pods which have key1 in labels will be sorted by the value of key1. // Then, the left pods which have no key1 but have key2 in labels will be sorted by // the value of key2 and put behind those pods have key1. OrderPriority []UpdatePriorityOrderTerm `json:"orderPriority,omitempty"` // Weight priority terms, pods will be sorted by the sum of all terms weight. WeightPriority []UpdatePriorityWeightTerm `json:"weightPriority,omitempty"` }
UpdatePriorityStrategy is the strategy to define priority for pods update. Only one of orderPriority and weightPriority can be set.
func (*UpdatePriorityStrategy) DeepCopy ¶
func (in *UpdatePriorityStrategy) DeepCopy() *UpdatePriorityStrategy
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UpdatePriorityStrategy.
func (*UpdatePriorityStrategy) DeepCopyInto ¶
func (in *UpdatePriorityStrategy) DeepCopyInto(out *UpdatePriorityStrategy)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type UpdatePriorityWeightTerm ¶
type UpdatePriorityWeightTerm struct { // Weight associated with matching the corresponding matchExpressions, in the range 1-100. Weight int32 `json:"weight"` // MatchSelector is used to select by pod's labels. MatchSelector metav1.LabelSelector `json:"matchSelector"` }
UpdatePriorityWeightTerm defines weight priority.
func (*UpdatePriorityWeightTerm) DeepCopy ¶
func (in *UpdatePriorityWeightTerm) DeepCopy() *UpdatePriorityWeightTerm
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UpdatePriorityWeightTerm.
func (*UpdatePriorityWeightTerm) DeepCopyInto ¶
func (in *UpdatePriorityWeightTerm) DeepCopyInto(out *UpdatePriorityWeightTerm)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Water ¶
type Water struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec WaterSpec `json:"spec,omitempty"` Status WaterStatus `json:"status,omitempty"` }
+kubebuilder:object:root=true Water is the Schema for the waters API +kubebuilder:subresource:status +kubebuilder:resource:shortName=nuwawts +kubebuilder:subresource:scale:specpath=".spec.replicas",statuspath=".status.replicas" +kubebuilder:printcolumn:name="DESIRED-REPLICAS",type="integer",JSONPath=".status.desired_replicas",description="The desired number of pods." +kubebuilder:printcolumn:name="ALREADY-REPLICAS",type="integer",JSONPath=".status.already_replicas",description="The desired number of pods." +kubebuilder:printcolumn:name="DESIRED-DEPLOYMENTS",type="integer",JSONPath=".status.desired_deployments",description="The desired number of deployments." +kubebuilder:printcolumn:name="ALREADY-DEPLOYMENTS",type="integer",JSONPath=".status.already_deployment",description="The already replicas number of deployments." +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp",description="CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC."
func (*Water) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Water.
func (*Water) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Water) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type WaterList ¶
type WaterList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []Water `json:"items"` }
+kubebuilder:object:root=true WaterList contains a list of Water
func (*WaterList) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WaterList.
func (*WaterList) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*WaterList) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type WaterSpec ¶
type WaterSpec struct { // INSERT ADDITIONAL SPEC FIELDS - desired state of cluster // Important: Run "make" to regenerate code after modifying this file // Template describes the pods that will be created. Template corev1.PodTemplateSpec `json:"template"` // Strategy // @Alpha : Only one node that meets expectations is selected to publish 1 application // @Beta : All node that meets expectations is selected to publish each node 1 application // @Release : The number of copies(Replicas) based on beta release more than nodes will be published evenly in the nodes that conform to the specification // +optional // +patchStrategy=retainKeys // +patchMergeKey=type Strategy StrategyType `json:"strategy"` // Identify the deployment status expected by the current resource // Identify node params ZONE-{N}_RACK-{N}_HOST-{N} // +optional Coordinates Coordinates `json:"coordinates,omitempty"` // Identify the deployment service expected by the current resource // +optional Service corev1.ServiceSpec `json:"service,omitempty"` }
WaterSpec defines the desired state of Water
func (*WaterSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WaterSpec.
func (*WaterSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type WaterStatus ¶
type WaterStatus struct { // INSERT ADDITIONAL STATUS FIELD - define observed state of cluster // Important: Run "make" to regenerate code after modifying this file DesiredReplicas int32 `json:"desired_replicas"` AlreadyReplicas int32 `json:"already_replicas"` DesiredDeployments int32 `json:"desired_deployments"` AlreadyDeployment int32 `json:"already_deployment"` }
WaterStatus defines the observed state of Water
func (*WaterStatus) DeepCopy ¶
func (in *WaterStatus) DeepCopy() *WaterStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WaterStatus.
func (*WaterStatus) DeepCopyInto ¶
func (in *WaterStatus) DeepCopyInto(out *WaterStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.