v1

package
v1.2.3 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package v1 containers API schema definitions for the polardbx v1 API group.

Index

Constants

This section is empty.

Variables

View Source
var (
	// GroupVersion is group version used to register objects.
	GroupVersion = schema.GroupVersion{
		Group:   "polardbx.aliyun.com",
		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

This section is empty.

Types

type PolarDBXCluster

type PolarDBXCluster struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// +kubebuilder:default={topology:{nodes:{cn:{replicas:2,template:{resources:{limits:{cpu:4,memory:"8Gi"}}}},dn:{replicas:2,template:{hostNetwork:true,resources:{limits:{cpu:4,memory:"8Gi"}}}}}}}
	Spec   PolarDBXClusterSpec   `json:"spec,omitempty"`
	Status PolarDBXClusterStatus `json:"status,omitempty"`
}

func (*PolarDBXCluster) DeepCopy

func (in *PolarDBXCluster) DeepCopy() *PolarDBXCluster

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

func (*PolarDBXCluster) DeepCopyInto

func (in *PolarDBXCluster) DeepCopyInto(out *PolarDBXCluster)

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

func (*PolarDBXCluster) DeepCopyObject

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

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

type PolarDBXClusterKnobs

type PolarDBXClusterKnobs struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   PolarDBXClusterKnobsSpec   `json:"spec,omitempty"`
	Status PolarDBXClusterKnobsStatus `json:"status,omitempty"`
}

func (*PolarDBXClusterKnobs) DeepCopy

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

func (*PolarDBXClusterKnobs) DeepCopyInto

func (in *PolarDBXClusterKnobs) DeepCopyInto(out *PolarDBXClusterKnobs)

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

func (*PolarDBXClusterKnobs) DeepCopyObject

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

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

type PolarDBXClusterKnobsList

type PolarDBXClusterKnobsList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []PolarDBXClusterKnobs `json:"items"`
}

func (*PolarDBXClusterKnobsList) DeepCopy

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

func (*PolarDBXClusterKnobsList) DeepCopyInto

func (in *PolarDBXClusterKnobsList) DeepCopyInto(out *PolarDBXClusterKnobsList)

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

func (*PolarDBXClusterKnobsList) DeepCopyObject

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

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

type PolarDBXClusterKnobsSpec

type PolarDBXClusterKnobsSpec struct {
	ClusterName string                        `json:"clusterName,omitempty"`
	Knobs       map[string]intstr.IntOrString `json:"knobs,omitempty"`
}

func (*PolarDBXClusterKnobsSpec) DeepCopy

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

func (*PolarDBXClusterKnobsSpec) DeepCopyInto

func (in *PolarDBXClusterKnobsSpec) DeepCopyInto(out *PolarDBXClusterKnobsSpec)

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

type PolarDBXClusterKnobsStatus

type PolarDBXClusterKnobsStatus struct {
	Size        int32       `json:"size,omitempty"`
	LastUpdated metav1.Time `json:"lastUpdated,omitempty"`
	Version     int64       `json:"version,omitempty"`
}

func (*PolarDBXClusterKnobsStatus) DeepCopy

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

func (*PolarDBXClusterKnobsStatus) DeepCopyInto

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

type PolarDBXClusterList

type PolarDBXClusterList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []PolarDBXCluster `json:"items"`
}

PolarDBXClusterList contains a list of PolarDBXCluster.

func (*PolarDBXClusterList) DeepCopy

func (in *PolarDBXClusterList) DeepCopy() *PolarDBXClusterList

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

func (*PolarDBXClusterList) DeepCopyInto

func (in *PolarDBXClusterList) DeepCopyInto(out *PolarDBXClusterList)

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

func (*PolarDBXClusterList) DeepCopyObject

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

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

type PolarDBXClusterSpec

type PolarDBXClusterSpec struct {
	// ShareGMS represents there's no standalone GMS instance but shares the first
	// DN as the GMS. It's not recommended in production but useful for tests in
	// environments with not so much CPU/memory resources.
	// Default is false.
	ShareGMS bool `json:"shareGMS,omitempty"`

	// ProtocolVersion represents the supported MySQL protocols provided by the cluster.
	// Must be either 5 (5.7) or 8 (8.0). Default is operator dependent.
	ProtocolVersion intstr.IntOrString `json:"protocolVersion,omitempty"`

	// ServiceName represents the name of main (access) service of the cluster.
	// It's set to the name of the cluster object when not provided.
	// +optional
	ServiceName string `json:"serviceName,omitempty"`

	// ServiceType represents the service type of main (access) service of the cluster.
	// Default is ClusterIP.
	ServiceType corev1.ServiceType `json:"serviceType,omitempty"`

	// Topology defines the desired node topology and templates.
	Topology polardbx.Topology `json:"topology,omitempty"`

	// Config defines the configuration of the current cluster. Both dynamic and
	// static configs of CN and DN are included.
	Config polardbx.Config `json:"config,omitempty"`

	// Privileges defines the extra accounts that should be created while provisioning
	// the cluster. Specifying an item for the default root account will overwrite the
	// default random password with the given one.
	Privileges []polardbx.PrivilegeItem `json:"privileges,omitempty"`

	// Security defines the security config of the cluster, like SSL.
	// +optional
	Security *polardbx.Security `json:"security,omitempty"`

	// UpgradeStrategy defines the upgrade strategy for stateless nodes.
	UpgradeStrategy polardbx.UpgradeStrategyType `json:"upgradeStrategy,omitempty"`

	// Restore defines the restore specification. When provided, the operator
	// will create the cluster in restore mode. Restore might fail due to lack of
	// backups silently.
	// +optional
	Restore *polardbx.RestoreSpec `json:"restore,omitempty"`
}

func (*PolarDBXClusterSpec) DeepCopy

func (in *PolarDBXClusterSpec) DeepCopy() *PolarDBXClusterSpec

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

func (*PolarDBXClusterSpec) DeepCopyInto

func (in *PolarDBXClusterSpec) DeepCopyInto(out *PolarDBXClusterSpec)

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

type PolarDBXClusterStatus

type PolarDBXClusterStatus struct {
	// Phase is the current phase of the cluster.
	Phase polardbx.Phase `json:"phase,omitempty"`

	// Stage is the current stage of the xstore.
	Stage polardbx.Stage `json:"stage,omitempty"`

	// Conditions represent the current service state of the cluster.
	// +optional
	// +patchMergeKey=type
	// +patchStrategy=merge
	Conditions []polardbx.Condition `json:"conditions,omitempty"`

	// ObservedGeneration is the observed generation of the xstore spec.
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`

	// Rand represents a random string value to avoid collision.
	Rand string `json:"randHash,omitempty"`

	// StatusForPrint represents the printable status of the cluster.
	StatusForPrint polardbx.StatusForPrint `json:"statusForPrint,omitempty"`

	// ReplicaStatus represents the replica status of the cluster.
	ReplicaStatus polardbx.ClusterReplicasStatus `json:"replicaStatus,omitempty"`

	// SpecSnapshot represents the snapshot of some aspects of the observed spec.
	// It should be updated atomically with the observed generation.
	SpecSnapshot *polardbx.SpecSnapshot `json:"specSnapshot,omitempty"`
}

func (*PolarDBXClusterStatus) DeepCopy

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

func (*PolarDBXClusterStatus) DeepCopyInto

func (in *PolarDBXClusterStatus) DeepCopyInto(out *PolarDBXClusterStatus)

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

type PolarDBXMonitor

type PolarDBXMonitor struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   PolarDBXMonitorSpec   `json:"spec,omitempty"`
	Status PolarDBXMonitorStatus `json:"status,omitempty"`
}

+kubebuilder:object:root=true +kubebuilder:resource:shortName=pxm;polardbxmonitor +kubebuilder:printcolumn:name="CLUSTER",type=string,JSONPath=`.spec.clusterName` +kubebuilder:printcolumn:name="INTERVAL",type=string,JSONPath=`.status.monitorSpecSnapshot.monitorInterval` +kubebuilder:printcolumn:name="STATUS",type=string,JSONPath=`.status.monitorStatus` +kubebuilder:printcolumn:name="AGE",type=date,JSONPath=`.metadata.creationTimestamp`

func (*PolarDBXMonitor) DeepCopy

func (in *PolarDBXMonitor) DeepCopy() *PolarDBXMonitor

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

func (*PolarDBXMonitor) DeepCopyInto

func (in *PolarDBXMonitor) DeepCopyInto(out *PolarDBXMonitor)

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

func (*PolarDBXMonitor) DeepCopyObject

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

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

type PolarDBXMonitorList

type PolarDBXMonitorList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []PolarDBXMonitor `json:"items"`
}

PolarDBXClusterList contains a list of PolarDBXCluster.

func (*PolarDBXMonitorList) DeepCopy

func (in *PolarDBXMonitorList) DeepCopy() *PolarDBXMonitorList

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

func (*PolarDBXMonitorList) DeepCopyInto

func (in *PolarDBXMonitorList) DeepCopyInto(out *PolarDBXMonitorList)

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

func (*PolarDBXMonitorList) DeepCopyObject

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

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

type PolarDBXMonitorSpec

type PolarDBXMonitorSpec struct {
	ClusterName string `json:"clusterName,omitempty"`

	// +kubebuilder:default="30s"
	// MonitorInterval define the metrics scrape interval
	MonitorInterval metav1.Duration `json:"monitorInterval,omitempty"`

	// +kubebuilder:default="10s"
	// MonitorInterval define the metrics scrape interval
	ScrapeTimeout metav1.Duration `json:"scrapeTimeout,omitempty"`
}

func (*PolarDBXMonitorSpec) DeepCopy

func (in *PolarDBXMonitorSpec) DeepCopy() *PolarDBXMonitorSpec

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

func (*PolarDBXMonitorSpec) DeepCopyInto

func (in *PolarDBXMonitorSpec) DeepCopyInto(out *PolarDBXMonitorSpec)

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

type PolarDBXMonitorStatus

type PolarDBXMonitorStatus struct {
	MonitorStatus polardbx.MonitorStatus `json:"monitorStatus,omitempty"`

	MonitorSpecSnapshot *PolarDBXMonitorSpec `json:"monitorSpecSnapshot,omitempty"`
}

func (*PolarDBXMonitorStatus) DeepCopy

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

func (*PolarDBXMonitorStatus) DeepCopyInto

func (in *PolarDBXMonitorStatus) DeepCopyInto(out *PolarDBXMonitorStatus)

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

type XStore

type XStore struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   XStoreSpec   `json:"spec,omitempty"`
	Status XStoreStatus `json:"status,omitempty"`
}

XStore is the schema for the xstore.

func (*XStore) DeepCopy

func (in *XStore) DeepCopy() *XStore

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

func (*XStore) DeepCopyInto

func (in *XStore) DeepCopyInto(out *XStore)

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

func (*XStore) DeepCopyObject

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

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

type XStoreList

type XStoreList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []XStore `json:"items"`
}

XStoreList contains a list of xstore object.

func (*XStoreList) DeepCopy

func (in *XStoreList) DeepCopy() *XStoreList

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

func (*XStoreList) DeepCopyInto

func (in *XStoreList) DeepCopyInto(out *XStoreList)

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

func (*XStoreList) DeepCopyObject

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

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

type XStoreSpec

type XStoreSpec struct {

	// Engine is the engine used by xstore. Default is "galaxy".
	// +optional
	Engine string `json:"engine,omitempty"`

	// ServiceName represents the service name of the xstore. Default is the same as the name.
	// +optional
	ServiceName string `json:"serviceName,omitempty"`

	// ServiceType represents the default service type of the xstore. Default is NodePort.
	// +optional
	ServiceType corev1.ServiceType `json:"serviceType,omitempty"`

	// ServiceLabels define the extra service labels of the xstore.
	// +optional
	ServiceLabels map[string]string `json:"serviceLabels,omitempty"`

	// Privileges defines the accounts that will be created and maintained automatically by
	// the controller.
	// +optional
	Privileges []xstore.Privilege `json:"privileges,omitempty"`

	// Topology is the specification of topology of the xstore.
	Topology xstore.Topology `json:"topology,omitempty"`

	// Config is the config of the xstore.
	Config xstore.Config `json:"config,omitempty"`

	// UpgradeStrategy is the strategy when upgrading xstore. Default is BestEffort.
	// +optional
	UpgradeStrategy xstore.UpgradeStrategy `json:"upgradeStrategy,omitempty"`
}

func (*XStoreSpec) DeepCopy

func (in *XStoreSpec) DeepCopy() *XStoreSpec

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

func (*XStoreSpec) DeepCopyInto

func (in *XStoreSpec) DeepCopyInto(out *XStoreSpec)

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

type XStoreStatus

type XStoreStatus struct {
	// Phase is the current phase of the xstore.
	Phase xstore.Phase `json:"phase,omitempty"`

	// Stage is the current stage in phase of the xstore.
	Stage xstore.Stage `json:"stage,omitempty"`

	// Conditions represents the current service state of xstore.
	// +optional
	// +patchMergeKey=type
	// +patchStrategy=merge
	Conditions []xstore.Condition `json:"conditions,omitempty"`

	// ObservedGeneration is the observed generation of the xstore spec.
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`

	// LeaderPod represents the pod name of the leader.
	LeaderPod string `json:"leaderPod,omitempty"`

	// ReadyPods represents the number of ready pods.
	ReadyPods int32 `json:"readyPods,omitempty"`

	// TotalPods represents the total number of pods.
	TotalPods int32 `json:"totalPods,omitempty"`

	// ReadyStatus represents the status of ready pods.
	ReadyStatus string `json:"readyStatus,omitempty"`

	// BoundVolumes represents the volumes used by this xstore.
	BoundVolumes map[string]*xstore.HostPathVolume `json:"boundVolumes,omitempty"`

	// LastVolumeSizeUpdateTime represents the last time that volumes' sizes updated.
	LastVolumeSizeUpdateTime *metav1.Time `json:"lastVolumeSizeUpdateTime,omitempty"`

	// TotalDataDirSize represents the total size of data dirs over all nodes.
	TotalDataDirSize string `json:"totalDataDirSize,omitempty"`

	// ObservedTopology records the snapshot of topology.
	ObservedTopology *xstore.Topology `json:"observedTopology,omitempty"`

	// ObservedConfig records the snapshot of mycnf.overlay
	ObservedConfig *xstore.Config `json:"observedConfig,omitempty"`

	// LastLogPurgeTime represents the last binlog/redo log purged time
	LastLogPurgeTime *metav1.Time `json:"lastLogPurgeTime,omitempty"`

	// Rand represents a random string value to avoid collision.
	Rand string `json:"randHash,omitempty"`

	// PodPorts represents the ports allocated (for host network)
	PodPorts map[string]xstore.PodPorts `json:"podPorts,omitempty"`

	// EngineVersion records the engine's version.
	EngineVersion string `json:"engineVersion,omitempty"`
}

func (*XStoreStatus) DeepCopy

func (in *XStoreStatus) DeepCopy() *XStoreStatus

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

func (*XStoreStatus) DeepCopyInto

func (in *XStoreStatus) DeepCopyInto(out *XStoreStatus)

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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