v1

package
v0.0.0-...-82ad568 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

This files implements helpful utils to manage components of openGauss.

Index

Constants

This section is empty.

Variables

View Source
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
)
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: "controller.k8s.do", Version: "v1"}

SchemeGroupVersion is group version used to register these objects

Functions

func Kind

func Kind(kind string) schema.GroupKind

Kind takes an unqualified kind and returns back a Group qualified GroupKind

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

func (in *OpenGauss) DeepCopy() *OpenGauss

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

func (*OpenGauss) DeepCopyInto

func (in *OpenGauss) DeepCopyInto(out *OpenGauss)

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

func (*OpenGauss) DeepCopyObject

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

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

func (*OpenGauss) IsMasterDeployed

func (og *OpenGauss) IsMasterDeployed() bool

IsMasterDeployed check if opengauss's master is deployed

func (*OpenGauss) IsReady

func (og *OpenGauss) IsReady() bool

IsReady check if opengauss is ready

func (*OpenGauss) IsReplicaDeployed

func (og *OpenGauss) IsReplicaDeployed() bool

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

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

func (*OpenGaussClusterConfiguration) DeepCopyInto

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

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.

type OriginOpenGaussCluster

type OriginOpenGaussCluster struct {
	PVC              string `json:"pvc"`
	MycatClusterName string `json:"mycatCluster"`
	Master           string `json:"master"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL