Documentation
¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the codis v1alpha1 API group +k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=github.com/tangcong/codis-operator/pkg/apis/codis +k8s:defaulter-gen=TypeMeta +groupName=codis.k8s.io
Package v1alpha1 contains API Schema definitions for the codis v1alpha1 API group +k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=github.com/tangcong/codis-operator/pkg/apis/codis +k8s:defaulter-gen=TypeMeta +groupName=codis.k8s.io
Index ¶
- Variables
- func Resource(resource string) schema.GroupResource
- type CodisCluster
- type CodisClusterList
- type CodisClusterSpec
- type CodisClusterStatus
- type CodisDashboardSpec
- type CodisDashboardStatus
- type CodisFeSpec
- type CodisFeStatus
- type CodisProxyHPASpec
- type CodisProxySpec
- type CodisProxyStatus
- type CodisServerSpec
- type CodisServerStatus
- type ContainerSpec
- type MemberPhase
- type ResourceRequirement
- type SentinelSpec
- type SentinelStatus
Constants ¶
This section is empty.
Variables ¶
var ( // SchemeGroupVersion is group version used to register these objects SchemeGroupVersion = schema.GroupVersion{Group: "codis.k8s.io", Version: "v1alpha1"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion} // AddToScheme is required by pkg/client/... AddToScheme = SchemeBuilder.AddToScheme )
Functions ¶
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource is required by pkg/client/listers/...
Types ¶
type CodisCluster ¶
type CodisCluster struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec CodisClusterSpec `json:"spec"` Status CodisClusterStatus `json:"status,omitempty"` }
CodisCluster describes a database.
func (*CodisCluster) DeepCopy ¶
func (in *CodisCluster) DeepCopy() *CodisCluster
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CodisCluster.
func (*CodisCluster) DeepCopyInto ¶
func (in *CodisCluster) DeepCopyInto(out *CodisCluster)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*CodisCluster) DeepCopyObject ¶
func (in *CodisCluster) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type CodisClusterList ¶
type CodisClusterList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata"` Items []CodisCluster `json:"items"` }
+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object CodisClusterList is a list of CodisCluster resources
func (*CodisClusterList) DeepCopy ¶
func (in *CodisClusterList) DeepCopy() *CodisClusterList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CodisClusterList.
func (*CodisClusterList) DeepCopyInto ¶
func (in *CodisClusterList) DeepCopyInto(out *CodisClusterList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*CodisClusterList) DeepCopyObject ¶
func (in *CodisClusterList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type CodisClusterSpec ¶
type CodisClusterSpec struct { SchedulerName string `json:"schedulerName,omitempty"` CodisProxy CodisProxySpec `json:"codisProxy,omitempty"` CodisServer CodisServerSpec `json:"codisServer,omitempty"` CodisDashboard CodisDashboardSpec `json:"codisDashboard,omitempty"` CodisFe CodisFeSpec `json:"codisFe,omitempty"` Sentinel SentinelSpec `json:"sentinel,omitempty"` CoordinatorName string `json:"coordinatorName"` CoordinatorAddr string `json:"coordinatorAddr"` }
CodisClusterSpec describes the attributes that a user creates on a codis cluster
func (*CodisClusterSpec) DeepCopy ¶
func (in *CodisClusterSpec) DeepCopy() *CodisClusterSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CodisClusterSpec.
func (*CodisClusterSpec) DeepCopyInto ¶
func (in *CodisClusterSpec) DeepCopyInto(out *CodisClusterSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CodisClusterStatus ¶
type CodisClusterStatus struct { CodisProxy CodisProxyStatus `json:"codisProxy,omitempty"` CodisServer CodisServerStatus `json:"codisServer,omitempty"` CodisDashboard CodisDashboardStatus `json:"codisDashboard,omitempty"` CodisFe CodisFeStatus `json:"codisFeStatus,omitempty"` Sentinel SentinelStatus `json:"sentinelStatus,omitempty"` }
CodisClusterStatus represents the current status of a codis cluster.
func (*CodisClusterStatus) DeepCopy ¶
func (in *CodisClusterStatus) DeepCopy() *CodisClusterStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CodisClusterStatus.
func (*CodisClusterStatus) DeepCopyInto ¶
func (in *CodisClusterStatus) DeepCopyInto(out *CodisClusterStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CodisDashboardSpec ¶
type CodisDashboardSpec struct { ContainerSpec Replicas int32 `json:"replicas"` ProductAuth string `json:"productAuth"` }
CodisDashboardSpec contains details of CodisDashboard
func (*CodisDashboardSpec) DeepCopy ¶
func (in *CodisDashboardSpec) DeepCopy() *CodisDashboardSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CodisDashboardSpec.
func (*CodisDashboardSpec) DeepCopyInto ¶
func (in *CodisDashboardSpec) DeepCopyInto(out *CodisDashboardSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CodisDashboardStatus ¶
type CodisDashboardStatus struct { Phase MemberPhase `json:"phase,omitempty"` StatefulSet *apps.StatefulSetStatus `json:"statefulSet,omitempty"` }
func (*CodisDashboardStatus) DeepCopy ¶
func (in *CodisDashboardStatus) DeepCopy() *CodisDashboardStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CodisDashboardStatus.
func (*CodisDashboardStatus) DeepCopyInto ¶
func (in *CodisDashboardStatus) DeepCopyInto(out *CodisDashboardStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CodisFeSpec ¶
type CodisFeSpec struct { ContainerSpec Replicas int32 `json:"replicas"` ServiceType corev1.ServiceType `json:"serviceType"` ServiceAnnotations map[string]string `json:"serviceAnnotations,omitempty"` }
CodisFeSpec contains details of CodisFe
func (*CodisFeSpec) DeepCopy ¶
func (in *CodisFeSpec) DeepCopy() *CodisFeSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CodisFeSpec.
func (*CodisFeSpec) DeepCopyInto ¶
func (in *CodisFeSpec) DeepCopyInto(out *CodisFeSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CodisFeStatus ¶
type CodisFeStatus struct { Phase MemberPhase `json:"phase,omitempty"` Deployment *apps.DeploymentStatus `json:"deployment,omitempty"` }
func (*CodisFeStatus) DeepCopy ¶
func (in *CodisFeStatus) DeepCopy() *CodisFeStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CodisFeStatus.
func (*CodisFeStatus) DeepCopyInto ¶
func (in *CodisFeStatus) DeepCopyInto(out *CodisFeStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CodisProxyHPASpec ¶
type CodisProxyHPASpec struct { MinReplicas int32 `json:"minReplicas"` MaxReplicas int32 `json:"maxReplicas"` CpuUsedThreshold int32 `json:"cpuUsedThreshold"` }
func (*CodisProxyHPASpec) DeepCopy ¶
func (in *CodisProxyHPASpec) DeepCopy() *CodisProxyHPASpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CodisProxyHPASpec.
func (*CodisProxyHPASpec) DeepCopyInto ¶
func (in *CodisProxyHPASpec) DeepCopyInto(out *CodisProxyHPASpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CodisProxySpec ¶
type CodisProxySpec struct { ContainerSpec Replicas int32 `json:"replicas"` SessionAuth string `json:"sessionAuth"` HpaSpec CodisProxyHPASpec `json:"hpaSpec,omitempty"` //how many pods we can add at a time MaxSurge int `json:"maxSurge,omitempty"` //MaxUnavailable define how many pods can be unavailable during the rolling update NodeSelector map[string]string `json:"nodeSelector,omitempty"` Tolerations []corev1.Toleration `json:"tolerations,omitempty"` ServiceType corev1.ServiceType `json:"serviceType"` ServiceAnnotations map[string]string `json:"serviceAnnotations,omitempty"` }
CodisProxySpec contains details of CodisProxy member
func (*CodisProxySpec) DeepCopy ¶
func (in *CodisProxySpec) DeepCopy() *CodisProxySpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CodisProxySpec.
func (*CodisProxySpec) DeepCopyInto ¶
func (in *CodisProxySpec) DeepCopyInto(out *CodisProxySpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CodisProxyStatus ¶
type CodisProxyStatus struct { Phase MemberPhase `json:"phase,omitempty"` Deployment *apps.DeploymentStatus `json:"deployment,omitempty"` }
func (*CodisProxyStatus) DeepCopy ¶
func (in *CodisProxyStatus) DeepCopy() *CodisProxyStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CodisProxyStatus.
func (*CodisProxyStatus) DeepCopyInto ¶
func (in *CodisProxyStatus) DeepCopyInto(out *CodisProxyStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CodisServerSpec ¶
type CodisServerSpec struct { ContainerSpec Replicas int32 `json:"replicas"` GroupReplicas int32 `json:"groupReplicas"` //When a partition is specified, all Pods with an ordinal that is greater than or equal to the partition will be updated when the StatefulSet’s .spec.template is updated. If a Pod that has an ordinal less than the partition is deleted or otherwise terminated, it will be restored to its original configuration. Partition int32 `json:"partition,omitempty"` StorageClassName *string `json:"storageClassName,omitempty"` NodeSelector map[string]string `json:"nodeSelector,omitempty"` Tolerations []corev1.Toleration `json:"tolerations,omitempty"` }
CodisServerSpec contains details of CodisServer member
func (*CodisServerSpec) DeepCopy ¶
func (in *CodisServerSpec) DeepCopy() *CodisServerSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CodisServerSpec.
func (*CodisServerSpec) DeepCopyInto ¶
func (in *CodisServerSpec) DeepCopyInto(out *CodisServerSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CodisServerStatus ¶
type CodisServerStatus struct { Phase MemberPhase `json:"phase,omitempty"` StatefulSet *apps.StatefulSetStatus `json:"statefulSet,omitempty"` }
func (*CodisServerStatus) DeepCopy ¶
func (in *CodisServerStatus) DeepCopy() *CodisServerStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CodisServerStatus.
func (*CodisServerStatus) DeepCopyInto ¶
func (in *CodisServerStatus) DeepCopyInto(out *CodisServerStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ContainerSpec ¶
type ContainerSpec struct { Image string `json:"image"` ImagePullPolicy corev1.PullPolicy `json:"imagePullPolicy,omitempty"` Requests *ResourceRequirement `json:"requests,omitempty"` Limits *ResourceRequirement `json:"limits,omitempty"` }
ContainerSpec is the container spec of a pod
func (*ContainerSpec) DeepCopy ¶
func (in *ContainerSpec) DeepCopy() *ContainerSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ContainerSpec.
func (*ContainerSpec) DeepCopyInto ¶
func (in *ContainerSpec) DeepCopyInto(out *ContainerSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MemberPhase ¶
type MemberPhase string
MemberPhase is the current state of member
const ( // NormalPhase represents normal state of Codis cluster. NormalPhase MemberPhase = "Normal" // UpgradePhase represents the upgrade state of Codis cluster. UpgradePhase MemberPhase = "Upgrade" )
type ResourceRequirement ¶
type ResourceRequirement struct { // CPU is how many cores a pod requires CPU string `json:"cpu,omitempty"` // Memory is how much memory a pod requires Memory string `json:"memory,omitempty"` // Storage is storage size a pod requires Storage string `json:"storage,omitempty"` }
ResourceRequirement is resource requirements for a pod
func (*ResourceRequirement) DeepCopy ¶
func (in *ResourceRequirement) DeepCopy() *ResourceRequirement
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceRequirement.
func (*ResourceRequirement) DeepCopyInto ¶
func (in *ResourceRequirement) DeepCopyInto(out *ResourceRequirement)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SentinelSpec ¶
type SentinelSpec struct { ContainerSpec Replicas int32 `json:"replicas"` StorageClassName *string `json:"storageClassName,omitempty"` NodeSelector map[string]string `json:"nodeSelector,omitempty"` Tolerations []corev1.Toleration `json:"tolerations,omitempty"` }
SentinelSpec contains details of Sentinel
func (*SentinelSpec) DeepCopy ¶
func (in *SentinelSpec) DeepCopy() *SentinelSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SentinelSpec.
func (*SentinelSpec) DeepCopyInto ¶
func (in *SentinelSpec) DeepCopyInto(out *SentinelSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SentinelStatus ¶
type SentinelStatus struct { Phase MemberPhase `json:"phase,omitempty"` StatefulSet *apps.StatefulSetStatus `json:"statefulSet,omitempty"` }
func (*SentinelStatus) DeepCopy ¶
func (in *SentinelStatus) DeepCopy() *SentinelStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SentinelStatus.
func (*SentinelStatus) DeepCopyInto ¶
func (in *SentinelStatus) DeepCopyInto(out *SentinelStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.