v1alpha1

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2024 License: Apache-2.0 Imports: 10 Imported by: 1

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the nine v1alpha1 API group +kubebuilder:object:generate=true +groupName=nine.nineinfra.tech

Index

Constants

View Source
const (
	StateAvailable = "Available"
	StateDeploying = "Deploying"
	StateFailed    = "Failed"
)
View Source
const (
	DbTypePostgres = "postgres"
	DbTypeMysql    = "mysql"
)
View Source
const (
	NineClusterFeatureOlap          = "olap"
	NineClusterFeatureStorage       = "storage"
	NineClusterFeatureCustomStorage = "custom-storage"
	NineClusterFeatureKyuubiHA      = "kyuubi-ha"
)
View Source
const (
	ClusterAuthTypeSimple = "simple"
	ClusterAuthTypeJDBC   = "JDBC"
)
View Source
const ClusterNameSuffix = "-nine"
View Source
const ClusterSign = "nine"
View Source
const DataHouseDir = "/nineinfra/datahouse"
View Source
const DefaultDbType = "postgres"

DefaultDbType ,the default value of the DbType, support mysql and postgres

View Source
const DefaultMinioBucket = "nineinfra"
View Source
const DefaultMinioDataHouseFolder = "datahouse/"

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "nine.nineinfra.tech", Version: "v1alpha1"}

	// 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
)
View Source
var NineDatahouseClusterset = []ClusterInfo{
	{
		Type:    KyuubiClusterType,
		Version: "v1.8.0",
		Resource: ResourceConfig{
			Replicas: 1,
		},
		Configs: ClusterConfig{
			Image: ImageConfig{
				Repository: "nineinfra/kyuubi",
				Tag:        "v1.8.0",
				PullPolicy: "IfNotPresent",
			},
			Conf: map[string]string{
				"kyuubi.frontend.connection.url.use.hostname": "false",
				"kyuubi.frontend.thrift.binary.bind.port":     "10009",
				"kyuubi.frontend.thrift.http.bind.port":       "10010",
				"kyuubi.frontend.rest.bind.port":              "10099",
				"kyuubi.frontend.mysql.bind.port":             "3309",
				"kyuubi.frontend.protocols":                   "REST,THRIFT_BINARY",
				"kyuubi.metrics.enabled":                      "false",
			},
		},
		ClusterRefs: []ClusterType{
			SparkClusterType,
		},
	},
	{
		Type:    MetaStoreClusterType,
		Version: "v3.1.3",
		Configs: ClusterConfig{
			Image: ImageConfig{
				Repository: "nineinfra/metastore",
				Tag:        "v3.1.3",
				PullPolicy: "IfNotPresent",
			},
		},
	},
	{
		Type:    DatabaseClusterType,
		SubType: DbTypePostgres,
		Version: "v16.0.0",
	},
}
View Source
var NineDatahouseFullClusterset = []ClusterInfo{
	{
		Type:    KyuubiClusterType,
		Version: "v1.8.0",
		Resource: ResourceConfig{
			Replicas: 1,
		},
		Configs: ClusterConfig{
			Image: ImageConfig{
				Repository: "nineinfra/kyuubi",
				Tag:        "v1.8.0",
				PullPolicy: "IfNotPresent",
			},
			Conf: map[string]string{
				"kyuubi.frontend.connection.url.use.hostname": "false",
				"kyuubi.frontend.thrift.binary.bind.port":     "10009",
				"kyuubi.frontend.thrift.http.bind.port":       "10010",
				"kyuubi.frontend.rest.bind.port":              "10099",
				"kyuubi.frontend.mysql.bind.port":             "3309",
				"kyuubi.frontend.protocols":                   "REST,THRIFT_BINARY",
				"kyuubi.metrics.enabled":                      "false",
			},
		},
		ClusterRefs: []ClusterType{
			SparkClusterType,
		},
	},
	{
		Type:    MetaStoreClusterType,
		Version: "v3.1.3",
		Configs: ClusterConfig{
			Image: ImageConfig{
				Repository: "nineinfra/metastore",
				Tag:        "v3.1.3",
				PullPolicy: "IfNotPresent",
			},
		},
	},
	{
		Type:    DatabaseClusterType,
		SubType: DbTypePostgres,
		Version: "v16.0.0",
	},
	{
		Type:    MinioClusterType,
		Version: "RELEASE.2023-09-07T02-05-02Z",
		Configs: ClusterConfig{
			Image: ImageConfig{
				Repository: "minio/minio",
				Tag:        "RELEASE.2023-09-07T02-05-02Z",
				PullPolicy: "IfNotPresent",
			},
		},
	},
	{
		Type:    SparkClusterType,
		Version: "v3.2.4",
		Configs: ClusterConfig{
			Image: ImageConfig{
				Repository: "nineinfra/spark",
				Tag:        "v3.2.4",
				PullPolicy: "IfNotPresent",
			},
		},
	},
	{
		Type:    DorisClusterType,
		Version: "v2.0.2",
		Configs: ClusterConfig{
			Auth: AuthConfig{
				UserName: "root",
				Password: "",
			},
		},
		ClusterRefs: []ClusterType{
			DorisFEClusterType,
			DorisBEClusterType,
		},
	},
	{
		Type:    DorisFEClusterType,
		Version: "v2.0.2",
		Configs: ClusterConfig{
			Image: ImageConfig{
				Repository: "selectdb/doris.fe-ubuntu",
				Tag:        "2.0.2",
				PullPolicy: "IfNotPresent",
			},
		},
		Resource: ResourceConfig{
			Replicas: 3,
			ResourceRequirements: corev1.ResourceRequirements{
				Requests: corev1.ResourceList{
					"storage": *resource.NewQuantity(int64(20*1024*1024*1024), resource.BinarySI),
				},
			},
		},
	},
	{
		Type:    DorisBEClusterType,
		Version: "v2.0.2",
		Configs: ClusterConfig{
			Image: ImageConfig{
				Repository: "selectdb/doris.be-ubuntu",
				Tag:        "2.0.2",
				PullPolicy: "IfNotPresent",
			},
		},
		Resource: ResourceConfig{
			Replicas: 3,
			ResourceRequirements: corev1.ResourceRequirements{
				Requests: corev1.ResourceList{
					"storage": *resource.NewQuantity(int64(100*1024*1024*1024), resource.BinarySI),
				},
			},
		},
	},
	{
		Type:    ZookeeperClusterType,
		Version: "v3.8.3",
		Configs: ClusterConfig{
			Image: ImageConfig{
				Repository: "nineinfra/zookeeper",
				Tag:        "v3.8.3",
				PullPolicy: "IfNotPresent",
			},
		},
	},
	{
		Type:    HdfsClusterType,
		Version: "v3.3.6",
		Configs: ClusterConfig{
			Image: ImageConfig{
				Repository: "nineinfra/hdfs",
				Tag:        "v3.3.6",
				PullPolicy: "IfNotPresent",
			},
		},
		ClusterRefs: []ClusterType{
			HdfsNameNodeClusterType,
			HdfsDataNodeClusterType,
			HdfsJournalNodeClusterType,
		},
	},
	{
		Type:    HdfsNameNodeClusterType,
		Version: "v3.3.6",
		Resource: ResourceConfig{
			Replicas: 2,
		},
	},
	{
		Type:    HdfsDataNodeClusterType,
		Version: "v3.3.6",
	},
	{
		Type:    HdfsJournalNodeClusterType,
		Version: "v3.3.6",
		Resource: ResourceConfig{
			Replicas: 3,
		},
	},
}
View Source
var NineInfraSupportedOlapList = []ClusterType{DorisClusterType}

Functions

This section is empty.

Types

type AuthConfig added in v0.5.2

type AuthConfig struct {
	// AuthType. The auth type of the cluster,default:ClusterAuthTypeSimple.
	// +optional
	AuthType string `json:"authType,omitempty"`
	// UserName for the cluster access.
	// +optional
	UserName string `json:"userName,omitempty"`
	// Password for the cluster access.
	// +optional
	Password string `json:"password,omitempty"`
}

func (*AuthConfig) DeepCopy added in v0.5.2

func (in *AuthConfig) DeepCopy() *AuthConfig

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

func (*AuthConfig) DeepCopyInto added in v0.5.2

func (in *AuthConfig) DeepCopyInto(out *AuthConfig)

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

type ClusterConfig added in v0.4.4

type ClusterConfig struct {
	Image ImageConfig `json:"image,omitempty"`
	// Auth, Auth info of the cluster
	// +optional
	Auth AuthConfig `json:"auth,omitempty"`
	// Conf,k,v pairs will be into the main conf file
	// +optional
	Conf map[string]string `json:"conf,omitempty"`
	// K8sConf. k/v configs for the cluster in k8s.such as the cluster domain
	// +optional
	K8sConf map[string]string `json:"k8sConf,omitempty"`
}

func (*ClusterConfig) DeepCopy added in v0.4.4

func (in *ClusterConfig) DeepCopy() *ClusterConfig

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

func (*ClusterConfig) DeepCopyInto added in v0.4.4

func (in *ClusterConfig) DeepCopyInto(out *ClusterConfig)

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

type ClusterInfo

type ClusterInfo struct {
	// Version of the cluster.
	Version string `json:"version"`
	// Type of the cluster.
	Type ClusterType `json:"type"`
	// Name. name of the cluster.
	// +optional
	Name string `json:"name"`
	// SubType,some type of cluster such as database has subtype,Support mysql,postgres
	// +optional
	SubType string `json:"subType,omitempty"`
	// Resource config of the cluster.
	// +optional
	Resource ResourceConfig `json:"resource,omitempty"`
	// +optional
	Configs ClusterConfig `json:"configs,omitempty"`
	// +optional
	ClusterRefs []ClusterType `json:"clusterRefs,omitempty"`
}

func (*ClusterInfo) DeepCopy

func (in *ClusterInfo) DeepCopy() *ClusterInfo

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

func (*ClusterInfo) DeepCopyInto

func (in *ClusterInfo) DeepCopyInto(out *ClusterInfo)

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

type ClusterStorage added in v0.6.0

type ClusterStorage string
const (
	NineClusterStorageMinio ClusterStorage = "minio"
	NineClusterStorageHdfs  ClusterStorage = "hdfs"
)

type ClusterType

type ClusterType string
const (
	KyuubiClusterType          ClusterType = "kyuubi"
	DorisClusterType           ClusterType = "doris"
	DorisFEClusterType         ClusterType = "doris-fe"
	DorisBEClusterType         ClusterType = "doris-be"
	SparkClusterType           ClusterType = "spark"
	MetaStoreClusterType       ClusterType = "metastore"
	DatabaseClusterType        ClusterType = "database"
	MinioClusterType           ClusterType = "minio"
	ZookeeperClusterType       ClusterType = "zookeeper"
	HdfsClusterType            ClusterType = "hdfs"
	HdfsNameNodeClusterType    ClusterType = "namenode"
	HdfsDataNodeClusterType    ClusterType = "datanode"
	HdfsJournalNodeClusterType ClusterType = "journalnode"
)

Different types of clusters.

type DatabaseCluster added in v0.4.3

type DatabaseCluster struct {
	// connection Url of the database.such as jdbc:mysql://mysql:3306/metastore
	ConnectionUrl string `json:"connectionUrl"`
	//Db type.Specified the driver name.Support mysql,postgres
	DbType string `json:"dbType"`
	// Username of the database.
	UserName string `json:"userName"`
	// password
	Password string `json:"password"`
}

func (*DatabaseCluster) DeepCopy added in v0.4.3

func (in *DatabaseCluster) DeepCopy() *DatabaseCluster

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

func (*DatabaseCluster) DeepCopyInto added in v0.4.3

func (in *DatabaseCluster) DeepCopyInto(out *DatabaseCluster)

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

type HdfsExposedInfo added in v0.7.0

type HdfsExposedInfo struct {
	// DefaultFS fs.defaultFS of the hdfs.
	DefaultFS string `json:"defaultFS"`
	// HdfsSite hdfsSite.
	HdfsSite map[string]string `json:"hdfsSite"`
	// CoreSite coreSite.
	CoreSite map[string]string `json:"coreSite"`
}

func (*HdfsExposedInfo) DeepCopy added in v0.7.0

func (in *HdfsExposedInfo) DeepCopy() *HdfsExposedInfo

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

func (*HdfsExposedInfo) DeepCopyInto added in v0.7.0

func (in *HdfsExposedInfo) DeepCopyInto(out *HdfsExposedInfo)

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

type ImageConfig added in v0.4.4

type ImageConfig struct {
	Repository string `json:"repository"`
	// Image tag. Usually the vesion of the kyuubi, default: `latest`.
	// +optional
	Tag string `json:"tag,omitempty"`
	// Image pull policy. One of `Always, Never, IfNotPresent`, default: `Always`.
	// +kubebuilder:default:=Always
	// +kubebuilder:validation:Enum=Always;Never;IfNotPresent
	// +optional
	PullPolicy string `json:"pullPolicy,omitempty"`
	// Secrets for image pull.
	// +optional
	PullSecrets string `json:"pullSecret,omitempty"`
}

func (*ImageConfig) DeepCopy added in v0.4.4

func (in *ImageConfig) DeepCopy() *ImageConfig

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

func (*ImageConfig) DeepCopyInto added in v0.4.4

func (in *ImageConfig) DeepCopyInto(out *ImageConfig)

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

type MinioExposedInfo

type MinioExposedInfo struct {
	// Endpoint of the minio cluster.
	Endpoint string `json:"endpoint"`
	// Access key of the minio cluster.
	AccessKey string `json:"accessKey"`
	// Secret key of the minio cluster.
	SecretKey string `json:"secretKey"`
}

func (*MinioExposedInfo) DeepCopy

func (in *MinioExposedInfo) DeepCopy() *MinioExposedInfo

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

func (*MinioExposedInfo) DeepCopyInto

func (in *MinioExposedInfo) DeepCopyInto(out *MinioExposedInfo)

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

type NineCluster

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

	Spec   NineClusterSpec   `json:"spec"`
	Status NineClusterStatus `json:"status,omitempty"`
}

NineCluster is the Schema for the nineclusters API

func (*NineCluster) DeepCopy

func (in *NineCluster) DeepCopy() *NineCluster

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

func (*NineCluster) DeepCopyInto

func (in *NineCluster) DeepCopyInto(out *NineCluster)

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

func (*NineCluster) DeepCopyObject

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

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

func (*NineCluster) Default

func (r *NineCluster) Default()

Default implements webhook.Defaulter so a webhook will be registered for the type

func (*NineCluster) SetupWebhookWithManager

func (r *NineCluster) SetupWebhookWithManager(mgr ctrl.Manager) error

func (*NineCluster) ValidateCreate

func (r *NineCluster) ValidateCreate() (admission.Warnings, error)

ValidateCreate implements webhook.Validator so a webhook will be registered for the type

func (*NineCluster) ValidateDelete

func (r *NineCluster) ValidateDelete() (admission.Warnings, error)

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*NineCluster) ValidateUpdate

func (r *NineCluster) ValidateUpdate(old runtime.Object) (admission.Warnings, error)

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type

type NineClusterList

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

NineClusterList contains a list of NineCluster

func (*NineClusterList) DeepCopy

func (in *NineClusterList) DeepCopy() *NineClusterList

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

func (*NineClusterList) DeepCopyInto

func (in *NineClusterList) DeepCopyInto(out *NineClusterList)

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

func (*NineClusterList) DeepCopyObject

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

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

type NineClusterSpec

type NineClusterSpec struct {
	// Data Volume of the ninecluster. The unit of the data volume is Gi.
	DataVolume int `json:"dataVolume"`
	// Type of the ninecluster. default value is DataHouse.
	// +optional
	Type NineClusterType `json:"type,omitempty"`
	// Features of the ninecluster.
	// +optional
	Features map[string]string `json:"features,omitempty"`
	// Cluster set of the type of Nine
	// +optional
	ClusterSet []ClusterInfo `json:"clusterSet,omitempty"`
}

NineClusterSpec defines the desired state of NineCluster

func (*NineClusterSpec) DeepCopy

func (in *NineClusterSpec) DeepCopy() *NineClusterSpec

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

func (*NineClusterSpec) DeepCopyInto

func (in *NineClusterSpec) DeepCopyInto(out *NineClusterSpec)

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

type NineClusterStatus

type NineClusterStatus struct {
	Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"`
}

NineClusterStatus defines the observed state of NineCluster

func (*NineClusterStatus) DeepCopy

func (in *NineClusterStatus) DeepCopy() *NineClusterStatus

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

func (*NineClusterStatus) DeepCopyInto

func (in *NineClusterStatus) DeepCopyInto(out *NineClusterStatus)

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

type NineClusterType

type NineClusterType string

NineClusterType describes the type of the nineclusters

const (
	NineClusterTypeStream NineClusterType = "stream"
	NineClusterTypeBatch  NineClusterType = "batch"
)

Different types of nineclusters.

type ResourceConfig

type ResourceConfig struct {
	// The replicas of the cluster workload.Default value is 1
	// +optional
	Replicas int32 `json:"replicas"`
	// num of the disks. default value is 1
	// +optional
	Disks int32 `json:"disks"`
	// the storage class. default value is nineinfra-default
	// +optional
	StorageClass string `json:"storageClass"`
	// The resource requirements of the cluster workload.
	// +optional
	ResourceRequirements corev1.ResourceRequirements `json:"resourceRequirements"`
}

func (*ResourceConfig) DeepCopy

func (in *ResourceConfig) DeepCopy() *ResourceConfig

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

func (*ResourceConfig) DeepCopyInto

func (in *ResourceConfig) DeepCopyInto(out *ResourceConfig)

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

Jump to

Keyboard shortcuts

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