Documentation ¶
Overview ¶
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You 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 *
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.
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You 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 *
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=submarine.apache.org
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You 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.
The purpose of this file is to make the client know the Submarine type API object through the addKnownTypes method:
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You 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.
Index ¶
- Constants
- Variables
- func IsDefaultedSubmarineCluster(rc *SubmarineCluster) bool
- func Kind(kind string) schema.GroupKind
- func NewInt32(val int32) *int32
- func Resource(resource string) schema.GroupResource
- type ClusterStatus
- type NodesPlacementInfo
- type SubmarineCluster
- type SubmarineClusterClusterStatus
- type SubmarineClusterCondition
- type SubmarineClusterConditionType
- type SubmarineClusterList
- type SubmarineClusterNode
- type SubmarineClusterNodeRole
- type SubmarineClusterSpec
- type SubmarineClusterStatus
Constants ¶
const ( // ClusterNameLabelKey Label key for the ClusterName ClusterNameLabelKey string = "submarine-operator.k8s.io/cluster-name" // PodSpecMD5LabelKey label key for the PodSpec MD5 hash PodSpecMD5LabelKey string = "submarine-operator.k8s.io/podspec-md5" )
const ( // ResourcePlural is the id to identify plurals ResourcePlural = "submarineclusters" // ResourceSingular represents the id for identify singular resource ResourceSingular = "submarinecluster" // ResourceKind represent the resource kind ResourceKind = "SubmarineCluster" // ResourceVersion represent the resource version ResourceVersion = "v1alpha1" )
Variables ¶
var ( SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) AddToScheme = SchemeBuilder.AddToScheme )
var SchemeGroupVersion = schema.GroupVersion{ Group: submarine.GroupName, Version: submarine.Version, }
Functions ¶
func IsDefaultedSubmarineCluster ¶
func IsDefaultedSubmarineCluster(rc *SubmarineCluster) bool
IsDefaultedSubmarineCluster check if the SubmarineCluster is already defaulted
func Resource ¶
func Resource(resource string) schema.GroupResource
Types ¶
type ClusterStatus ¶
type ClusterStatus string
ClusterStatus Submarine Cluster status
const ( // ClusterStatusOK ClusterStatus OK ClusterStatusOK ClusterStatus = "OK" // ClusterStatusError ClusterStatus Error ClusterStatusError ClusterStatus = "Error" // ClusterStatusScaling ClusterStatus Scaling ClusterStatusScaling ClusterStatus = "Scaling" // ClusterStatusCalculatingRebalancing ClusterStatus Rebalancing ClusterStatusCalculatingRebalancing ClusterStatus = "Calculating Rebalancing" // ClusterStatusRebalancing ClusterStatus Rebalancing ClusterStatusRebalancing ClusterStatus = "Rebalancing" // ClusterStatusRollingUpdate ClusterStatus RollingUpdate ClusterStatusRollingUpdate ClusterStatus = "RollingUpdate" )
type NodesPlacementInfo ¶
type NodesPlacementInfo string
NodesPlacementInfo Submarine Nodes placement mode information
const ( // NodesPlacementInfoBestEffort the cluster nodes placement is in best effort, // it means you can have 2 masters (or more) on the same VM. NodesPlacementInfoBestEffort NodesPlacementInfo = "BestEffort" // NodesPlacementInfoOptimal the cluster nodes placement is optimal, // it means on master by VM NodesPlacementInfoOptimal NodesPlacementInfo = "Optimal" )
type SubmarineCluster ¶
type SubmarineCluster struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` // Spec represents the desired SubmarineCluster specification Spec SubmarineClusterSpec `json:"spec,omitempty"` // Status represents the current SubmarineCluster status Status SubmarineClusterStatus `json:"status,omitempty"` }
SubmarineCluster represents a Submarine Cluster +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func DefaultSubmarineCluster ¶
func DefaultSubmarineCluster(undefaultSubmarineCluster *SubmarineCluster) *SubmarineCluster
DefaultSubmarineCluster defaults SubmarineCluster
func (*SubmarineCluster) DeepCopy ¶
func (in *SubmarineCluster) DeepCopy() *SubmarineCluster
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubmarineCluster.
func (*SubmarineCluster) DeepCopyInto ¶
func (in *SubmarineCluster) DeepCopyInto(out *SubmarineCluster)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*SubmarineCluster) DeepCopyObject ¶
func (in *SubmarineCluster) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type SubmarineClusterClusterStatus ¶
type SubmarineClusterClusterStatus struct { Status ClusterStatus `json:"status"` NumberOfMaster int32 `json:"numberOfMaster,omitempty"` MinReplicationFactor int32 `json:"minReplicationFactor,omitempty"` MaxReplicationFactor int32 `json:"maxReplicationFactor,omitempty"` NodesPlacement NodesPlacementInfo `json:"nodesPlacementInfo,omitempty"` // In theory, we always have NbPods > NbSubmarineRunning > NbPodsReady NbPods int32 `json:"nbPods,omitempty"` NbPodsReady int32 `json:"nbPodsReady,omitempty"` NbSubmarineRunning int32 `json:"nbSubmarineNodesRunning,omitempty"` Nodes []SubmarineClusterNode `json:"nodes"` }
SubmarineClusterClusterStatus represent the Submarine Cluster status
func (*SubmarineClusterClusterStatus) DeepCopy ¶
func (in *SubmarineClusterClusterStatus) DeepCopy() *SubmarineClusterClusterStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubmarineClusterClusterStatus.
func (*SubmarineClusterClusterStatus) DeepCopyInto ¶
func (in *SubmarineClusterClusterStatus) DeepCopyInto(out *SubmarineClusterClusterStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (SubmarineClusterClusterStatus) String ¶
func (s SubmarineClusterClusterStatus) String() string
type SubmarineClusterCondition ¶
type SubmarineClusterCondition struct { // Type of workflow condition Type SubmarineClusterConditionType `json:"type"` // Status of the condition, one of True, False, Unknown. Status kapiv1.ConditionStatus `json:"status"` // Last time the condition was checked. LastProbeTime metav1.Time `json:"lastProbeTime,omitempty"` // Last time the condition transited from one status to another. LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"` // (brief) reason for the condition's last transition. Reason string `json:"reason,omitempty"` // Human readable message indicating details about last transition. Message string `json:"message,omitempty"` }
SubmarineClusterCondition represent the condition of the SubmarineCluster
func (*SubmarineClusterCondition) DeepCopy ¶
func (in *SubmarineClusterCondition) DeepCopy() *SubmarineClusterCondition
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubmarineClusterCondition.
func (*SubmarineClusterCondition) DeepCopyInto ¶
func (in *SubmarineClusterCondition) DeepCopyInto(out *SubmarineClusterCondition)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SubmarineClusterConditionType ¶
type SubmarineClusterConditionType string
SubmarineClusterConditionType is the type of SubmarineClusterCondition
const ( // SubmarineClusterOK means the SubmarineCluster is in a good shape SubmarineClusterOK SubmarineClusterConditionType = "ClusterOK" // SubmarineClusterScaling means the SubmarineCluster is currently in a scaling stage SubmarineClusterScaling SubmarineClusterConditionType = "Scaling" // SubmarineClusterRebalancing means the SubmarineCluster is currenlty rebalancing slots and keys SubmarineClusterRebalancing SubmarineClusterConditionType = "Rebalancing" // SubmarineClusterRollingUpdate means the SubmarineCluster is currenlty performing a rolling update of its nodes SubmarineClusterRollingUpdate SubmarineClusterConditionType = "RollingUpdate" )
type SubmarineClusterList ¶
type SubmarineClusterList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata"` Items []SubmarineCluster `json:"items"` }
SubmarineClusterList is a list of Submarine resources +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*SubmarineClusterList) DeepCopy ¶
func (in *SubmarineClusterList) DeepCopy() *SubmarineClusterList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubmarineClusterList.
func (*SubmarineClusterList) DeepCopyInto ¶
func (in *SubmarineClusterList) DeepCopyInto(out *SubmarineClusterList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*SubmarineClusterList) DeepCopyObject ¶
func (in *SubmarineClusterList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type SubmarineClusterNode ¶
type SubmarineClusterNode struct { ID string `json:"id"` Role SubmarineClusterNodeRole `json:"role"` IP string `json:"ip"` Port string `json:"port"` Slots []string `json:"slots,omitempty"` MasterRef string `json:"masterRef,omitempty"` PodName string `json:"podName"` Pod *kapiv1.Pod `json:"-"` }
SubmarineClusterNode represent a SubmarineCluster Node
func (*SubmarineClusterNode) DeepCopy ¶
func (in *SubmarineClusterNode) DeepCopy() *SubmarineClusterNode
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubmarineClusterNode.
func (*SubmarineClusterNode) DeepCopyInto ¶
func (in *SubmarineClusterNode) DeepCopyInto(out *SubmarineClusterNode)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (SubmarineClusterNode) String ¶
func (n SubmarineClusterNode) String() string
type SubmarineClusterNodeRole ¶
type SubmarineClusterNodeRole string
SubmarineClusterNodeRole SubmarineCluster Node Role type
const ( // SubmarineClusterNodeRoleMaster SubmarineCluster Master node role SubmarineClusterNodeRoleMaster SubmarineClusterNodeRole = "Master" // SubmarineClusterNodeRoleSlave SubmarineCluster Master node role SubmarineClusterNodeRoleSlave SubmarineClusterNodeRole = "Slave" // SubmarineClusterNodeRoleNone None node role SubmarineClusterNodeRoleNone SubmarineClusterNodeRole = "None" )
type SubmarineClusterSpec ¶
type SubmarineClusterSpec struct { NumberOfMaster *int32 `json:"numberOfMaster,omitempty"` ReplicationFactor *int32 `json:"replicationFactor,omitempty"` // ServiceName name used to create the Kubernetes Service that reference the Submarine Cluster nodes. // if ServiceName is empty, the SubmarineCluster.Name will be use for creating the service. ServiceName string `json:"serviceName,omitempty"` // PodTemplate contains the pod specification that should run the Submarine-server process PodTemplate *kapiv1.PodTemplateSpec `json:"podTemplate,omitempty"` // Labels for created Submarine-cluster (deployment, rs, pod) (if any) AdditionalLabels map[string]string `json:"AdditionalLabels,omitempty"` Name string `json:"name"` School string `json:"school"` Email string `json:"email"` Address string `json:"address"` }
SubmarineClusterSpec contains SubmarineCluster specification
func (*SubmarineClusterSpec) DeepCopy ¶
func (in *SubmarineClusterSpec) DeepCopy() *SubmarineClusterSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubmarineClusterSpec.
func (*SubmarineClusterSpec) DeepCopyInto ¶
func (in *SubmarineClusterSpec) DeepCopyInto(out *SubmarineClusterSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SubmarineClusterStatus ¶
type SubmarineClusterStatus struct { // Conditions represent the latest available observations of an object's current state. Conditions []SubmarineClusterCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"` // Status of the condition, one of True, False, Unknown. Status kapiv1.ConditionStatus `json:"status"` // StartTime represents time when the workflow was acknowledged by the Workflow controller // It is not guaranteed to be set in happens-before order across separate operations. // It is represented in RFC3339 form and is in UTC. // StartTime doesn't consider start time of `ExternalReference` StartTime *metav1.Time `json:"startTime,omitempty"` // (brief) reason for the condition's last transition. Reason string `json:"reason,omitempty"` // Human readable message indicating details about last transition. Message string `json:"message,omitempty"` // Cluster a view of the current SubmarineCluster Cluster SubmarineClusterClusterStatus }
SubmarineClusterStatus contains SubmarineCluster status
func (*SubmarineClusterStatus) DeepCopy ¶
func (in *SubmarineClusterStatus) DeepCopy() *SubmarineClusterStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubmarineClusterStatus.
func (*SubmarineClusterStatus) DeepCopyInto ¶
func (in *SubmarineClusterStatus) DeepCopyInto(out *SubmarineClusterStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.