Skip to content

Latest commit

 

History

History
2467 lines (2467 loc) · 50.3 KB

api.md

File metadata and controls

2467 lines (2467 loc) · 50.3 KB

Packages:

doris.selectdb.com/v1

Package v1 is the v1 version of the API.

Resource Types:

DorisCluster

DorisCluster is the Schema for the dorisclusters API

Field Description
apiVersion
string
doris.selectdb.com/v1
kind
string
DorisCluster
metadata
Kubernetes meta/v1.ObjectMeta
Refer to the Kubernetes API documentation for the fields of the metadata field.
spec
DorisClusterSpec


feSpec
FeSpec

defines the fe cluster state that will be created by operator.

beSpec
BeSpec

defines the be cluster state pod that will be created by operator.

cnSpec
CnSpec

defines the cn cluster state that will be created by operator.

brokerSpec
BrokerSpec

defines the broker state that will be created by operator.

adminUser
AdminUser

administrator for register or drop component from fe cluster. adminUser for all component register and operator drop component.

status
DorisClusterStatus

AdminUser

(Appears on:DorisClusterSpec)

AdminUser describe administrator for manage components in specified cluster.

Field Description
name
string

the user name for admin service’s node.

password
string

password, login to doris db.

AutoScalerVersion (string alias)

(Appears on:AutoScalingPolicy, HorizontalScaler)

Value Description

"v1"

the cn service use v1 autoscaler. reference to https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/

"v2"

the cn service use v2. reference to https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/

AutoScalingPolicy

(Appears on:CnSpec)

AutoScalingPolicy defines the auto scale

Field Description
hpaPolicy
HPAPolicy

the policy of cn autoscale. operator use autoscaling v2.

version
AutoScalerVersion

version represents the autoscaler version for cn service. only support v1,,v2

minReplicas
int32
(Optional)

the min numbers of target.

maxReplicas
int32
(Optional)

the max numbers of target.

BaseSpec

(Appears on:BeSpec, BrokerSpec, CnSpec, FeSpec)

BaseSpec describe the foundation spec of pod about doris components.

Field Description
annotations
map[string]string

annotation for fe pods. user can config monitor annotation for collect to monitor system.

serviceAccount
string

serviceAccount for cn access cloud service.

service
ExportService

expose doris components for accessing. example: if you want to use stream load to load data into doris out k8s, you can use be service and config different service type for loading data.

fsGroup
int64

A special supplemental group that applies to all containers in a pod. Some volume types allow the Kubelet to change the ownership of that volume to be owned by the pod:

feAddress
FeAddress

specify register fe addresses

replicas
int32
(Optional)

Replicas is the number of desired cn Pod.

image
string

Image for a doris cn deployment.

imagePullSecrets
[]Kubernetes core/v1.LocalObjectReference
(Optional)

ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod

configMapInfo
ConfigMapInfo
(Optional)

the reference for cn configMap.

ResourceRequirements
Kubernetes core/v1.ResourceRequirements

(Members of ResourceRequirements are embedded into this type.)

defines the specification of resource cpu and mem.

nodeSelector
map[string]string
(Optional)

(Optional) If specified, the pod’s nodeSelector,displayName=“Map of nodeSelectors to match when scheduling pods on nodes”

envVars
[]Kubernetes core/v1.EnvVar
(Optional)

cnEnvVars is a slice of environment variables that are added to the pods, the default is empty.

affinity
Kubernetes core/v1.Affinity
(Optional)

If specified, the pod’s scheduling constraints.

tolerations
[]Kubernetes core/v1.Toleration
(Optional)

(Optional) Tolerations for scheduling pods onto some dedicated nodes

podLabels
map[string]string
(Optional)

podLabels for user selector or classify pods

hostAliases
[]Kubernetes core/v1.HostAlias
(Optional)

HostAliases is an optional list of hosts and IPs that will be injected into the pod’s hosts file if specified. This is only valid for non-hostNetwork pods.

persistentVolumes
[]PersistentVolume
systemInitialization
SystemInitialization

SystemInitialization for fe, be and cn setting system parameters.

BeSpec

(Appears on:DorisClusterSpec)

BeSpec describes a template for creating copies of a be software service.

Field Description
BaseSpec
BaseSpec

(Members of BaseSpec are embedded into this type.)

the foundation spec for creating be software services.

BrokerSpec

(Appears on:DorisClusterSpec)

BrokerSpec describes a template for creating copies of a broker software service, if deploy broker we recommend you add affinity for deploy with be pod.

Field Description
BaseSpec
BaseSpec

(Members of BaseSpec are embedded into this type.)

the foundation spec for creating cn software services. BaseSpec json:"baseSpec,omitempty"

kickOffAffinityBe
bool

enable affinity with be , if kickoff affinity, the operator will set affinity on broker with be. The affinity is preferred not required. When the user custom affinity the switch does not take effect anymore.

CnSpec

(Appears on:DorisClusterSpec)

CnSpec describes a template for creating copies of a cn software service. cn, the service for external table.

Field Description
BaseSpec
BaseSpec

(Members of BaseSpec are embedded into this type.)

the foundation spec for creating cn software services.

autoScalingPolicy
AutoScalingPolicy

AutoScalingPolicy auto scaling strategy

CnStatus

(Appears on:DorisClusterStatus)

Field Description
ComponentStatus
ComponentStatus

(Members of ComponentStatus are embedded into this type.)

horizontalScaler
HorizontalScaler

HorizontalAutoscaler have the autoscaler information.

ComponentCondition

(Appears on:ComponentStatus)

Field Description
subResourceName
string
phase
ComponentPhase

Phase of statefulset condition.

lastTransitionTime
Kubernetes meta/v1.Time

The last time this condition was updated.

reason
string

The reason for the condition’s last transition.

message
string

A human readable message indicating details about the transition.

ComponentPhase (string alias)

(Appears on:ComponentCondition)

Value Description

"available"

"haveMemberFailed"

"reconciling"

"waitScheduling"

ComponentStatus

(Appears on:CnStatus, DorisClusterStatus)

Field Description
accessService
string

DorisComponentStatus represents the status of a doris component. the name of fe service exposed for user.

failedInstances
[]string

FailedInstances failed pod names.

creatingInstances
[]string

CreatingInstances in creating pod names.

runningInstances
[]string

RunningInstances in running status pod names.

componentCondition
ComponentCondition

ComponentType (string alias)

Value Description

"be"

"broker"

"cn"

"fe"

ConfigMapInfo

(Appears on:BaseSpec)

ConfigMapInfo specify configmap to mount for component.

Field Description
configMapName
string

the config info for start progress.

resolveKey
string

represents the key of configMap. for doris it refers to the config file name for start doris component. example: if deploy fe, the resolveKey = fe.conf, if deploy be resolveKey = be.conf, etc.

ContainerResourceMetricSource

(Appears on:MetricSpec)

ContainerResourceMetricSource indicates how to scale on a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). The values will be averaged together before being compared to the target. Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the “pods” source. Only one “target” type should be set.

Field Description
name
Kubernetes core/v1.ResourceName

name is the name of the resource in question.

target
MetricTarget

target specifies the target value for the given metric

container
string

container is the name of the container in the pods of the scaling target

CrossVersionObjectReference

(Appears on:ObjectMetricSource)

CrossVersionObjectReference contains enough information to let you identify the referred resource.

Field Description
kind
string

Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds”

name
string

Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names

apiVersion
string
(Optional)

API version of the referent

DorisClusterSpec

(Appears on:DorisCluster)

DorisClusterSpec defines the desired state of DorisCluster

Field Description
feSpec
FeSpec

defines the fe cluster state that will be created by operator.

beSpec
BeSpec

defines the be cluster state pod that will be created by operator.

cnSpec
CnSpec

defines the cn cluster state that will be created by operator.

brokerSpec
BrokerSpec

defines the broker state that will be created by operator.

adminUser
AdminUser

administrator for register or drop component from fe cluster. adminUser for all component register and operator drop component.

DorisClusterStatus

(Appears on:DorisCluster)

DorisClusterStatus defines the observed state of DorisCluster

Field Description
feStatus
ComponentStatus

describe fe cluster status, record running, creating and failed pods.

beStatus
ComponentStatus

describe be cluster status, recode running, creating and failed pods.

cnStatus
CnStatus

describe cn cluster status, record running, creating and failed pods.

brokerStatus
ComponentStatus

describe broker cluster status, record running, creating and failed pods.

DorisServicePort

(Appears on:ExportService)

DorisServicePort for ServiceType=NodePort situation.

Field Description
nodePort
int32
(Optional)

The port on each node on which this service is exposed when type is NodePort or LoadBalancer. Usually assigned by the system. If a value is specified, in-range, and not in use it will be used, otherwise the operation will fail. If not specified, a port will be allocated if this Service requires one. If this field is specified when creating a Service which does not need it, creation will fail. This field will be wiped when updating a Service to no longer need it (e.g. changing type from NodePort to ClusterIP). More info: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport need in 30000-32767

targetPort
int32
(Optional)

Number or name of the port to access on the pods targeted by the service. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. If this is a string, it will be looked up as a named port in the target Pod’s container ports. If this is not specified, the value of the ‘port’ field is used (an identity map). This field is ignored for services with clusterIP=None, and should be omitted or set equal to the ‘port’ field. More info: https://kubernetes.io/docs/concepts/services-networking/service/#defining-a-service

Endpoints

(Appears on:FeAddress)

Endpoints describe the address outside k8s.

Field Description
:address
[]string

the ip or domain array.

port
int

the fe port that for query. the field query_port defines in fe config.

ExportService

(Appears on:BaseSpec)

ExportService consisting of expose ports for user access to software service.

Field Description
type
Kubernetes core/v1.ServiceType
(Optional)

type of service,the possible value for the service type are : ClusterIP, NodePort, LoadBalancer,ExternalName. More info: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types

servicePorts
[]DorisServicePort

ServicePort config service for NodePort access mode.

annotations
map[string]string

Annotations for using function on different cloud platform.

loadBalancerIP
string
(Optional)

Only applies to Service Type: LoadBalancer. This feature depends on whether the underlying cloud-provider supports specifying the loadBalancerIP when a load balancer is created. This field will be ignored if the cloud-provider does not support the feature. This field was under-specified and its meaning varies across implementations, and it cannot support dual-stack. As of Kubernetes v1.24, users are encouraged to use implementation-specific annotations when available. This field may be removed in a future API version.

ExternalMetricSource

(Appears on:MetricSpec)

ExternalMetricSource indicates how to scale on a metric not associated with any Kubernetes object (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster).

Field Description
metric
MetricIdentifier

metric identifies the target metric by name and selector

target
MetricTarget

target specifies the target value for the given metric

FeAddress

(Appears on:BaseSpec)

FeAddress specify the fe address, please set it when you deploy fe outside k8s or deploy components use crd except fe, if not set .

Field Description
ServiceName
string

the service name that proxy fe on k8s. the service must in same namespace with fe.

endpoints
Endpoints

the fe addresses if not deploy by crd, user can use k8s deploy fe observer.

FeSpec

(Appears on:DorisClusterSpec)

FeSpec describes a template for creating copies of a fe software service.

Field Description
electionNumber
int32

the number of fe in election. electionNumber <= replicas, left as observers. default value=3

BaseSpec
BaseSpec

(Members of BaseSpec are embedded into this type.)

the foundation spec for creating be software services.

HPAPolicy

(Appears on:AutoScalingPolicy)

Field Description
metrics
[]MetricSpec
(Optional)

Metrics specifies how to scale based on a single metric the struct copy from k8s.io/api/autoscaling/v2beta2/types.go. the redundancy code will hide the restriction about HorizontalPodAutoscaler version and kubernetes releases matching issue. the splice will have unsafe.Pointer convert, so be careful to edit the struct fileds.

behavior
HorizontalPodAutoscalerBehavior
(Optional)

HorizontalPodAutoscalerBehavior configures the scaling behavior of the target. the struct copy from k8s.io/api/autoscaling/v2beta2/types.go. the redundancy code will hide the restriction about HorizontalPodAutoscaler version and kubernetes releases matching issue. the

HPAScalingPolicy

(Appears on:HPAScalingRules)

HPAScalingPolicy is a single policy which must hold true for a specified past interval.

Field Description
type
HPAScalingPolicyType

Type is used to specify the scaling policy.

value
int32

Value contains the amount of change which is permitted by the policy. It must be greater than zero

periodSeconds
int32

PeriodSeconds specifies the window of time for which the policy should hold true. PeriodSeconds must be greater than zero and less than or equal to 1800 (30 min).

HPAScalingPolicyType (string alias)

(Appears on:HPAScalingPolicy)

HPAScalingPolicyType is the type of the policy which could be used while making scaling decisions.

Value Description

"Percent"

PercentScalingPolicy is a policy used to specify a relative amount of change with respect to the current number of pods.

"Pods"

PodsScalingPolicy is a policy used to specify a change in absolute number of pods.

HPAScalingRules

(Appears on:HorizontalPodAutoscalerBehavior)

HPAScalingRules configures the scaling behavior for one direction. These Rules are applied after calculating DesiredReplicas from metrics for the HPA. They can limit the scaling velocity by specifying scaling policies. They can prevent flapping by specifying the stabilization window, so that the number of replicas is not set instantly, instead, the safest value from the stabilization window is chosen.

Field Description
stabilizationWindowSeconds
int32
(Optional)

StabilizationWindowSeconds is the number of seconds for which past recommendations should be considered while scaling up or scaling down. StabilizationWindowSeconds must be greater than or equal to zero and less than or equal to 3600 (one hour). If not set, use the default values: - For scale up: 0 (i.e. no stabilization is done). - For scale down: 300 (i.e. the stabilization window is 300 seconds long).

selectPolicy
ScalingPolicySelect
(Optional)

selectPolicy is used to specify which policy should be used. If not set, the default value MaxPolicySelect is used.

policies
[]HPAScalingPolicy
(Optional)

policies is a list of potential scaling polices which can be used during scaling. At least one policy must be specified, otherwise the HPAScalingRules will be discarded as invalid

HorizontalPodAutoscalerBehavior

(Appears on:HPAPolicy)

HorizontalPodAutoscalerBehavior configures the scaling behavior of the target in both Up and Down directions (scaleUp and scaleDown fields respectively).

Field Description
scaleUp
HPAScalingRules
(Optional)

scaleUp is scaling policy for scaling Up. If not set, the default value is the higher of: * increase no more than 4 pods per 60 seconds * double the number of pods per 60 seconds No stabilization is used.

scaleDown
HPAScalingRules
(Optional)

scaleDown is scaling policy for scaling Down. If not set, the default value is to allow to scale down to minReplicas pods, with a 300 second stabilization window (i.e., the highest recommendation for the last 300sec is used).

HorizontalScaler

(Appears on:CnStatus)

Field Description
name
string

the deploy horizontal scaler name

version
AutoScalerVersion

the deploy horizontal version.

MetricIdentifier

(Appears on:ExternalMetricSource, ObjectMetricSource, PodsMetricSource)

MetricIdentifier defines the name and optionally selector for a metric

Field Description
name
string

name is the name of the given metric

selector
Kubernetes meta/v1.LabelSelector
(Optional)

selector is the string-encoded form of a standard kubernetes label selector for the given metric When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping. When unset, just the metricName will be used to gather metrics.

MetricSourceType (string alias)

(Appears on:MetricSpec)

MetricSourceType indicates the type of metric.

Value Description

"ContainerResource"

ContainerResourceMetricSourceType is a resource metric known to Kubernetes, as specified in requests and limits, describing a single container in each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics (the “pods” source).

"External"

ExternalMetricSourceType is a global metric that is not associated with any Kubernetes object. It allows autoscaling based on information coming from components running outside of cluster (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster).

"Object"

ObjectMetricSourceType is a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).

"Pods"

PodsMetricSourceType is a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.

"Resource"

ResourceMetricSourceType is a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics (the “pods” source).

MetricSpec

(Appears on:HPAPolicy)

MetricSpec specifies how to scale based on a single metric (only type and one other matching field should be set at once).

Field Description
type
MetricSourceType

type is the type of metric source. It should be one of “ContainerResource”, “External”, “Object”, “Pods” or “Resource”, each mapping to a matching field in the object. Note: “ContainerResource” type is available on when the feature-gate HPAContainerMetrics is enabled

object
ObjectMetricSource
(Optional)

object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object).

pods
PodsMetricSource
(Optional)

pods refers to a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.

resource
ResourceMetricSource
(Optional)

resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the “pods” source.

containerResource
ContainerResourceMetricSource
(Optional)

container resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing a single container in each pod of the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the “pods” source. This is an alpha feature and can be enabled by the HPAContainerMetrics feature flag.

external
ExternalMetricSource
(Optional)

external refers to a global metric that is not associated with any Kubernetes object. It allows autoscaling based on information coming from components running outside of cluster (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster).

MetricTarget

(Appears on:ContainerResourceMetricSource, ExternalMetricSource, ObjectMetricSource, PodsMetricSource, ResourceMetricSource)

MetricTarget defines the target value, average value, or average utilization of a specific metric

Field Description
type
MetricTargetType

type represents whether the metric type is Utilization, Value, or AverageValue

value
k8s.io/apimachinery/pkg/api/resource.Quantity
(Optional)

value is the target value of the metric (as a quantity).

averageValue
k8s.io/apimachinery/pkg/api/resource.Quantity
(Optional)

averageValue is the target value of the average of the metric across all relevant pods (as a quantity)

averageUtilization
int32
(Optional)

averageUtilization is the target value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods. Currently only valid for Resource metric source type

MetricTargetType (string alias)

(Appears on:MetricTarget)

MetricTargetType specifies the type of metric being targeted, and should be either “Value”, “AverageValue”, or “Utilization”

Value Description

"AverageValue"

AverageValueMetricType declares a MetricTarget is an

"Utilization"

UtilizationMetricType declares a MetricTarget is an AverageUtilization value

"Value"

ValueMetricType declares a MetricTarget is a raw value

ObjectMetricSource

(Appears on:MetricSpec)

ObjectMetricSource indicates how to scale on a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).

Field Description
describedObject
CrossVersionObjectReference
target
MetricTarget

target specifies the target value for the given metric

metric
MetricIdentifier

metric identifies the target metric by name and selector

PVCProvisioner (string alias)

(Appears on:PersistentVolume)

PVCProvisioner defines PVC provisioner

Value Description

"Operator"

"StatefulSet"

""

PersistentVolume

(Appears on:BaseSpec)

PersistentVolume defines volume information and container mount information.

Field Description
persistentVolumeClaimSpec
Kubernetes core/v1.PersistentVolumeClaimSpec

PersistentVolumeClaimSpec is a list of claim spec about storage that pods are required.

mountPath
string

the mount path for component service.

name
string

the volume name associate with

provisioner
PVCProvisioner

defines pvc provisioner

PodsMetricSource

(Appears on:MetricSpec)

PodsMetricSource indicates how to scale on a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.

Field Description
metric
MetricIdentifier

metric identifies the target metric by name and selector

target
MetricTarget

target specifies the target value for the given metric

ResourceMetricSource

(Appears on:MetricSpec)

ResourceMetricSource indicates how to scale on a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). The values will be averaged together before being compared to the target. Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the “pods” source. Only one “target” type should be set.

Field Description
name
Kubernetes core/v1.ResourceName

name is the name of the resource in question.

target
MetricTarget

target specifies the target value for the given metric

ScalingPolicySelect (string alias)

(Appears on:HPAScalingRules)

ScalingPolicySelect is used to specify which policy should be used while scaling in a certain direction

Value Description

"Disabled"

DisabledPolicySelect disables the scaling in this direction.

"Max"

MaxPolicySelect selects the policy with the highest possible change.

"Min"

MinPolicySelect selects the policy with the lowest possible change.

ServiceRole (string alias)

Value Description

"access"

"internal"

SystemInitialization

(Appears on:BaseSpec)

Field Description
initImage
string

Image for doris initialization, default is selectdb/alpine:latest.

command
[]string

Entrypoint array. Not executed within a shell.

args
[]string

Arguments to the entrypoint.


Generated with gen-crd-api-reference-docs on git commit 8305ac1.