Documentation ¶
Overview ¶
This files implements helpful utils to manage components of openGauss.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // SchemeBuilder initializes a scheme builder SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) // AddToScheme is a global function that registers this API group & version to a scheme AddToScheme = SchemeBuilder.AddToScheme )
var SchemeGroupVersion = schema.GroupVersion{Group: "controller.k8s.do", Version: "v1"}
SchemeGroupVersion is group version used to register these objects
Functions ¶
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource takes an unqualified resource and returns a Group qualified GroupResource
Types ¶
type MycatStatefulSet ¶
type MycatStatefulSet struct { Replicas *int32 `json:"replicas"` Image string `json:"image"` Resources *corev1.ResourceRequirements `json:"resources,omitempty"` }
func (*MycatStatefulSet) DeepCopy ¶
func (in *MycatStatefulSet) DeepCopy() *MycatStatefulSet
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MycatStatefulSet.
func (*MycatStatefulSet) DeepCopyInto ¶
func (in *MycatStatefulSet) DeepCopyInto(out *MycatStatefulSet)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type OpenGauss ¶
type OpenGauss struct { metav1.TypeMeta `json:",inline"` // +optional metav1.ObjectMeta `json:"metadata,omitempty"` // +optional Status *OpenGaussStatus `json:"status,omitempty"` Spec *OpenGaussSpec `json:"spec,omitempty"` }
OpenGauss is a top-level type
func (*OpenGauss) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenGauss.
func (*OpenGauss) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*OpenGauss) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*OpenGauss) IsMasterDeployed ¶
IsMasterDeployed check if opengauss's master is deployed
func (*OpenGauss) IsReplicaDeployed ¶
IsReplicaDeployed check if opengauss's replicas is deployed
type OpenGaussClusterConfiguration ¶
type OpenGaussClusterConfiguration struct { Master *OpenGaussStatefulSet `json:"master"` // Master Configuration Worker *OpenGaussStatefulSet `json:"worker"` // Replicas Configuration Mycat *MycatStatefulSet `json:"mycat"` // Mycat Configuration Origin *OriginOpenGaussCluster `json:"origin"` // Multi-Master shared info Tables []string `json:"tables"` }
Define OpenGauss's needs for master and replicas
func (*OpenGaussClusterConfiguration) DeepCopy ¶
func (in *OpenGaussClusterConfiguration) DeepCopy() *OpenGaussClusterConfiguration
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenGaussClusterConfiguration.
func (*OpenGaussClusterConfiguration) DeepCopyInto ¶
func (in *OpenGaussClusterConfiguration) DeepCopyInto(out *OpenGaussClusterConfiguration)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type OpenGaussList ¶
type OpenGaussList struct { metav1.TypeMeta `json:",inline"` // +optional metav1.ListMeta `json:"metadata,omitempty"` Items []OpenGauss `json:"items"` }
no client needed for list as it's been created in above
func (*OpenGaussList) DeepCopy ¶
func (in *OpenGaussList) DeepCopy() *OpenGaussList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenGaussList.
func (*OpenGaussList) DeepCopyInto ¶
func (in *OpenGaussList) DeepCopyInto(out *OpenGaussList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*OpenGaussList) DeepCopyObject ¶
func (in *OpenGaussList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type OpenGaussSpec ¶
type OpenGaussSpec struct { Image string `json:"image"` ImagePullPolicy string `json:"imagePullPolicy"` OpenGauss *OpenGaussClusterConfiguration `json:"opengauss"` Resources *corev1.ResourceRequirements `json:"resources,omitempty"` StorageClassName string `json:"storageClassName,omitempty"` }
func (*OpenGaussSpec) DeepCopy ¶
func (in *OpenGaussSpec) DeepCopy() *OpenGaussSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenGaussSpec.
func (*OpenGaussSpec) DeepCopyInto ¶
func (in *OpenGaussSpec) DeepCopyInto(out *OpenGaussSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type OpenGaussStatefulSet ¶
type OpenGaussStatefulSet struct { Replicas *int32 `json:"replicas"` Resources *corev1.ResourceRequirements `json:"resources,omitempty"` }
func (*OpenGaussStatefulSet) DeepCopy ¶
func (in *OpenGaussStatefulSet) DeepCopy() *OpenGaussStatefulSet
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenGaussStatefulSet.
func (*OpenGaussStatefulSet) DeepCopyInto ¶
func (in *OpenGaussStatefulSet) DeepCopyInto(out *OpenGaussStatefulSet)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type OpenGaussStatus ¶
type OpenGaussStatus struct { OpenGaussStatus string `json:"opengaussStatus"` // OpenGauss if ready or not ReadyMaster string `json:"readyMaster,omitempty"` // Ready Master number ReadyReplicas string `json:"readyReplicas,omitempty"` // Ready Replicas number ReadyMycat string `json:"readyMycat,omitempty"` MasterStatefulset string `json:"masterStatefulset,omitempty"` // name of master statefulset ReplicasStatefulset string `json:"replicasStatefulset,omitempty"` // name of replicas statefulset PersistentVolumeClaimName string `json:"persistentVolumeClaimName,omitempty"` // name of pvc MasterIPs []string `json:"masterIPs,omitempty"` // master ips ReplicasIPs []string `json:"replicasIPs,omitempty"` // replicas ips }
OpenGauss Cluster's status
func (*OpenGaussStatus) DeepCopy ¶
func (in *OpenGaussStatus) DeepCopy() *OpenGaussStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenGaussStatus.
func (*OpenGaussStatus) DeepCopyInto ¶
func (in *OpenGaussStatus) DeepCopyInto(out *OpenGaussStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.