v1alpha1

package
v0.4.20-alpha Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

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

Index

Constants

View Source
const (
	RegistryPath = "cr.yandex/crptqonuodf51kdj7a7d/ydb"
	DefaultTag   = "22.2.22"

	ImagePathFormat = "%s:%s"

	GRPCPort            = 2135
	GRPCServicePortName = "grpc"
	GRPCProto           = "grpc://"
	GRPCSProto          = "grpcs://"

	InterconnectPort            = 19001
	InterconnectServicePortName = "interconnect"

	StatusPort            = 8765
	StatusServicePortName = "status"

	DatastreamsPort            = 8443
	DatastreamsServicePortName = "datastreams"

	DiskPathPrefix      = "/dev/kikimr_ssd"
	DiskNumberMaxDigits = 2
	DiskFilePath        = "/data"
	YdbAuthToken        = "ydb-auth-token-file"

	ConfigDir      = "/opt/ydb/cfg"
	ConfigFileName = "config.yaml"

	BinariesDir      = "/opt/ydb/bin"
	DaemonBinaryName = "ydbd"

	TenantNameFormat = "/%s/%s"
)
View Source
const (
	DefaultDatabaseDomain = "root"
)

Variables

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

Functions

func SetDatabaseSpecDefaults

func SetDatabaseSpecDefaults(ydbCr *Database, ydbSpec *DatabaseSpec)

SetDatabaseSpecDefaults sets various values to the default vars.

Types

type Database

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

	Spec DatabaseSpec `json:"spec,omitempty"`

	// +kubebuilder:default:={state: "Pending"}
	Status DatabaseStatus `json:"status,omitempty"`
}

Database is the Schema for the databases API

func (*Database) DeepCopy

func (in *Database) DeepCopy() *Database

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

func (*Database) DeepCopyInto

func (in *Database) DeepCopyInto(out *Database)

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

func (*Database) DeepCopyObject

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

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

func (*Database) Default

func (r *Database) Default()

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

func (*Database) SetupWebhookWithManager

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

func (*Database) ValidateCreate

func (r *Database) ValidateCreate() error

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

func (*Database) ValidateDelete

func (r *Database) ValidateDelete() error

func (*Database) ValidateUpdate

func (r *Database) ValidateUpdate(old runtime.Object) error

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

type DatabaseList

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

DatabaseList contains a list of Database

func (*DatabaseList) DeepCopy

func (in *DatabaseList) DeepCopy() *DatabaseList

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

func (*DatabaseList) DeepCopyInto

func (in *DatabaseList) DeepCopyInto(out *DatabaseList)

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

func (*DatabaseList) DeepCopyObject

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

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

type DatabaseResources

type DatabaseResources struct {
	// (Optional) Database container resource limits. Any container limits
	// can be specified.
	// Default: (not specified)
	// +optional
	ContainerResources corev1.ResourceRequirements `json:"containerResources,omitempty"`

	// Kind of the storage unit. Determine guarantees
	// for all main unit parameters: used hard disk type, capacity
	// throughput, IOPS etc.
	// +required
	StorageUnits []StorageUnit `json:"storageUnits,omitempty"`
}

func (*DatabaseResources) DeepCopy

func (in *DatabaseResources) DeepCopy() *DatabaseResources

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

func (*DatabaseResources) DeepCopyInto

func (in *DatabaseResources) DeepCopyInto(out *DatabaseResources)

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

type DatabaseServices

type DatabaseServices struct {
	GRPC         GRPCService         `json:"grpc,omitempty"`
	Interconnect InterconnectService `json:"interconnect,omitempty"`
	Status       StatusService       `json:"status,omitempty"`
	Datastreams  DatastreamsService  `json:"datastreams,omitempty"`
}

func (*DatabaseServices) DeepCopy

func (in *DatabaseServices) DeepCopy() *DatabaseServices

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

func (*DatabaseServices) DeepCopyInto

func (in *DatabaseServices) DeepCopyInto(out *DatabaseServices)

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

type DatabaseSpec

type DatabaseSpec struct {
	// Number of nodes (pods) in the cluster
	// +required
	Nodes int32 `json:"nodes"`

	// YDB configuration in YAML format. Will be applied on top of generated one in internal/configuration
	// +optional
	Configuration string `json:"configuration"`

	// (Optional) Storage services parameter overrides
	// Default: (not specified)
	// +optional
	Service DatabaseServices `json:"service,omitempty"`

	// YDB Storage cluster reference
	// +required
	StorageClusterRef StorageRef `json:"storageClusterRef"`

	// Encryption
	// +optional
	Encryption *EncryptionConfig `json:"encryption,omitempty"`

	// Datastreams config
	// +optional
	Datastreams *DatastreamsConfig `json:"datastreams,omitempty"`

	// (Optional) Name of the root storage domain
	// Default: root
	// +kubebuilder:validation:Pattern:=[a-zA-Z0-9]([-_a-zA-Z0-9]*[a-zA-Z0-9])?
	// +kubebuilder:validation:MaxLength:=63
	// +kubebuilder:default:="root"
	// +optional
	Domain string `json:"domain"`

	// (Optional) Database storage and compute resources
	// +optional
	Resources *DatabaseResources `json:"resources,omitempty"` // TODO: Add validation webhook: some resources must be specified

	// (Optional) Shared resources can be used by serverless databases.
	// +optional
	SharedResources *DatabaseResources `json:"sharedResources,omitempty"`

	// (Optional) If specified, created database will be "serverless".
	// +optional
	ServerlessResources *ServerlessDatabaseResources `json:"serverlessResources,omitempty"`

	// (Optional) Public host to advertise on discovery requests
	// Default: ""
	// +optional
	PublicHost string `json:"publicHost,omitempty"`

	// List of initialization containers belonging to the pod.
	// Init containers are executed in order prior to containers being started. If any
	// init container fails, the pod is considered to have failed and is handled according
	// to its restartPolicy. The name for an init container or normal container must be
	// unique among all containers.
	// Init containers may not have Lifecycle actions, Readiness probes, Liveness probes, or Startup probes.
	// The resourceRequirements of an init container are taken into account during scheduling
	// by finding the highest request/limit for each resource type, and then using the max of
	// that value or the sum of the normal containers. Limits are applied to init containers
	// in a similar fashion.
	// Init containers cannot currently be added or removed.
	// Cannot be updated.
	// More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/
	// +optional
	InitContainers []corev1.Container `json:"initContainers,omitempty"`

	// (Optional) Monitoring sets configuration options for YDB observability
	// Default: ""
	// +optional
	Monitoring *MonitoringOptions `json:"monitoring,omitempty"`

	// (Optional) YDBVersion sets the explicit version of the YDB image
	// Default: ""
	// +optional
	YDBVersion string `json:"version,omitempty"`

	// (Optional) YDB Image
	// +optional
	Image PodImage `json:"image,omitempty"`

	// NodeSelector is a selector which must be true for the pod to fit on a node.
	// Selector which must match a node's labels for the pod to be scheduled on that node.
	// More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/
	// +optional
	NodeSelector map[string]string `json:"nodeSelector,omitempty"`

	// (Optional) If specified, the pod's scheduling constraints
	// +optional
	Affinity *corev1.Affinity `json:"affinity,omitempty"`

	// (Optional) If specified, the pod's tolerations.
	// +optional
	Tolerations []corev1.Toleration `json:"tolerations,omitempty"`

	// (Optional) Additional custom resource labels that are added to all resources
	// +optional
	AdditionalLabels map[string]string `json:"additionalLabels,omitempty"`

	// (Optional) Additional custom resource annotations that are added to all resources
	// +optional
	AdditionalAnnotations map[string]string `json:"additionalAnnotations,omitempty"`
}

DatabaseSpec defines the desired state of Database

func (*DatabaseSpec) DeepCopy

func (in *DatabaseSpec) DeepCopy() *DatabaseSpec

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

func (*DatabaseSpec) DeepCopyInto

func (in *DatabaseSpec) DeepCopyInto(out *DatabaseSpec)

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

type DatabaseStatus

type DatabaseStatus struct {
	State      string             `json:"state"`
	Conditions []metav1.Condition `json:"conditions,omitempty"`
}

DatabaseStatus defines the observed state of Database

func (*DatabaseStatus) DeepCopy

func (in *DatabaseStatus) DeepCopy() *DatabaseStatus

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

func (*DatabaseStatus) DeepCopyInto

func (in *DatabaseStatus) DeepCopyInto(out *DatabaseStatus)

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

type DatastreamsConfig

type DatastreamsConfig struct {
	// +required
	Enabled bool `json:"enabled"`

	// +required
	IAMServiceAccountKey *corev1.SecretKeySelector `json:"iam_service_account_key,omitempty"`
}

Datastreams config todo

func (*DatastreamsConfig) DeepCopy

func (in *DatastreamsConfig) DeepCopy() *DatastreamsConfig

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

func (*DatastreamsConfig) DeepCopyInto

func (in *DatastreamsConfig) DeepCopyInto(out *DatastreamsConfig)

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

type DatastreamsService

type DatastreamsService struct {
	Service `json:""`

	TLSConfiguration *TLSConfiguration `json:"tls,omitempty"`
}

func (*DatastreamsService) DeepCopy

func (in *DatastreamsService) DeepCopy() *DatastreamsService

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

func (*DatastreamsService) DeepCopyInto

func (in *DatastreamsService) DeepCopyInto(out *DatastreamsService)

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

type EncryptionConfig

type EncryptionConfig struct {
	// +required
	Enabled bool `json:"enabled"`

	// +optional
	Key *corev1.SecretKeySelector `json:"key,omitempty"`

	// +optional
	Pin *string `json:"pin,omitempty"`
}

EncryptionConfig todo

func (*EncryptionConfig) DeepCopy

func (in *EncryptionConfig) DeepCopy() *EncryptionConfig

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

func (*EncryptionConfig) DeepCopyInto

func (in *EncryptionConfig) DeepCopyInto(out *EncryptionConfig)

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

type ErasureType

type ErasureType string
const (
	ErasureBlock42   ErasureType = "block-4-2"
	ErasureMirror3DC ErasureType = "mirror-3-dc"
	None             ErasureType = "none"
)

type GRPCService

type GRPCService struct {
	Service `json:""`

	TLSConfiguration *TLSConfiguration `json:"tls,omitempty"`
	ExternalHost     string            `json:"externalHost,omitempty"` // TODO implementation
}

func (*GRPCService) DeepCopy

func (in *GRPCService) DeepCopy() *GRPCService

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

func (*GRPCService) DeepCopyInto

func (in *GRPCService) DeepCopyInto(out *GRPCService)

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

type InterconnectService

type InterconnectService struct {
	Service `json:""`

	TLSConfiguration *TLSConfiguration `json:"tls,omitempty"`
}

func (*InterconnectService) DeepCopy

func (in *InterconnectService) DeepCopy() *InterconnectService

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

func (*InterconnectService) DeepCopyInto

func (in *InterconnectService) DeepCopyInto(out *InterconnectService)

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

type MonitoringOptions

type MonitoringOptions struct {
	Enabled bool `json:"enabled"`

	// Interval at which metrics should be scraped
	Interval string `json:"interval,omitempty"`
	// RelabelConfig allows dynamic rewriting of the label set, being applied to sample before ingestion.
	MetricRelabelings []*v1.RelabelConfig `json:"metricRelabelings,omitempty"`
}

func (*MonitoringOptions) DeepCopy

func (in *MonitoringOptions) DeepCopy() *MonitoringOptions

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

func (*MonitoringOptions) DeepCopyInto

func (in *MonitoringOptions) DeepCopyInto(out *MonitoringOptions)

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

type PodImage

type PodImage struct {
	// Container image with supported YDB version.
	// This defaults to the version pinned to the operator and requires a full container and tag/sha name.
	// For instance: cr.yandex/crptqonuodf51kdj7a7d/ydb:22.2.22
	// +required
	Name string `json:"name,omitempty"`

	// (Optional) PullPolicy for the image, which defaults to IfNotPresent.
	// Default: IfNotPresent
	// +optional
	PullPolicyName *corev1.PullPolicy `json:"pullPolicy,omitempty"`

	// (Optional) Secret name containing the dockerconfig to use for a registry that requires authentication. The secret
	// must be configured first by the user.
	// +optional
	PullSecret *string `json:"pullSecret,omitempty"`
}

PodImage represents the image information for a container that is used to build the StatefulSet.

func (*PodImage) DeepCopy

func (in *PodImage) DeepCopy() *PodImage

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

func (*PodImage) DeepCopyInto

func (in *PodImage) DeepCopyInto(out *PodImage)

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

type ServerlessDatabaseResources

type ServerlessDatabaseResources struct {
	// Reference to YDB Database with configured shared resources
	// +required
	SharedDatabaseRef SharedDatabaseRef `json:"sharedDatabaseRef,omitempty"`
}

func (*ServerlessDatabaseResources) DeepCopy

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

func (*ServerlessDatabaseResources) DeepCopyInto

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

type Service

type Service struct {
	AdditionalLabels      map[string]string `json:"additionalLabels,omitempty"`
	AdditionalAnnotations map[string]string `json:"additionalAnnotations,omitempty"`

	IPFamilies     []corev1.IPFamily          `json:"ipFamilies,omitempty"`
	IPFamilyPolicy *corev1.IPFamilyPolicyType `json:"ipFamilyPolicy,omitempty"`
}

func (*Service) DeepCopy

func (in *Service) DeepCopy() *Service

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

func (*Service) DeepCopyInto

func (in *Service) DeepCopyInto(out *Service)

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

type SharedDatabaseRef

type SharedDatabaseRef struct {
	// +kubebuilder:validation:Pattern:=[a-z0-9]([-a-z0-9]*[a-z0-9])?
	// +kubebuilder:validation:MaxLength:=63
	// +required
	Name string `json:"name"`

	// +kubebuilder:validation:Pattern:=[a-z0-9]([-a-z0-9]*[a-z0-9])?
	// +kubebuilder:validation:MaxLength:=63
	// +optional
	Namespace string `json:"namespace"`
}

func (*SharedDatabaseRef) DeepCopy

func (in *SharedDatabaseRef) DeepCopy() *SharedDatabaseRef

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

func (*SharedDatabaseRef) DeepCopyInto

func (in *SharedDatabaseRef) DeepCopyInto(out *SharedDatabaseRef)

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

type StatusService

type StatusService struct {
	Service `json:""`
}

func (*StatusService) DeepCopy

func (in *StatusService) DeepCopy() *StatusService

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

func (*StatusService) DeepCopyInto

func (in *StatusService) DeepCopyInto(out *StatusService)

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

type Storage

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

	Spec StorageSpec `json:"spec,omitempty"`

	// +kubebuilder:default:={state: "Pending"}
	Status StorageStatus `json:"status,omitempty"`
}

Storage is the Schema for the Storages API

func (*Storage) DeepCopy

func (in *Storage) DeepCopy() *Storage

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

func (*Storage) DeepCopyInto

func (in *Storage) DeepCopyInto(out *Storage)

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

func (*Storage) DeepCopyObject

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

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

func (*Storage) Default

func (r *Storage) Default()

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

func (*Storage) SetupWebhookWithManager

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

func (*Storage) ValidateCreate

func (r *Storage) ValidateCreate() error

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

func (*Storage) ValidateDelete

func (r *Storage) ValidateDelete() error

func (*Storage) ValidateUpdate

func (r *Storage) ValidateUpdate(old runtime.Object) error

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

type StorageList

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

StorageList contains a list of Storage

func (*StorageList) DeepCopy

func (in *StorageList) DeepCopy() *StorageList

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

func (*StorageList) DeepCopyInto

func (in *StorageList) DeepCopyInto(out *StorageList)

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

func (*StorageList) DeepCopyObject

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

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

type StorageRef

type StorageRef struct {
	// +kubebuilder:validation:Pattern:=[a-z0-9]([-a-z0-9]*[a-z0-9])?
	// +kubebuilder:validation:MaxLength:=63
	// +required
	Name string `json:"name"`

	// +kubebuilder:validation:Pattern:=[a-z0-9]([-a-z0-9]*[a-z0-9])?
	// +kubebuilder:validation:MaxLength:=63
	// +optional
	Namespace string `json:"namespace"`
}

StorageRef todo

func (*StorageRef) DeepCopy

func (in *StorageRef) DeepCopy() *StorageRef

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

func (*StorageRef) DeepCopyInto

func (in *StorageRef) DeepCopyInto(out *StorageRef)

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

type StorageServices

type StorageServices struct {
	GRPC         GRPCService         `json:"grpc,omitempty"`
	Interconnect InterconnectService `json:"interconnect,omitempty"`
	Status       StatusService       `json:"status,omitempty"`
}

StorageServices defines parameter overrides for Storage Services

func (*StorageServices) DeepCopy

func (in *StorageServices) DeepCopy() *StorageServices

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

func (*StorageServices) DeepCopyInto

func (in *StorageServices) DeepCopyInto(out *StorageServices)

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

type StorageSpec

type StorageSpec struct {
	// Number of nodes (pods) in the cluster
	// +required
	Nodes int32 `json:"nodes"`

	// YDB configuration in YAML format. Will be applied on top of generated one in internal/configuration
	// +optional
	Configuration string `json:"configuration"`

	// Data storage mode.
	// For details, see https://cloud.yandex.ru/docs/ydb/oss/public/administration/deploy/production_checklist#topologiya
	// TODO English docs link
	// FIXME mirror-3-dc is only supported with external configuration
	// +kubebuilder:validation:Enum=mirror-3-dc;block-4-2;none
	// +kubebuilder:default:=block-4-2
	Erasure ErasureType `json:"erasure"`

	// Where cluster data should be kept
	// +required
	DataStore []corev1.PersistentVolumeClaimSpec `json:"dataStore"`

	// (Optional) Storage services parameter overrides
	// Default: (not specified)
	// +optional
	Service StorageServices `json:"service,omitempty"`

	// (Optional) Name of the root storage domain
	// Default: root
	// +kubebuilder:validation:Pattern:=[a-zA-Z0-9]([-_a-zA-Z0-9]*[a-zA-Z0-9])?
	// +kubebuilder:validation:MaxLength:=63
	// +kubebuilder:default:="root"
	// +optional
	Domain string `json:"domain"`

	// (Optional) Storage container resource limits. Any container limits
	// can be specified.
	// Default: (not specified)
	// +optional
	Resources corev1.ResourceRequirements `json:"resources,omitempty"`

	// Container image information
	// +required
	Image PodImage `json:"image,omitempty"`

	// List of initialization containers belonging to the pod.
	// Init containers are executed in order prior to containers being started. If any
	// init container fails, the pod is considered to have failed and is handled according
	// to its restartPolicy. The name for an init container or normal container must be
	// unique among all containers.
	// Init containers may not have Lifecycle actions, Readiness probes, Liveness probes, or Startup probes.
	// The resourceRequirements of an init container are taken into account during scheduling
	// by finding the highest request/limit for each resource type, and then using the max of
	// that value or the sum of the normal containers. Limits are applied to init containers
	// in a similar fashion.
	// Init containers cannot currently be added or removed.
	// Cannot be updated.
	// More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/
	// +optional
	InitContainers []corev1.Container `json:"initContainers,omitempty"`

	// (Optional) YDBVersion sets the explicit version of the YDB image
	// Default: ""
	// +optional
	YDBVersion string `json:"version,omitempty"`

	// (Optional) Monitoring sets configuration options for YDB observability
	// Default: ""
	// +optional
	Monitoring *MonitoringOptions `json:"monitoring,omitempty"`

	// User-defined root certificate authority that is added to system trust
	// store of Storage pods on startup.
	// +optional
	CABundle []byte `json:"caBundle,omitempty"`

	// Secret names that will be mounted into the well-known directory of
	// every storage pod. Directory: `/opt/ydb/secrets/<secret_name>/<secret_key>`
	// +optional
	Secrets []*corev1.LocalObjectReference `json:"secrets,omitempty"`

	// Whether host network should be enabled. Automatically sets
	// `dnsPolicy` to `clusterFirstWithHostNet`.
	// Default: false
	// +optional
	HostNetwork bool `json:"hostNetwork,omitempty"`

	// NodeSelector is a selector which must be true for the pod to fit on a node.
	// Selector which must match a node's labels for the pod to be scheduled on that node.
	// More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/
	// +optional
	NodeSelector map[string]string `json:"nodeSelector,omitempty"`

	// (Optional) If specified, the pod's scheduling constraints
	// +optional
	Affinity *corev1.Affinity `json:"affinity,omitempty"`

	// (Optional) If specified, the pod's tolerations.
	// +optional
	Tolerations []corev1.Toleration `json:"tolerations,omitempty"`

	// (Optional) Additional custom resource labels that are added to all resources
	// +optional
	AdditionalLabels map[string]string `json:"additionalLabels,omitempty"`

	// (Optional) Additional custom resource annotations that are added to all resources
	// +optional
	AdditionalAnnotations map[string]string `json:"additionalAnnotations,omitempty"`
}

StorageSpec defines the desired state of Storage

func (*StorageSpec) DeepCopy

func (in *StorageSpec) DeepCopy() *StorageSpec

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

func (*StorageSpec) DeepCopyInto

func (in *StorageSpec) DeepCopyInto(out *StorageSpec)

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

type StorageStatus

type StorageStatus struct {
	State      string             `json:"state"`
	Conditions []metav1.Condition `json:"conditions,omitempty"`
}

StorageStatus defines the observed state of Storage

func (*StorageStatus) DeepCopy

func (in *StorageStatus) DeepCopy() *StorageStatus

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

func (*StorageStatus) DeepCopyInto

func (in *StorageStatus) DeepCopyInto(out *StorageStatus)

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

type StorageUnit

type StorageUnit struct {
	// Kind of the storage unit. Determine guarantees
	// for all main unit parameters: used hard disk type, capacity
	// throughput, IOPS etc.
	// +required
	UnitKind string `json:"unitKind"`

	// Number of units in this set.
	// +required
	Count uint64 `json:"count"`
}

func (*StorageUnit) DeepCopy

func (in *StorageUnit) DeepCopy() *StorageUnit

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

func (*StorageUnit) DeepCopyInto

func (in *StorageUnit) DeepCopyInto(out *StorageUnit)

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

type TLSConfiguration

type TLSConfiguration struct {
	Enabled              bool                     `json:"enabled"`
	CertificateAuthority corev1.SecretKeySelector `json:"CA,omitempty"`
	Certificate          corev1.SecretKeySelector `json:"certificate,omitempty"`
	Key                  corev1.SecretKeySelector `json:"key,omitempty"` // fixme validate: all three or none
}

func (*TLSConfiguration) DeepCopy

func (in *TLSConfiguration) DeepCopy() *TLSConfiguration

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

func (*TLSConfiguration) DeepCopyInto

func (in *TLSConfiguration) DeepCopyInto(out *TLSConfiguration)

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