v1

package
v0.49.0 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2024 License: Apache-2.0 Imports: 49 Imported by: 29

Documentation

Overview

+k8s:deepcopy-gen=package,register +k8s:openapi-gen=true +k8s:defaulter-gen=TypeMeta +groupName=kubedb.com

nolint:goconst

Index

Constants

View Source
const (
	ResourceCodeElasticsearch     = "es"
	ResourceKindElasticsearch     = "Elasticsearch"
	ResourceSingularElasticsearch = "elasticsearch"
	ResourcePluralElasticsearch   = "elasticsearches"
)
View Source
const (
	ResourceCodeKafka     = "kf"
	ResourceKindKafka     = "Kafka"
	ResourceSingularKafka = "kafka"
	ResourcePluralKafka   = "kafkas"
)
View Source
const (
	ResourceCodeMariaDB     = "md"
	ResourceKindMariaDB     = "MariaDB"
	ResourceSingularMariaDB = "mariadb"
	ResourcePluralMariaDB   = "mariadbs"
)
View Source
const (
	ResourceCodeMemcached     = "mc"
	ResourceKindMemcached     = "Memcached"
	ResourceSingularMemcached = "memcached"
	ResourcePluralMemcached   = "memcacheds"
)
View Source
const (
	TLSCAKeyFileName    = "ca.key"
	TLSCACertFileName   = "ca.crt"
	MongoPemFileName    = "mongo.pem"
	MongoClientFileName = "client.pem"
	MongoCertDirectory  = "/var/run/mongodb/tls"

	MongoDBShardLabelKey  = "mongodb.kubedb.com/node.shard"
	MongoDBConfigLabelKey = "mongodb.kubedb.com/node.config"
	MongoDBMongosLabelKey = "mongodb.kubedb.com/node.mongos"
	MongoDBTypeLabelKey   = "mongodb.kubedb.com/node.type"

	MongoDBShardAffinityTemplateVar = "SHARD_INDEX"
)
View Source
const (
	ResourceCodeMongoDB     = "mg"
	ResourceKindMongoDB     = "MongoDB"
	ResourceSingularMongoDB = "mongodb"
	ResourcePluralMongoDB   = "mongodbs"
)
View Source
const (
	ResourceCodeMySQL     = "my"
	ResourceKindMySQL     = "MySQL"
	ResourceSingularMySQL = "mysql"
	ResourcePluralMySQL   = "mysqls"
)
View Source
const (
	ResourceCodePerconaXtraDB     = "px"
	ResourceKindPerconaXtraDB     = "PerconaXtraDB"
	ResourceSingularPerconaXtraDB = "perconaxtradb"
	ResourcePluralPerconaXtraDB   = "perconaxtradbs"
)
View Source
const (
	ResourceCodePgBouncer     = "pb"
	ResourceKindPgBouncer     = "PgBouncer"
	ResourceSingularPgBouncer = "pgbouncer"
	ResourcePluralPgBouncer   = "pgbouncers"
)
View Source
const (
	ResourceCodePostgres     = "pg"
	ResourceKindPostgres     = "Postgres"
	ResourceSingularPostgres = "postgres"
	ResourcePluralPostgres   = "postgreses"
)
View Source
const (
	ResourceCodeProxySQL     = "prx"
	ResourceKindProxySQL     = "ProxySQL"
	ResourceSingularProxySQL = "proxysql"
	ResourcePluralProxySQL   = "proxysqls"
)
View Source
const (
	ResourceCodeRedisSentinel     = "rds"
	ResourceKindRedisSentinel     = "RedisSentinel"
	ResourceSingularRedisSentinel = "redissentinel"
	ResourcePluralRedisSentinel   = "redissentinels"
)
View Source
const (
	ResourceCodeRedis     = "rd"
	ResourceKindRedis     = "Redis"
	ResourceSingularRedis = "redis"
	ResourcePluralRedis   = "redises"
)
View Source
const (
	ElasticsearchNodeAffinityTemplateVar = "NODE_ROLE"
)
View Source
const (
	RedisShardAffinityTemplateVar = "SHARD_INDEX"
)

Variables

View Source
var (
	// TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api.
	// localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
	SchemeBuilder runtime.SchemeBuilder

	AddToScheme = localSchemeBuilder.AddToScheme
)
View Source
var (
	DefaultClient client.Client
)
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: kubedb.GroupName, Version: "v1"}

Functions

func GetDatabasePods

func GetDatabasePods(db metav1.Object, psLister pslister.PetSetLister, pods []core.Pod) ([]core.Pod, error)

func GetDatabasePodsByPetSetLister

func GetDatabasePodsByPetSetLister(db metav1.Object, psLister pslister.PetSetLister, pods []core.Pod) ([]core.Pod, error)

func GetSelectorForNetworkPolicy added in v0.48.0

func GetSelectorForNetworkPolicy() map[string]string

func GetServiceTemplate

func GetServiceTemplate(templates []NamedServiceTemplateSpec, alias ServiceAlias) ofstv1.ServiceTemplateSpec

GetServiceTemplate returns a pointer to the desired serviceTemplate referred by "aliaS". Otherwise, it returns nil.

func GetSharedBufferSizeForPostgres

func GetSharedBufferSizeForPostgres(resource *resource.Quantity) string

GetSharedBufferSizeForPostgres this func takes a input type int64 which is in bytes return the 25% of the input in Bytes

func HasServiceTemplate

func HasServiceTemplate(templates []NamedServiceTemplateSpec, alias ServiceAlias) bool

HasServiceTemplate returns "true" if the desired serviceTemplate provided in "aliaS" is present in the serviceTemplate list. Otherwise, it returns "false".

func Kind

func Kind(kind string) schema.GroupKind

Kind takes an unqualified kind and returns a Group qualified GroupKind

func MySQLExporterTLSArg

func MySQLExporterTLSArg() string

func MySQLRequireSSLArg

func MySQLRequireSSLArg() string

func PgBouncerConfigSections added in v0.48.0

func PgBouncerConfigSections() *[]string

func PgBouncerDefaultConfig added in v0.48.0

func PgBouncerDefaultConfig() string

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

func SetDefaultClient

func SetDefaultClient(kc client.Client)

func UsesAcmeIssuer

func UsesAcmeIssuer(kc client.Client, ns string, issuerRef core.TypedLocalObjectReference) (bool, error)

Types

type AddressType

type AddressType string

+kubebuilder:validation:Enum=DNS;IP;IPv4;IPv6

const (
	AddressTypeDNS AddressType = "DNS"
	// Uses spec.podIP as address for db pods.
	AddressTypeIP AddressType = "IP"
	// Uses first IPv4 address from spec.podIP, spec.podIPs fields as address for db pods.
	AddressTypeIPv4 AddressType = "IPv4"
	// Uses first IPv6 address from spec.podIP, spec.podIPs fields as address for db pods.
	AddressTypeIPv6 AddressType = "IPv6"
)

func (AddressType) IsIP

func (a AddressType) IsIP() bool

type Age

type Age struct {
	// Populated by Provisioner when authSecret is created or Ops Manager when authSecret is updated.
	LastUpdateTimestamp metav1.Time `json:"lastUpdateTimestamp,omitempty"`
}

func (*Age) DeepCopy

func (in *Age) DeepCopy() *Age

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

func (*Age) DeepCopyInto

func (in *Age) DeepCopyInto(out *Age)

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

type AllowedConsumers

type AllowedConsumers struct {
	// Namespaces indicates namespaces from which Consumers may be attached to
	//
	// +optional
	// +kubebuilder:default={from: Same}
	Namespaces *ConsumerNamespaces `json:"namespaces,omitempty"`

	// Selector specifies a selector for consumers that are allowed to bind
	// to this database instance.
	//
	// +optional
	Selector *metav1.LabelSelector `json:"selector,omitempty"`
}

AllowedConsumers defines which consumers may refer to a database instance.

func (*AllowedConsumers) DeepCopy

func (in *AllowedConsumers) DeepCopy() *AllowedConsumers

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

func (*AllowedConsumers) DeepCopyInto

func (in *AllowedConsumers) DeepCopyInto(out *AllowedConsumers)

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

type ArbiterSpec

type ArbiterSpec struct {
	// Compute Resources required by the sidecar container.
	// +optional
	Resources core.ResourceRequirements `json:"resources,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
	// +mapType=atomic
	NodeSelector map[string]string `json:"nodeSelector,omitempty"`
	// If specified, the pod's tolerations.
	// +optional
	Tolerations []core.Toleration `json:"tolerations,omitempty"`
}

func (*ArbiterSpec) DeepCopy

func (in *ArbiterSpec) DeepCopy() *ArbiterSpec

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

func (*ArbiterSpec) DeepCopyInto

func (in *ArbiterSpec) DeepCopyInto(out *ArbiterSpec)

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

type Archiver

type Archiver struct {
	// Pause is used to stop the archiver backup for the database
	// +optional
	Pause bool `json:"pause,omitempty"`
	// Ref is the name and namespace reference to the Archiver CR
	Ref kmapi.ObjectReference `json:"ref"`
}

func (*Archiver) DeepCopy

func (in *Archiver) DeepCopy() *Archiver

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

func (*Archiver) DeepCopyInto

func (in *Archiver) DeepCopyInto(out *Archiver)

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

type ArchiverRecovery

type ArchiverRecovery struct {
	RecoveryTimestamp metav1.Time `json:"recoveryTimestamp"`
	// +optional
	EncryptionSecret *kmapi.ObjectReference `json:"encryptionSecret,omitempty"`
	// +optional
	ManifestRepository *kmapi.ObjectReference `json:"manifestRepository,omitempty"`

	// FullDBRepository means db restore + manifest restore
	FullDBRepository    *kmapi.ObjectReference   `json:"fullDBRepository,omitempty"`
	ReplicationStrategy *PITRReplicationStrategy `json:"replicationStrategy,omitempty"`
}

func (*ArchiverRecovery) DeepCopy

func (in *ArchiverRecovery) DeepCopy() *ArchiverRecovery

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

func (*ArchiverRecovery) DeepCopyInto

func (in *ArchiverRecovery) DeepCopyInto(out *ArchiverRecovery)

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

type AutoOpsSpec

type AutoOpsSpec struct {
	// Disabled specifies whether the ops-request recommendation generation will be disabled or not.
	// +optional
	Disabled bool `json:"disabled,omitempty"`
}

AutoOpsSpec defines the specifications of automatic ops-request recommendation generation

func (*AutoOpsSpec) DeepCopy

func (in *AutoOpsSpec) DeepCopy() *AutoOpsSpec

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

func (*AutoOpsSpec) DeepCopyInto

func (in *AutoOpsSpec) DeepCopyInto(out *AutoOpsSpec)

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

type ClusterAuthMode

type ClusterAuthMode string

ClusterAuthMode represents the clusterAuthMode of mongodb clusters ( replicaset or sharding) ref: https://docs.mongodb.com/manual/reference/program/mongod/#cmdoption-mongod-clusterauthmode +kubebuilder:validation:Enum=keyFile;sendKeyFile;sendX509;x509

const (
	// ClusterAuthModeKeyFile represents `keyFile` mongodb clusterAuthMode. In this mode, Use a keyfile for authentication. Accept only keyfiles.
	ClusterAuthModeKeyFile ClusterAuthMode = "keyFile"

	// ClusterAuthModeSendKeyFile represents `sendKeyFile` mongodb clusterAuthMode.
	// This mode is for rolling upgrade purposes. Send a keyfile for authentication but can accept both keyfiles
	// and x.509 certificates.
	ClusterAuthModeSendKeyFile ClusterAuthMode = "sendKeyFile"

	// ClusterAuthModeSendX509 represents `sendx509` mongodb clusterAuthMode. This mode is usually for rolling upgrade purposes.
	// Send the x.509 certificate for authentication but can accept both keyfiles and x.509 certificates.
	ClusterAuthModeSendX509 ClusterAuthMode = "sendX509"

	// ClusterAuthModeX509 represents `x509` mongodb clusterAuthMode. This is the recommended clusterAuthMode.
	// Send the x.509 certificate for authentication and accept only x.509 certificates.
	ClusterAuthModeX509 ClusterAuthMode = "x509"
)

type ConnectionPoolConfig

type ConnectionPoolConfig struct {
	// Port is the port number on which PgBouncer listens to clients. Default: 5432.
	// +optional
	Port *int32 `json:"port,omitempty"`
	// PoolMode is the pooling mechanism type. Default: session.
	// +optional
	PoolMode string `json:"poolMode,omitempty"`
	// MaxClientConnections is the maximum number of allowed client connections. Default: 100.
	// +optional
	MaxClientConnections *int64 `json:"maxClientConnections,omitempty"`
	// DefaultPoolSize specifies how many server connections to allow per user/database pair. Default: 20.
	// +optional
	DefaultPoolSize *int64 `json:"defaultPoolSize,omitempty"`
	// MinPoolSize is used to add more server connections to pool if below this number. Default: 0 (disabled).
	// +optional
	MinPoolSize *int64 `json:"minPoolSize,omitempty"`
	// ReservePoolSize specifies how many additional connections to allow to a pool. 0 disables. Default: 0 (disabled).
	// +optional
	ReservePoolSize *int64 `json:"reservePoolSize,omitempty"`
	// ReservePoolTimeoutSeconds is the number of seconds in which if a client has not been serviced,
	// pgbouncer enables use of additional connections from reserve pool. 0 disables. Default: 5.0.
	// +optional
	ReservePoolTimeoutSeconds *int64 `json:"reservePoolTimeoutSeconds,omitempty"`
	// MaxDBConnections is the maximum number of connections allowed per-database. Default: 0 (unlimited).
	// +optional
	MaxDBConnections *int64 `json:"maxDBConnections,omitempty"`
	// MaxUserConnections is the maximum number of users allowed per-database. Default: 0 (unlimited).
	// +optional
	MaxUserConnections *int64 `json:"maxUserConnections,omitempty"`
	// StatsPeriodSeconds sets how often the averages shown in various SHOW commands are updated
	// and how often aggregated statistics are written to the log. Default: 60
	// +optional
	StatsPeriodSeconds *int64 `json:"statsPeriodSeconds,omitempty"`
	// AuthType specifies how to authenticate users. Default: md5 (md5+plain text).
	// +optional
	AuthType PgBouncerClientAuthMode `json:"authType,omitempty"`
	// IgnoreStartupParameters specifies comma-separated startup parameters that
	// pgbouncer knows are handled by admin and it can ignore them. Default: empty
	// +optional
	IgnoreStartupParameters string `json:"ignoreStartupParameters,omitempty"`
}

func (*ConnectionPoolConfig) DeepCopy

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

func (*ConnectionPoolConfig) DeepCopyInto

func (in *ConnectionPoolConfig) DeepCopyInto(out *ConnectionPoolConfig)

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

type ConsumerNamespaces

type ConsumerNamespaces struct {
	// From indicates where Consumers will be selected for the database instance. Possible
	// values are:
	// * All: Consumers in all namespaces.
	// * Selector: Consumers in namespaces selected by the selector
	// * Same: Only Consumers in the same namespace
	//
	// +optional
	// +kubebuilder:default=Same
	From *FromNamespaces `json:"from,omitempty"`

	// Selector must be specified when From is set to "Selector". In that case,
	// only Consumers in Namespaces matching this Selector will be selected by the
	// database instance. This field is ignored for other values of "From".
	//
	// +optional
	Selector *metav1.LabelSelector `json:"selector,omitempty"`
}

ConsumerNamespaces indicate which namespaces Consumers should be selected from.

func (*ConsumerNamespaces) DeepCopy

func (in *ConsumerNamespaces) DeepCopy() *ConsumerNamespaces

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

func (*ConsumerNamespaces) DeepCopyInto

func (in *ConsumerNamespaces) DeepCopyInto(out *ConsumerNamespaces)

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

type Database

type Database struct {
	// SyncUsers is a boolean type and when enabled, operator fetches users of backend server from externally managed
	// secrets to the PgBouncer server. Secrets updation or deletion are also synced in pgBouncer when it is enabled.
	// +optional
	SyncUsers bool `json:"syncUsers,omitempty"`

	// DatabaseRef specifies the database appbinding reference in any namespace.
	DatabaseRef appcat.AppReference `json:"databaseRef"`

	// DatabaseName is the name of the target database inside a Postgres instance.
	DatabaseName string `json:"databaseName"`
}

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.

type DatabasePhase

type DatabasePhase string

+kubebuilder:validation:Enum=Provisioning;DataRestoring;Ready;Critical;NotReady;Halted;Unknown

const (
	// used for Databases that are currently provisioning
	DatabasePhaseProvisioning DatabasePhase = "Provisioning"
	// used for Databases for which data is currently restoring
	DatabasePhaseDataRestoring DatabasePhase = "DataRestoring"
	// used for Databases that are currently ReplicaReady, AcceptingConnection and Ready
	DatabasePhaseReady DatabasePhase = "Ready"
	// used for Databases that can connect, ReplicaReady == false || Ready == false (eg, ES yellow)
	DatabasePhaseCritical DatabasePhase = "Critical"
	// used for Databases that can't connect
	DatabasePhaseNotReady DatabasePhase = "NotReady"
	// used for Databases that are halted
	DatabasePhaseHalted DatabasePhase = "Halted"
	// used for Databases for which Phase can't be calculated
	DatabasePhaseUnknown DatabasePhase = "Unknown"
)

type DeletionPolicy

type DeletionPolicy string

+kubebuilder:validation:Enum=Halt;Delete;WipeOut;DoNotTerminate

const (
	// Deletes database pods, service but leave the PVCs and stash backup data intact.
	DeletionPolicyHalt DeletionPolicy = "Halt"
	// Deletes database pods, service, pvcs but leave the stash backup data intact.
	DeletionPolicyDelete DeletionPolicy = "Delete"
	// Deletes database pods, service, pvcs and stash backup data.
	DeletionPolicyWipeOut DeletionPolicy = "WipeOut"
	// Rejects attempt to delete database using ValidationWebhook.
	DeletionPolicyDoNotTerminate DeletionPolicy = "DoNotTerminate"
)

type Elasticsearch

type Elasticsearch struct {
	metav1.TypeMeta   `json:",inline,omitempty"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	Spec              ElasticsearchSpec   `json:"spec,omitempty"`
	Status            ElasticsearchStatus `json:"status,omitempty"`
}

+kubebuilder:object:root=true +kubebuilder:resource:path=elasticsearches,singular=elasticsearch,shortName=es,categories={datastore,kubedb,appscode,all} +kubebuilder:subresource:status +kubebuilder:storageversion +kubebuilder:printcolumn:name="Version",type="string",JSONPath=".spec.version" +kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.phase" +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"

func (Elasticsearch) AppBindingMeta

func (e Elasticsearch) AppBindingMeta() appcat.AppBindingMeta

func (*Elasticsearch) AsOwner

func (e *Elasticsearch) AsOwner() *metav1.OwnerReference

func (*Elasticsearch) CertSecretVolumeMountPath

func (e *Elasticsearch) CertSecretVolumeMountPath(configDir string, alias ElasticsearchCertificateAlias) string

returns the mountPath for certificate secrets. if configDir is "/usr/share/elasticsearch/config", mountPath will be, "/usr/share/elasticsearch/config/certs/<alias>".

func (*Elasticsearch) CertSecretVolumeName

func (e *Elasticsearch) CertSecretVolumeName(alias ElasticsearchCertificateAlias) string

returns the volume name for certificate secret. Values will be like: transport-certs, http-certs etc.

func (*Elasticsearch) CertificateName

func (e *Elasticsearch) CertificateName(alias ElasticsearchCertificateAlias) string

CertificateName returns the default certificate name and/or certificate secret name for a certificate alias

func (*Elasticsearch) ClientCertificateCN

func (e *Elasticsearch) ClientCertificateCN(alias ElasticsearchCertificateAlias) string

ClientCertificateCN returns the CN for a client certificate

func (*Elasticsearch) CombinedPetSetName

func (e *Elasticsearch) CombinedPetSetName() string

func (*Elasticsearch) ConfigSecretName

func (e *Elasticsearch) ConfigSecretName() string

returns the secret name for the default elasticsearch configuration

func (*Elasticsearch) CoordinatingPetSetName

func (e *Elasticsearch) CoordinatingPetSetName() string

func (Elasticsearch) CustomResourceDefinition

func (_ Elasticsearch) CustomResourceDefinition() *apiextensions.CustomResourceDefinition

func (*Elasticsearch) DataColdPetSetName

func (e *Elasticsearch) DataColdPetSetName() string

func (*Elasticsearch) DataContentPetSetName

func (e *Elasticsearch) DataContentPetSetName() string

func (*Elasticsearch) DataFrozenPetSetName

func (e *Elasticsearch) DataFrozenPetSetName() string

func (*Elasticsearch) DataHotPetSetName

func (e *Elasticsearch) DataHotPetSetName() string

func (*Elasticsearch) DataPetSetName

func (e *Elasticsearch) DataPetSetName() string

func (Elasticsearch) DataSelectors

func (e Elasticsearch) DataSelectors() map[string]string

func (*Elasticsearch) DataWarmPetSetName

func (e *Elasticsearch) DataWarmPetSetName() string

func (*Elasticsearch) DeepCopy

func (in *Elasticsearch) DeepCopy() *Elasticsearch

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

func (*Elasticsearch) DeepCopyInto

func (in *Elasticsearch) DeepCopyInto(out *Elasticsearch)

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

func (*Elasticsearch) DeepCopyObject

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

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

func (*Elasticsearch) DefaultUserCredSecretName

func (e *Elasticsearch) DefaultUserCredSecretName(userName string) string

returns the default secret name for the user credentials (ie. username, password) If username contains underscore (_), it will be replaced by hyphen (‐) for the Kubernetes naming convention.

func (Elasticsearch) GetAuthSecretName

func (e Elasticsearch) GetAuthSecretName() string

func (*Elasticsearch) GetCertSecretName

func (e *Elasticsearch) GetCertSecretName(alias ElasticsearchCertificateAlias) string

GetCertSecretName returns the secret name for a certificate alias if any, otherwise returns default certificate secret name for the given alias.

func (*Elasticsearch) GetConnectionScheme

func (e *Elasticsearch) GetConnectionScheme() string

func (*Elasticsearch) GetConnectionURL

func (e *Elasticsearch) GetConnectionURL() string

func (*Elasticsearch) GetMatchExpressions

func (e *Elasticsearch) GetMatchExpressions() []metav1.LabelSelectorRequirement

func (*Elasticsearch) GetPersistentSecrets

func (e *Elasticsearch) GetPersistentSecrets() []string

func (*Elasticsearch) GetUserCredSecretName

func (e *Elasticsearch) GetUserCredSecretName(username string) (string, error)

Return the secret name for the given user. Return error, if the secret name is missing.

func (Elasticsearch) GoverningServiceName

func (e Elasticsearch) GoverningServiceName() string

func (*Elasticsearch) Hub

func (*Elasticsearch) Hub()

func (*Elasticsearch) IngestPetSetName

func (e *Elasticsearch) IngestPetSetName() string

func (Elasticsearch) IngestSelectors

func (e Elasticsearch) IngestSelectors() map[string]string

func (*Elasticsearch) InitialMasterNodes

func (e *Elasticsearch) InitialMasterNodes() []string

func (*Elasticsearch) MLPetSetName

func (e *Elasticsearch) MLPetSetName() string

func (*Elasticsearch) MasterDiscoveryServiceName

func (e *Elasticsearch) MasterDiscoveryServiceName() string

func (*Elasticsearch) MasterPetSetName

func (e *Elasticsearch) MasterPetSetName() string

func (Elasticsearch) MasterSelectors

func (e Elasticsearch) MasterSelectors() map[string]string

func (Elasticsearch) NodeRoleSpecificLabelKey

func (e Elasticsearch) NodeRoleSpecificLabelKey(roleType ElasticsearchNodeRoleType) string

func (Elasticsearch) NodeRoleSpecificSelectors

func (e Elasticsearch) NodeRoleSpecificSelectors(roleType ElasticsearchNodeRoleType) map[string]string

func (Elasticsearch) OffshootLabels

func (e Elasticsearch) OffshootLabels() map[string]string

func (Elasticsearch) OffshootName

func (e Elasticsearch) OffshootName() string

func (Elasticsearch) OffshootSelectors

func (e Elasticsearch) OffshootSelectors(extraSelectors ...map[string]string) map[string]string

func (Elasticsearch) PodControllerLabels

func (e Elasticsearch) PodControllerLabels(extraLabels ...map[string]string) map[string]string

func (Elasticsearch) PodLabels

func (e Elasticsearch) PodLabels(extraLabels ...map[string]string) map[string]string

func (*Elasticsearch) ReplicasAreReady

func (e *Elasticsearch) ReplicasAreReady(lister pslister.PetSetLister) (bool, string, error)

func (Elasticsearch) ResourceFQN

func (e Elasticsearch) ResourceFQN() string

func (Elasticsearch) ResourceKind

func (e Elasticsearch) ResourceKind() string

func (Elasticsearch) ResourcePlural

func (e Elasticsearch) ResourcePlural() string

func (Elasticsearch) ResourceShortCode

func (e Elasticsearch) ResourceShortCode() string

func (Elasticsearch) ResourceSingular

func (e Elasticsearch) ResourceSingular() string

func (Elasticsearch) ServiceLabels

func (e Elasticsearch) ServiceLabels(alias ServiceAlias, extraLabels ...map[string]string) map[string]string

func (Elasticsearch) ServiceName

func (e Elasticsearch) ServiceName() string

func (*Elasticsearch) SetDefaults

func (e *Elasticsearch) SetDefaults(esVersion *catalog.ElasticsearchVersion)

func (*Elasticsearch) SetHealthCheckerDefaults

func (e *Elasticsearch) SetHealthCheckerDefaults()

func (*Elasticsearch) SetMetricsExporterDefaults

func (e *Elasticsearch) SetMetricsExporterDefaults(esVersion *catalog.ElasticsearchVersion)

func (*Elasticsearch) SetTLSDefaults

func (e *Elasticsearch) SetTLSDefaults(esVersion *catalog.ElasticsearchVersion)

set default tls configuration (ie. alias, secretName)

func (Elasticsearch) StatsService

func (e Elasticsearch) StatsService() mona.StatsAccessor

func (Elasticsearch) StatsServiceLabels

func (e Elasticsearch) StatsServiceLabels() map[string]string

func (*Elasticsearch) TransformPetSetName

func (e *Elasticsearch) TransformPetSetName() string

type ElasticsearchCertificateAlias

type ElasticsearchCertificateAlias string

+kubebuilder:validation:Enum=ca;transport;http;admin;client;archiver;metrics-exporter

const (
	ElasticsearchCACert              ElasticsearchCertificateAlias = "ca"
	ElasticsearchTransportCert       ElasticsearchCertificateAlias = "transport"
	ElasticsearchHTTPCert            ElasticsearchCertificateAlias = "http"
	ElasticsearchAdminCert           ElasticsearchCertificateAlias = "admin"
	ElasticsearchClientCert          ElasticsearchCertificateAlias = "client"
	ElasticsearchArchiverCert        ElasticsearchCertificateAlias = "archiver"
	ElasticsearchMetricsExporterCert ElasticsearchCertificateAlias = "metrics-exporter"
)

type ElasticsearchClusterTopology

type ElasticsearchClusterTopology struct {
	Master       ElasticsearchNode  `json:"master"`
	Ingest       ElasticsearchNode  `json:"ingest"`
	Data         *ElasticsearchNode `json:"data,omitempty"`
	DataContent  *ElasticsearchNode `json:"dataContent,omitempty"`
	DataHot      *ElasticsearchNode `json:"dataHot,omitempty"`
	DataWarm     *ElasticsearchNode `json:"dataWarm,omitempty"`
	DataCold     *ElasticsearchNode `json:"dataCold,omitempty"`
	DataFrozen   *ElasticsearchNode `json:"dataFrozen,omitempty"`
	ML           *ElasticsearchNode `json:"ml,omitempty"`
	Transform    *ElasticsearchNode `json:"transform,omitempty"`
	Coordinating *ElasticsearchNode `json:"coordinating,omitempty"`
}

func (*ElasticsearchClusterTopology) DeepCopy

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

func (*ElasticsearchClusterTopology) DeepCopyInto

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

func (*ElasticsearchClusterTopology) ToMap

ToMap returns ClusterTopology in a Map

type ElasticsearchInternalUser

type ElasticsearchInternalUser string
const (
	ElasticsearchInternalUserElastic              ElasticsearchInternalUser = "elastic"
	ElasticsearchInternalUserAdmin                ElasticsearchInternalUser = "admin"
	ElasticsearchInternalUserKibanaserver         ElasticsearchInternalUser = "kibanaserver"
	ElasticsearchInternalUserKibanaSystem         ElasticsearchInternalUser = "kibana_system"
	ElasticsearchInternalUserLogstashSystem       ElasticsearchInternalUser = "logstash_system"
	ElasticsearchInternalUserBeatsSystem          ElasticsearchInternalUser = "beats_system"
	ElasticsearchInternalUserApmSystem            ElasticsearchInternalUser = "apm_system"
	ElasticsearchInternalUserRemoteMonitoringUser ElasticsearchInternalUser = "remote_monitoring_user"
	ElasticsearchInternalUserKibanaro             ElasticsearchInternalUser = "kibanaro"
	ElasticsearchInternalUserLogstash             ElasticsearchInternalUser = "logstash"
	ElasticsearchInternalUserReadall              ElasticsearchInternalUser = "readall"
	ElasticsearchInternalUserSnapshotrestore      ElasticsearchInternalUser = "snapshotrestore"
	ElasticsearchInternalUserMetricsExporter      ElasticsearchInternalUser = "metrics_exporter"
)

type ElasticsearchList

type ElasticsearchList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	// Items is a list of Elasticsearch CRD objects
	Items []Elasticsearch `json:"items,omitempty"`
}

func (*ElasticsearchList) DeepCopy

func (in *ElasticsearchList) DeepCopy() *ElasticsearchList

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

func (*ElasticsearchList) DeepCopyInto

func (in *ElasticsearchList) DeepCopyInto(out *ElasticsearchList)

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

func (*ElasticsearchList) DeepCopyObject

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

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

type ElasticsearchNode

type ElasticsearchNode struct {
	// Replicas represents number of replica for this specific type of node
	// +optional
	Replicas *int32 `json:"replicas,omitempty"`
	// +optional
	Suffix string `json:"suffix,omitempty"`
	// HeapSizePercentage specifies both the initial heap allocation (-Xms) percentage and the maximum heap allocation (-Xmx) percentage.
	// Node level values have higher precedence than global values.
	// +optional
	HeapSizePercentage *int32 `json:"heapSizePercentage,omitempty"`
	// Storage to specify how storage shall be used.
	// +optional
	Storage *core.PersistentVolumeClaimSpec `json:"storage,omitempty"`
	// PodTemplate is an optional configuration for pods used to expose database
	// +optional
	PodTemplate ofstv2.PodTemplateSpec `json:"podTemplate,omitempty"`
	// An eviction is allowed if at most "maxUnavailable" pods selected by
	// "selector" are unavailable after the eviction, i.e. even in absence of
	// the evicted pod. For example, one can prevent all voluntary evictions
	// by specifying 0. This is a mutually exclusive setting with "minAvailable".
	// +optional
	MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty"`
}

func (*ElasticsearchNode) DeepCopy

func (in *ElasticsearchNode) DeepCopy() *ElasticsearchNode

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

func (*ElasticsearchNode) DeepCopyInto

func (in *ElasticsearchNode) DeepCopyInto(out *ElasticsearchNode)

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

type ElasticsearchNodeRoleType

type ElasticsearchNodeRoleType string
const (
	ElasticsearchNodeRoleTypeCombined            ElasticsearchNodeRoleType = "combined"
	ElasticsearchNodeRoleTypeMaster              ElasticsearchNodeRoleType = "master"
	ElasticsearchNodeRoleTypeData                ElasticsearchNodeRoleType = "data"
	ElasticsearchNodeRoleTypeDataContent         ElasticsearchNodeRoleType = "data-content"
	ElasticsearchNodeRoleTypeDataHot             ElasticsearchNodeRoleType = "data-hot"
	ElasticsearchNodeRoleTypeDataWarm            ElasticsearchNodeRoleType = "data-warm"
	ElasticsearchNodeRoleTypeDataCold            ElasticsearchNodeRoleType = "data-cold"
	ElasticsearchNodeRoleTypeDataFrozen          ElasticsearchNodeRoleType = "data-frozen"
	ElasticsearchNodeRoleTypeIngest              ElasticsearchNodeRoleType = "ingest"
	ElasticsearchNodeRoleTypeML                  ElasticsearchNodeRoleType = "ml"
	ElasticsearchNodeRoleTypeRemoteClusterClient ElasticsearchNodeRoleType = "remote-cluster-client"
	ElasticsearchNodeRoleTypeTransform           ElasticsearchNodeRoleType = "transform"
	ElasticsearchNodeRoleTypeCoordinating        ElasticsearchNodeRoleType = "coordinating"
)

type ElasticsearchRoleMapSpec

type ElasticsearchRoleMapSpec struct {
	// Specifies the reserved status.
	// Resources that have this set to true can’t be changed using the REST API or Kibana.
	// Default to "false".
	// +optional
	Reserved bool `json:"reserved,omitempty" yaml:"reserved,omitempty"`

	// Specifies the hidden status.
	// Resources that have this set to true are not returned by the REST API
	// and not visible in Kibana.
	// Default to "false".
	// +optional
	Hidden bool `json:"hidden,omitempty" yaml:"hidden,omitempty"`

	// Specifies a list of backend roles assigned to this role.
	// Backend roles can come from the internal user database,
	// LDAP groups, JSON web token claims or SAML assertions.
	// +optional
	BackendRoles []string `json:"backendRoles,omitempty" yaml:"backend_roles,omitempty"`

	// Specifies a list of hosts assigned to this role.
	// +optional
	Hosts []string `json:"hosts,omitempty" yaml:"hosts,omitempty"`

	// Specifies a list of users assigned to this role.
	// +optional
	Users []string `json:"users,omitempty" yaml:"users,omitempty"`

	// Specifies a list of backend roles (migrated from ES-version6) assigned to this role.
	AndBackendRoles []string `json:"andBackendRoles,omitempty" yaml:"and_backend_roles,omitempty"`
}

Specifies the role mapping structure. Both 'json' and 'yaml' tags are used in structure metadata. The `json` tags (camel case) are used while taking input from users. The `yaml` tags (snake case) are used by the operator to generate roles_mapping.yml file.

func (*ElasticsearchRoleMapSpec) DeepCopy

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

func (*ElasticsearchRoleMapSpec) DeepCopyInto

func (in *ElasticsearchRoleMapSpec) DeepCopyInto(out *ElasticsearchRoleMapSpec)

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

type ElasticsearchSpec

type ElasticsearchSpec struct {
	// AutoOps contains configuration of automatic ops-request-recommendation generation
	// +optional
	AutoOps AutoOpsSpec `json:"autoOps,omitempty"`

	// Version of Elasticsearch to be deployed.
	Version string `json:"version"`

	// Number of instances to deploy for a Elasticsearch database.
	// +optional
	Replicas *int32 `json:"replicas,omitempty"`

	// Elasticsearch topology for node specification
	// +optional
	Topology *ElasticsearchClusterTopology `json:"topology,omitempty"`

	// To enable ssl for http layer
	EnableSSL bool `json:"enableSSL,omitempty"`

	// disable security of authPlugin (ie, xpack or searchguard). It disables authentication security of user.
	// If unset, default is false
	// +optional
	DisableSecurity bool `json:"disableSecurity,omitempty"`

	// Database authentication secret
	// +optional
	AuthSecret *SecretReference `json:"authSecret,omitempty"`

	// StorageType can be durable (default) or ephemeral
	StorageType StorageType `json:"storageType,omitempty"`

	// Storage to specify how storage shall be used.
	Storage *core.PersistentVolumeClaimSpec `json:"storage,omitempty"`

	// Init is used to initialize database
	// +optional
	Init *InitSpec `json:"init,omitempty"`

	// Monitor is used monitor database instance
	// +optional
	Monitor *mona.AgentSpec `json:"monitor,omitempty"`

	// ConfigSecret is an optional field to provide custom configuration file for database.
	// If specified, this file will be used as configuration file otherwise default configuration file will be used.
	// +optional
	ConfigSecret *core.LocalObjectReference `json:"configSecret,omitempty"`

	// SecureConfigSecret is an optional field to provide secure settings for database.
	//	- Ref: https://www.elastic.co/guide/en/elasticsearch/reference/7.14/secure-settings.html
	// Secure settings are store at "ES_CONFIG_DIR/elasticsearch.keystore" file (contents are encoded with password),
	// once the keystore created.
	// Expects a k8s secret name with data format:
	//	data:
	//		key: value
	//		password: KEYSTORE_PASSWORD
	//		s3.client.default.access_key: ACCESS_KEY
	//		s3.client.default.secret_key: SECRET_KEY
	// +optional
	SecureConfigSecret *core.LocalObjectReference `json:"secureConfigSecret,omitempty"`

	// PodTemplate is an optional configuration for pods used to expose database
	// +optional
	PodTemplate ofstv2.PodTemplateSpec `json:"podTemplate,omitempty"`

	// ServiceTemplates is an optional configuration for services used to expose database
	// +optional
	ServiceTemplates []NamedServiceTemplateSpec `json:"serviceTemplates,omitempty"`

	// An eviction is allowed if at most "maxUnavailable" pods selected by
	// "selector" are unavailable after the eviction, i.e. even in absence of
	// the evicted pod. For example, one can prevent all voluntary evictions
	// by specifying 0. This is a mutually exclusive setting with "minAvailable".
	// +optional
	MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty"`

	// TLS contains tls configurations
	// +optional
	TLS *kmapi.TLSConfig `json:"tls,omitempty"`

	// InternalUsers contains internal user configurations.
	// Expected Input format:
	// internalUsers:
	//   <username1>:
	//		...
	//   <username2>:
	//		...
	// +optional
	InternalUsers map[string]ElasticsearchUserSpec `json:"internalUsers,omitempty"`

	// RolesMapping contains roles mapping configurations.
	// Expected Input format:
	// rolesMapping:
	//   <role1>:
	//		...
	//   <role2>:
	//		...
	// +optional
	RolesMapping map[string]ElasticsearchRoleMapSpec `json:"rolesMapping,omitempty"`

	// Indicates that the database is halted and all offshoot Kubernetes resources except PVCs are deleted.
	// +optional
	Halted bool `json:"halted,omitempty"`

	// DeletionPolicy controls the delete operation for database
	// +optional
	DeletionPolicy DeletionPolicy `json:"deletionPolicy,omitempty"`

	// KernelSettings contains the additional kernel settings.
	// +optional
	KernelSettings *KernelSettings `json:"kernelSettings,omitempty"`

	// HeapSizePercentage specifies both the initial heap allocation (xms) percentage and the maximum heap allocation (xmx) percentage.
	// Elasticsearch bootstrap fails, if -Xms and -Xmx are not equal.
	// Error: initial heap size [X] not equal to maximum heap size [Y]; this can cause resize pauses.
	// It will be applied to all nodes. If the node level `heapSizePercentage` is specified,  this global value will be overwritten.
	// It defaults to 50% of memory limit.
	// +optional
	// +kubebuilder:default=50
	HeapSizePercentage *int32 `json:"heapSizePercentage,omitempty"`

	// HealthChecker defines attributes of the health checker
	// +optional
	// +kubebuilder:default={periodSeconds: 10, timeoutSeconds: 10, failureThreshold: 1}
	HealthChecker kmapi.HealthCheckSpec `json:"healthChecker"`
}

func (*ElasticsearchSpec) DeepCopy

func (in *ElasticsearchSpec) DeepCopy() *ElasticsearchSpec

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

func (*ElasticsearchSpec) DeepCopyInto

func (in *ElasticsearchSpec) DeepCopyInto(out *ElasticsearchSpec)

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

type ElasticsearchStatus

type ElasticsearchStatus struct {
	// Specifies the current phase of the database
	// +optional
	Phase DatabasePhase `json:"phase,omitempty"`
	// observedGeneration is the most recent generation observed for this resource. It corresponds to the
	// resource's generation, which is updated on mutation by the API Server.
	// +optional
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`
	// Conditions applied to the database, such as approval or denial.
	// +optional
	Conditions []kmapi.Condition `json:"conditions,omitempty"`
	// +optional
	AuthSecret *Age `json:"authSecret,omitempty"`
}

func (*ElasticsearchStatus) DeepCopy

func (in *ElasticsearchStatus) DeepCopy() *ElasticsearchStatus

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

func (*ElasticsearchStatus) DeepCopyInto

func (in *ElasticsearchStatus) DeepCopyInto(out *ElasticsearchStatus)

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

type ElasticsearchUserSpec

type ElasticsearchUserSpec struct {
	// Specifies the hash of the password.
	// +optional
	Hash string `json:"-" yaml:"hash,omitempty"`

	// Specifies The full name of the user
	// Only applicable for xpack authplugin
	FullName string `json:"full_name,omitempty" yaml:"-"`

	// Specifies Arbitrary metadata that you want to associate with the user
	// Only applicable for xpack authplugin
	Metadata map[string]string `json:"metadata,omitempty" yaml:"-"`

	// Specifies the email of the user.
	// Only applicable for xpack authplugin
	Email string `json:"email,omitempty" yaml:"-"`

	// A set of roles the user has. The roles determine the user’s access permissions.
	// To create a user without any roles, specify an empty list: []
	// Only applicable for xpack authplugin
	Roles []string `json:"roles,omitempty" yaml:"-"`

	// Specifies the k8s secret name that holds the user credentials.
	// Default to "<resource-name>-<username>-cred".
	// +optional
	SecretName string `json:"secretName,omitempty" yaml:"-"`

	// Specifies the reserved status.
	// Resources that have this set to true can’t be changed using the REST API or Kibana.
	// Default to "false".
	// +optional
	Reserved bool `json:"reserved,omitempty" yaml:"reserved,omitempty"`

	// Specifies the hidden status.
	// Resources that have this set to true are not returned by the REST API
	// and not visible in Kibana.
	// Default to "false".
	// +optional
	Hidden bool `json:"hidden,omitempty" yaml:"hidden,omitempty"`

	// Specifies a list of backend roles assigned to this user.
	// Backend roles can come from the internal user database,
	// LDAP groups, JSON web token claims or SAML assertions.
	// +optional
	BackendRoles []string `json:"backendRoles,omitempty" yaml:"backend_roles,omitempty"`

	// Specifies a list of searchguard security plugin roles assigned to this user.
	// +optional
	SearchGuardRoles []string `json:"searchGuardRoles,omitempty" yaml:"search_guard_roles,omitempty"`

	// Specifies a list of opendistro security plugin roles assigned to this user.
	// +optional
	OpendistroSecurityRoles []string `json:"opendistroSecurityRoles,omitempty" yaml:"opendistro_security_roles,omitempty"`

	// Specifies one or more custom attributes,
	// which can be used in index names and DLS queries.
	// +optional
	Attributes map[string]string `json:"attributes,omitempty" yaml:"attributes,omitempty"`

	// Specifies the description of the user
	// +optional
	Description string `json:"description,omitempty" yaml:"description,omitempty"`
}

ElasticsearchUserSpec specifies the security plugin internal user structure. Both 'json' and 'yaml' tags are used in structure metadata. The `json` tags (camel case) are used while taking input from users. The `yaml` tags (snake case) are used by the operator to generate internal_users.yml file. For Elastic-Stack built-in users, there is no yaml files, instead the operator is responsible for creating/syncing the users. For the fields that are only used by operator, the metadata yaml tag is kept empty ("-") so that they do not interrupt in other distributions YAML generation.

func (*ElasticsearchUserSpec) DeepCopy

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

func (*ElasticsearchUserSpec) DeepCopyInto

func (in *ElasticsearchUserSpec) DeepCopyInto(out *ElasticsearchUserSpec)

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

type ErrantTransactionRecoveryPolicy

type ErrantTransactionRecoveryPolicy string
const (
	ErrantTransactionRecoveryPolicyClone             ErrantTransactionRecoveryPolicy = "Clone"
	ErrantTransactionRecoveryPolicyPseudoTransaction ErrantTransactionRecoveryPolicy = "PseudoTransaction"
)

type FromNamespaces

type FromNamespaces string

FromNamespaces specifies namespace from which Consumers may be attached to a database instance.

+kubebuilder:validation:Enum=All;Selector;Same

const (
	// Consumers in all namespaces may be attached to the database instance.
	NamespacesFromAll FromNamespaces = "All"
	// Only Consumers in namespaces selected by the selector may be attached to the database instance.
	NamespacesFromSelector FromNamespaces = "Selector"
	// Only Consumers in the same namespace as the database instance may be attached to it.
	NamespacesFromSame FromNamespaces = "Same"
)

type GaleraWsrepSSTMethod

type GaleraWsrepSSTMethod string

+kubebuilder:validation:Enum=rsync;mariabackup

const (
	GaleraWsrepSSTMethodRsync       GaleraWsrepSSTMethod = "rsync"
	GaleraWsrepSSTMethodMariabackup GaleraWsrepSSTMethod = "mariabackup"
)

type GitRepo

type GitRepo struct {
	// https://github.com/kubernetes/git-sync/tree/master
	Args []string `json:"args"`
	// List of environment variables to set in the container.
	// Cannot be updated.
	// +optional
	Env []core.EnvVar `json:"env,omitempty"`
	// Security options the pod should run with.
	// More info: https://kubernetes.io/docs/concepts/policy/security-context/
	// More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
	// +optional
	SecurityContext *core.SecurityContext `json:"securityContext,omitempty"`
	// Compute Resources required by the sidecar container.
	// +optional
	Resources core.ResourceRequirements `json:"resources,omitempty"`
	// Authentication secret for git repository
	// +optional
	AuthSecret *core.LocalObjectReference `json:"authSecret,omitempty"`
}

func (*GitRepo) DeepCopy

func (in *GitRepo) DeepCopy() *GitRepo

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

func (*GitRepo) DeepCopyInto

func (in *GitRepo) DeepCopyInto(out *GitRepo)

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

type InitSpec

type InitSpec struct {
	// Initialized indicates that this database has been initialized.
	// This will be set by the operator when status.conditions["Provisioned"] is set to ensure
	// that database is not mistakenly reset when recovered using disaster recovery tools.
	Initialized bool `json:"initialized,omitempty"`
	// Wait for initial DataRestore condition
	WaitForInitialRestore bool              `json:"waitForInitialRestore,omitempty"`
	Script                *ScriptSourceSpec `json:"script,omitempty"`

	Archiver *ArchiverRecovery `json:"archiver,omitempty"`
}

func (*InitSpec) DeepCopy

func (in *InitSpec) DeepCopy() *InitSpec

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

func (*InitSpec) DeepCopyInto

func (in *InitSpec) DeepCopyInto(out *InitSpec)

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

type Kafka

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

	Spec   KafkaSpec   `json:"spec,omitempty"`
	Status KafkaStatus `json:"status,omitempty"`
}

+kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:storageversion +kubebuilder:resource:path=kafkas,singular=kafka,shortName=kf,categories={datastore,kubedb,appscode,all} +kubebuilder:printcolumn:name="Type",type="string",JSONPath=".apiVersion" +kubebuilder:printcolumn:name="Version",type="string",JSONPath=".spec.version" +kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.phase" +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"

func (*Kafka) AppBindingMeta

func (k *Kafka) AppBindingMeta() appcat.AppBindingMeta

func (*Kafka) AsOwner

func (k *Kafka) AsOwner() *meta.OwnerReference

func (*Kafka) BrokerNodeSelectors

func (k *Kafka) BrokerNodeSelectors() map[string]string

func (*Kafka) BrokerPetSetName

func (k *Kafka) BrokerPetSetName() string

func (*Kafka) BrokerServiceLabels

func (k *Kafka) BrokerServiceLabels() map[string]string

func (*Kafka) CertSecretVolumeMountPath

func (k *Kafka) CertSecretVolumeMountPath(configDir string, cert string) string

CertSecretVolumeMountPath returns the CertSecretVolumeMountPath if configDir is "/opt/kafka/config", mountPath will be, "/opt/kafka/config/<alias>".

func (*Kafka) CertSecretVolumeName

func (k *Kafka) CertSecretVolumeName(alias KafkaCertificateAlias) string

CertSecretVolumeName returns the CertSecretVolumeName Values will be like: client-certs, server-certs etc.

func (*Kafka) CertificateName

func (k *Kafka) CertificateName(alias KafkaCertificateAlias) string

CertificateName returns the default certificate name and/or certificate secret name for a certificate alias

func (*Kafka) ClientCertificateCN

func (k *Kafka) ClientCertificateCN(alias KafkaCertificateAlias) string

ClientCertificateCN returns the CN for a client certificate

func (*Kafka) CombinedPetSetName

func (k *Kafka) CombinedPetSetName() string

func (*Kafka) ConfigSecretName

func (k *Kafka) ConfigSecretName(role KafkaNodeRoleType) string

func (*Kafka) ControllerNodeSelectors

func (k *Kafka) ControllerNodeSelectors() map[string]string

func (*Kafka) ControllerPetSetName

func (k *Kafka) ControllerPetSetName() string

func (*Kafka) ControllerServiceLabels

func (k *Kafka) ControllerServiceLabels() map[string]string

func (*Kafka) CruiseControlConfigSecretName

func (k *Kafka) CruiseControlConfigSecretName() string

func (*Kafka) CustomResourceDefinition

func (k *Kafka) CustomResourceDefinition() *apiextensions.CustomResourceDefinition

func (*Kafka) DeepCopy

func (in *Kafka) DeepCopy() *Kafka

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

func (*Kafka) DeepCopyInto

func (in *Kafka) DeepCopyInto(out *Kafka)

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

func (*Kafka) DeepCopyObject

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

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

func (*Kafka) Default

func (k *Kafka) Default()

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

func (*Kafka) GenerateClusterID added in v0.48.0

func (k *Kafka) GenerateClusterID() string

GenerateClusterID Kafka uses Leach-Salz UUIDs for cluster ID. It requires 16 bytes of base64 encoded RFC 4122 version 1 UUID. Here, the generated uuid is 32 bytes hexadecimal string and have 5 hyphen separated parts: 8-4-4-4-12 part 3 contains version number, part 4 is a randomly generated clock sequence and part 5 is node field that contains MAC address of the host machine These 3 parts will be used as cluster ID ref: https://kafka.apache.org/31/javadoc/org/apache/kafka/common/Uuid.html ref: https://go-recipes.dev/how-to-generate-uuids-with-go-be3988e771a6

func (*Kafka) GetAuthSecretName added in v0.48.0

func (k *Kafka) GetAuthSecretName() string

func (*Kafka) GetCertSecretName

func (k *Kafka) GetCertSecretName(alias KafkaCertificateAlias) string

GetCertSecretName returns the secret name for a certificate alias if any, otherwise returns default certificate secret name for the given alias.

func (*Kafka) GetConnectionScheme

func (k *Kafka) GetConnectionScheme() string

func (*Kafka) GetCruiseControlClientID

func (k *Kafka) GetCruiseControlClientID() string

func (*Kafka) GetKeystoreSecretName added in v0.49.0

func (k *Kafka) GetKeystoreSecretName() string

func (*Kafka) GetPersistentSecrets

func (k *Kafka) GetPersistentSecrets() []string

func (*Kafka) GoverningServiceName

func (k *Kafka) GoverningServiceName() string

func (*Kafka) GoverningServiceNameCruiseControl

func (k *Kafka) GoverningServiceNameCruiseControl() string

func (*Kafka) Hub

func (*Kafka) Hub()

func (*Kafka) KafkaEnabledSASLMechanismsKey added in v0.48.0

func (k *Kafka) KafkaEnabledSASLMechanismsKey(protocol string) string

func (*Kafka) KafkaSaslListenerProtocolConfigKey added in v0.48.0

func (k *Kafka) KafkaSaslListenerProtocolConfigKey(protocol string, mechanism string) string

func (*Kafka) NodeRoleSpecificLabelKey

func (k *Kafka) NodeRoleSpecificLabelKey(role KafkaNodeRoleType) string

func (*Kafka) OffshootLabels

func (k *Kafka) OffshootLabels() map[string]string

func (*Kafka) OffshootName

func (k *Kafka) OffshootName() string

func (*Kafka) OffshootSelectors

func (k *Kafka) OffshootSelectors(extraSelectors ...map[string]string) map[string]string

func (*Kafka) Owner

func (k *Kafka) Owner() *meta.OwnerReference

Owner returns owner reference to resources

func (*Kafka) PVCName

func (k *Kafka) PVCName(alias string) string

func (*Kafka) PetSetName

func (k *Kafka) PetSetName() string

func (*Kafka) PodControllerLabels

func (k *Kafka) PodControllerLabels(extraLabels ...map[string]string) map[string]string

func (*Kafka) PodLabels

func (k *Kafka) PodLabels(extraLabels ...map[string]string) map[string]string

func (*Kafka) ReplicasAreReady

func (k *Kafka) ReplicasAreReady(lister pslister.PetSetLister) (bool, string, error)

func (*Kafka) ResourceFQN

func (k *Kafka) ResourceFQN() string

func (*Kafka) ResourceKind

func (k *Kafka) ResourceKind() string

func (*Kafka) ResourcePlural

func (k *Kafka) ResourcePlural() string

func (*Kafka) ResourceShortCode

func (k *Kafka) ResourceShortCode() string

func (*Kafka) ResourceSingular

func (k *Kafka) ResourceSingular() string

func (*Kafka) ServiceLabels

func (k *Kafka) ServiceLabels(alias ServiceAlias, extraLabels ...map[string]string) map[string]string

func (*Kafka) ServiceName

func (k *Kafka) ServiceName() string

func (*Kafka) SetDefaultEnvs added in v0.48.0

func (k *Kafka) SetDefaultEnvs()

func (*Kafka) SetDefaults

func (k *Kafka) SetDefaults()

func (*Kafka) SetHealthCheckerDefaults

func (k *Kafka) SetHealthCheckerDefaults()

func (*Kafka) SetTLSDefaults

func (k *Kafka) SetTLSDefaults()

func (*Kafka) StandbyServiceName

func (k *Kafka) StandbyServiceName() string

func (*Kafka) StatsService

func (k *Kafka) StatsService() mona.StatsAccessor

func (*Kafka) StatsServiceLabels

func (k *Kafka) StatsServiceLabels() map[string]string

func (*Kafka) ValidateCreate

func (k *Kafka) ValidateCreate() (admission.Warnings, error)

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

func (*Kafka) ValidateCreateOrUpdate

func (k *Kafka) ValidateCreateOrUpdate() error

func (*Kafka) ValidateDelete

func (k *Kafka) ValidateDelete() (admission.Warnings, error)

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

func (*Kafka) ValidateUpdate

func (k *Kafka) ValidateUpdate(old runtime.Object) (admission.Warnings, error)

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

type KafkaApp

type KafkaApp struct {
	*Kafka
}

func (*KafkaApp) DeepCopy

func (in *KafkaApp) DeepCopy() *KafkaApp

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

func (*KafkaApp) DeepCopyInto

func (in *KafkaApp) DeepCopyInto(out *KafkaApp)

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

func (KafkaApp) Name

func (r KafkaApp) Name() string

func (KafkaApp) Type

func (r KafkaApp) Type() appcat.AppType

type KafkaBrokerCapacity

type KafkaBrokerCapacity struct {
	InBoundNetwork  string `json:"inBoundNetwork,omitempty"`
	OutBoundNetwork string `json:"outBoundNetwork,omitempty"`
}

func (*KafkaBrokerCapacity) DeepCopy

func (in *KafkaBrokerCapacity) DeepCopy() *KafkaBrokerCapacity

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

func (*KafkaBrokerCapacity) DeepCopyInto

func (in *KafkaBrokerCapacity) DeepCopyInto(out *KafkaBrokerCapacity)

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

type KafkaCertificateAlias

type KafkaCertificateAlias string

+kubebuilder:validation:Enum=ca;transport;http;client;server

const (
	KafkaCACert        KafkaCertificateAlias = "ca"
	KafkaTransportCert KafkaCertificateAlias = "transport"
	KafkaHTTPCert      KafkaCertificateAlias = "http"
	KafkaClientCert    KafkaCertificateAlias = "client"
	KafkaServerCert    KafkaCertificateAlias = "server"
)

type KafkaClusterTopology

type KafkaClusterTopology struct {
	Controller *KafkaNode `json:"controller,omitempty"`
	Broker     *KafkaNode `json:"broker,omitempty"`
}

KafkaClusterTopology defines kafka topology node specs for controller node and broker node dedicated controller nodes contains metadata for brokers and broker nodes contains data both nodes must be configured in topology mode

func (*KafkaClusterTopology) DeepCopy

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

func (*KafkaClusterTopology) DeepCopyInto

func (in *KafkaClusterTopology) DeepCopyInto(out *KafkaClusterTopology)

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

func (*KafkaClusterTopology) ToMap

func (kfTopology *KafkaClusterTopology) ToMap() map[KafkaNodeRoleType]KafkaNode

ToMap returns ClusterTopology in a Map

type KafkaCruiseControl

type KafkaCruiseControl struct {
	// Configuration for cruise-control
	// +optional
	ConfigSecret *SecretReference `json:"configSecret,omitempty"`

	// Replicas represents number of replica for this specific type of node
	// +optional
	Replicas *int32 `json:"replicas,omitempty"`

	// Suffix to append with node name
	// +optional
	Suffix string `json:"suffix,omitempty"`

	// Compute Resources required by the sidecar container.
	// +optional
	Resources core.ResourceRequirements `json:"resources,omitempty"`

	// PodTemplate is an optional configuration for pods used to expose database
	// +optional
	PodTemplate ofstv2.PodTemplateSpec `json:"podTemplate,omitempty"`

	// PodTemplate is an optional configuration for pods used to expose database
	// +optional
	BrokerCapacity *KafkaBrokerCapacity `json:"brokerCapacity,omitempty"`
}

func (*KafkaCruiseControl) DeepCopy

func (in *KafkaCruiseControl) DeepCopy() *KafkaCruiseControl

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

func (*KafkaCruiseControl) DeepCopyInto

func (in *KafkaCruiseControl) DeepCopyInto(out *KafkaCruiseControl)

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

type KafkaList

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

KafkaList contains a list of Kafka

func (*KafkaList) DeepCopy

func (in *KafkaList) DeepCopy() *KafkaList

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

func (*KafkaList) DeepCopyInto

func (in *KafkaList) DeepCopyInto(out *KafkaList)

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

func (*KafkaList) DeepCopyObject

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

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

type KafkaListenerType

type KafkaListenerType string

+kubebuilder:validation:Enum=BROKER;CONTROLLER;INTERNAL;CC

const (
	KafkaListenerBroker     KafkaListenerType = "BROKER"
	KafkaListenerController KafkaListenerType = "CONTROLLER"
	KafkaListenerLocal      KafkaListenerType = "LOCAL"
	KafkaListenerCC         KafkaListenerType = "CC"
)

type KafkaNode

type KafkaNode struct {
	// Replicas represents number of replica for this specific type of node
	// +optional
	Replicas *int32 `json:"replicas,omitempty"`

	// suffix to append with node name
	// +optional
	Suffix string `json:"suffix,omitempty"`

	// Storage to specify how storage shall be used.
	// +optional
	Storage *core.PersistentVolumeClaimSpec `json:"storage,omitempty"`

	// PodTemplate is an optional configuration for pods used to expose database
	// +optional
	PodTemplate ofstv2.PodTemplateSpec `json:"podTemplate,omitempty"`
}

func (*KafkaNode) DeepCopy

func (in *KafkaNode) DeepCopy() *KafkaNode

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

func (*KafkaNode) DeepCopyInto

func (in *KafkaNode) DeepCopyInto(out *KafkaNode)

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

type KafkaNodeRoleType

type KafkaNodeRoleType string

+kubebuilder:validation:Enum=controller;broker;combined

const (
	KafkaNodeRoleController KafkaNodeRoleType = "controller"
	KafkaNodeRoleBroker     KafkaNodeRoleType = "broker"
	KafkaNodeRoleCombined   KafkaNodeRoleType = "combined"
)

type KafkaSpec

type KafkaSpec struct {
	// Version of Kafka to be deployed.
	Version string `json:"version"`

	// Number of instances to deploy for a Kafka database.
	// +optional
	Replicas *int32 `json:"replicas,omitempty"`

	// Kafka topology for node specification
	// +optional
	Topology *KafkaClusterTopology `json:"topology,omitempty"`

	// StorageType can be durable (default) or ephemeral
	StorageType StorageType `json:"storageType,omitempty"`

	// Storage to specify how storage shall be used.
	Storage *core.PersistentVolumeClaimSpec `json:"storage,omitempty"`

	// To enable ssl for http layer
	EnableSSL bool `json:"enableSSL,omitempty"`

	// disable security. It disables authentication security of user.
	// If unset, default is false
	// +optional
	DisableSecurity bool `json:"disableSecurity,omitempty"`

	// Database authentication secret
	// +optional
	AuthSecret *SecretReference `json:"authSecret,omitempty"`

	// ConfigSecret is an optional field to provide custom configuration file for database (i.e config.properties).
	// If specified, this file will be used as configuration file otherwise default configuration file will be used.
	// +optional
	ConfigSecret *core.LocalObjectReference `json:"configSecret,omitempty"`

	// Keystore encryption secret
	// +optional
	KeystoreCredSecret *SecretReference `json:"keystoreCredSecret,omitempty"`

	// Indicates that the database is halted and all offshoot Kubernetes resources except PVCs are deleted.
	// +optional
	Halted bool `json:"halted,omitempty"`

	// TLS contains tls configurations
	// +optional
	TLS *kmapi.TLSConfig `json:"tls,omitempty"`

	// PodTemplate is an optional configuration for pods used to expose database
	// +optional
	PodTemplate ofstv2.PodTemplateSpec `json:"podTemplate,omitempty"`

	// ServiceTemplates is an optional configuration for services used to expose database
	// +optional
	ServiceTemplates []NamedServiceTemplateSpec `json:"serviceTemplates,omitempty"`

	// DeletionPolicy controls the delete operation for database
	// +optional
	DeletionPolicy DeletionPolicy `json:"deletionPolicy,omitempty"`

	// HealthChecker defines attributes of the health checker
	// +optional
	// +kubebuilder:default={periodSeconds: 10, timeoutSeconds: 10, failureThreshold: 3}
	HealthChecker kmapi.HealthCheckSpec `json:"healthChecker"`

	// CruiseControl is used to re-balance Kafka cluster
	// +optional
	CruiseControl *KafkaCruiseControl `json:"cruiseControl,omitempty"`

	// Monitor is used monitor database instance
	// +optional
	Monitor *mona.AgentSpec `json:"monitor,omitempty"`
}

KafkaSpec defines the desired state of Kafka

func (*KafkaSpec) DeepCopy

func (in *KafkaSpec) DeepCopy() *KafkaSpec

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

func (*KafkaSpec) DeepCopyInto

func (in *KafkaSpec) DeepCopyInto(out *KafkaSpec)

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

type KafkaStatus

type KafkaStatus struct {
	// Specifies the current phase of the database
	// +optional
	Phase DatabasePhase `json:"phase,omitempty"`
	// observedGeneration is the most recent generation observed for this resource. It corresponds to the
	// resource's generation, which is updated on mutation by the API Server.
	// +optional
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`
	// Conditions applied to the database, such as approval or denial.
	// +optional
	Conditions []kmapi.Condition `json:"conditions,omitempty"`
}

KafkaStatus defines the observed state of Kafka

func (*KafkaStatus) DeepCopy

func (in *KafkaStatus) DeepCopy() *KafkaStatus

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

func (*KafkaStatus) DeepCopyInto

func (in *KafkaStatus) DeepCopyInto(out *KafkaStatus)

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

type KernelSettings

type KernelSettings struct {
	// DisableDefaults can be set to false to avoid defaulting via mutator
	DisableDefaults bool `json:"disableDefaults,omitempty"`
	// Privileged specifies the status whether the init container
	// requires privileged access to perform the following commands.
	// +optional
	Privileged bool `json:"privileged,omitempty"`
	// Sysctls hold a list of sysctls commands needs to apply to kernel.
	// +optional
	Sysctls []core.Sysctl `json:"sysctls,omitempty"`
}

func (*KernelSettings) DeepCopy

func (in *KernelSettings) DeepCopy() *KernelSettings

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

func (*KernelSettings) DeepCopyInto

func (in *KernelSettings) DeepCopyInto(out *KernelSettings)

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

type LoadBalanceMode

type LoadBalanceMode string

+kubebuilder:validation:Enum=Galera;GroupReplication

const (
	LoadBalanceModeGalera           LoadBalanceMode = "Galera"
	LoadBalanceModeGroupReplication LoadBalanceMode = "GroupReplication"
)

type MariaDB

type MariaDB struct {
	metav1.TypeMeta   `json:",inline,omitempty"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	Spec              MariaDBSpec   `json:"spec,omitempty"`
	Status            MariaDBStatus `json:"status,omitempty"`
}

+kubebuilder:object:root=true +kubebuilder:resource:path=mariadbs,singular=mariadb,shortName=md,categories={datastore,kubedb,appscode,all} +kubebuilder:subresource:status +kubebuilder:storageversion +kubebuilder:printcolumn:name="Version",type="string",JSONPath=".spec.version" +kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.phase" +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"

func (MariaDB) AppBindingMeta

func (m MariaDB) AppBindingMeta() appcat.AppBindingMeta

func (*MariaDB) AsOwner

func (m *MariaDB) AsOwner() *metav1.OwnerReference

func (*MariaDB) CertFilePath

func (m *MariaDB) CertFilePath(certAlias MariaDBCertificateAlias, certFileName string) string

func (*MariaDB) CertMountPath

func (m *MariaDB) CertMountPath(alias MariaDBCertificateAlias) string

func (*MariaDB) CertificateName

func (m *MariaDB) CertificateName(alias MariaDBCertificateAlias) string

CertificateName returns the default certificate name and/or certificate secret name for a certificate alias

func (MariaDB) ClusterName

func (m MariaDB) ClusterName() string

func (MariaDB) CustomResourceDefinition

func (_ MariaDB) CustomResourceDefinition() *apiextensions.CustomResourceDefinition

func (*MariaDB) DeepCopy

func (in *MariaDB) DeepCopy() *MariaDB

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

func (*MariaDB) DeepCopyInto

func (in *MariaDB) DeepCopyInto(out *MariaDB)

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

func (*MariaDB) DeepCopyObject

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

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

func (MariaDB) GetAuthSecretName

func (m MariaDB) GetAuthSecretName() string

func (*MariaDB) GetCertSecretName

func (m *MariaDB) GetCertSecretName(alias MariaDBCertificateAlias) string

GetCertSecretName returns the secret name for a certificate alias if any, otherwise returns default certificate secret name for the given alias.

func (MariaDB) GoverningServiceName

func (m MariaDB) GoverningServiceName() string

func (*MariaDB) Hub

func (*MariaDB) Hub()

func (*MariaDB) InlineConfigSecretName

func (m *MariaDB) InlineConfigSecretName() string

func (MariaDB) IsCluster

func (m MariaDB) IsCluster() bool

func (MariaDB) OffshootLabels

func (m MariaDB) OffshootLabels() map[string]string

func (MariaDB) OffshootName

func (m MariaDB) OffshootName() string

func (MariaDB) OffshootSelectors

func (m MariaDB) OffshootSelectors() map[string]string

func (MariaDB) PeerName

func (m MariaDB) PeerName(idx int) string

func (MariaDB) PodControllerLabels

func (m MariaDB) PodControllerLabels() map[string]string

func (MariaDB) PodLabels

func (m MariaDB) PodLabels() map[string]string

func (MariaDB) PrimaryServiceDNS

func (m MariaDB) PrimaryServiceDNS() string

func (*MariaDB) ReplicasAreReady

func (m *MariaDB) ReplicasAreReady(lister pslister.PetSetLister) (bool, string, error)

func (MariaDB) ResourceFQN

func (m MariaDB) ResourceFQN() string

func (MariaDB) ResourceKind

func (m MariaDB) ResourceKind() string

func (MariaDB) ResourcePlural

func (m MariaDB) ResourcePlural() string

func (MariaDB) ResourceShortCode

func (m MariaDB) ResourceShortCode() string

func (MariaDB) ResourceSingular

func (m MariaDB) ResourceSingular() string

func (MariaDB) ServiceLabels

func (m MariaDB) ServiceLabels(alias ServiceAlias, extraLabels ...map[string]string) map[string]string

func (MariaDB) ServiceName

func (m MariaDB) ServiceName() string

func (*MariaDB) SetDefaults

func (m *MariaDB) SetDefaults(mdVersion *v1alpha1.MariaDBVersion)

func (*MariaDB) SetHealthCheckerDefaults

func (m *MariaDB) SetHealthCheckerDefaults()

func (*MariaDB) SetTLSDefaults

func (m *MariaDB) SetTLSDefaults()

func (MariaDB) StatsService

func (m MariaDB) StatsService() mona.StatsAccessor

func (MariaDB) StatsServiceLabels

func (m MariaDB) StatsServiceLabels() map[string]string

type MariaDBCertificateAlias

type MariaDBCertificateAlias string

+kubebuilder:validation:Enum=server;archiver;metrics-exporter

const (
	MariaDBServerCert   MariaDBCertificateAlias = "server"
	MariaDBClientCert   MariaDBCertificateAlias = "client"
	MariaDBExporterCert MariaDBCertificateAlias = "metrics-exporter"
)

type MariaDBList

type MariaDBList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	// Items is a list of MariaDB TPR objects
	Items []MariaDB `json:"items,omitempty"`
}

func (*MariaDBList) DeepCopy

func (in *MariaDBList) DeepCopy() *MariaDBList

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

func (*MariaDBList) DeepCopyInto

func (in *MariaDBList) DeepCopyInto(out *MariaDBList)

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

func (*MariaDBList) DeepCopyObject

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

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

type MariaDBSpec

type MariaDBSpec struct {
	// AutoOps contains configuration of automatic ops-request-recommendation generation
	// +optional
	AutoOps AutoOpsSpec `json:"autoOps,omitempty"`

	// Version of MariaDB to be deployed.
	Version string `json:"version"`

	// Number of instances to deploy for a MariaDB database.
	Replicas *int32 `json:"replicas,omitempty"`

	// StorageType can be durable (default) or ephemeral
	StorageType StorageType `json:"storageType,omitempty"`

	// Storage spec to specify how storage shall be used.
	Storage *core.PersistentVolumeClaimSpec `json:"storage,omitempty"`

	// Database authentication secret
	// +optional
	AuthSecret *SecretReference `json:"authSecret,omitempty"`

	// WsrepSSTMethod is used to define the STATE-SNAPSHOT-TRANSFER method to be used in the Galera cluster
	// default value : rsync
	// +kubebuilder:default:=rsync
	// +optional
	WsrepSSTMethod GaleraWsrepSSTMethod `json:"wsrepSSTMethod,omitempty"`

	// Init is used to initialize database
	// +optional
	Init *InitSpec `json:"init,omitempty"`

	// Monitor is used to monitor database instance
	// +optional
	Monitor *mona.AgentSpec `json:"monitor,omitempty"`

	// ConfigSecret is an optional field to provide custom configuration file for database (i.e custom-mysql.cnf).
	// If specified, this file will be used as configuration file otherwise default configuration file will be used.
	ConfigSecret *core.LocalObjectReference `json:"configSecret,omitempty"`

	// PodTemplate is an optional configuration for pods used to expose database
	// +optional
	PodTemplate ofstv2.PodTemplateSpec `json:"podTemplate,omitempty"`

	// ServiceTemplates is an optional configuration for services used to expose database
	// +optional
	ServiceTemplates []NamedServiceTemplateSpec `json:"serviceTemplates,omitempty"`

	// Indicates that the database server need to be encrypted connections(ssl)
	// +optional
	RequireSSL bool `json:"requireSSL,omitempty"`

	// TLS contains tls configurations
	// +optional
	TLS *kmapi.TLSConfig `json:"tls,omitempty"`

	// Indicates that the database is halted and all offshoot Kubernetes resources except PVCs are deleted.
	// +optional
	Halted bool `json:"halted,omitempty"`

	// DeletionPolicy controls the delete operation for database
	// +optional
	DeletionPolicy DeletionPolicy `json:"deletionPolicy,omitempty"`

	// AllowedSchemas defines the types of database schemas that MAY refer to
	// a database instance and the trusted namespaces where those schema resources MAY be
	// present.
	//
	// +kubebuilder:default={namespaces:{from: Same}}
	// +optional
	AllowedSchemas *AllowedConsumers `json:"allowedSchemas,omitempty"`

	// HealthChecker defines attributes of the health checker
	// +optional
	// +kubebuilder:default={periodSeconds: 10, timeoutSeconds: 10, failureThreshold: 1}
	HealthChecker kmapi.HealthCheckSpec `json:"healthChecker"`

	// Archiver controls database backup using Archiver CR
	// +optional
	Archiver *Archiver `json:"archiver,omitempty"`
}

func (*MariaDBSpec) DeepCopy

func (in *MariaDBSpec) DeepCopy() *MariaDBSpec

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

func (*MariaDBSpec) DeepCopyInto

func (in *MariaDBSpec) DeepCopyInto(out *MariaDBSpec)

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

func (*MariaDBSpec) GetPersistentSecrets

func (m *MariaDBSpec) GetPersistentSecrets() []string

type MariaDBStatus

type MariaDBStatus struct {
	// Specifies the current phase of the database
	// +optional
	Phase DatabasePhase `json:"phase,omitempty"`
	// observedGeneration is the most recent generation observed for this resource. It corresponds to the
	// resource's generation, which is updated on mutation by the API Server.
	// +optional
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`
	// Conditions applied to the database, such as approval or denial.
	// +optional
	Conditions []kmapi.Condition `json:"conditions,omitempty"`
	// +optional
	AuthSecret *Age `json:"authSecret,omitempty"`
}

func (*MariaDBStatus) DeepCopy

func (in *MariaDBStatus) DeepCopy() *MariaDBStatus

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

func (*MariaDBStatus) DeepCopyInto

func (in *MariaDBStatus) DeepCopyInto(out *MariaDBStatus)

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

type Memcached

type Memcached struct {
	metav1.TypeMeta   `json:",inline,omitempty"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	Spec              MemcachedSpec   `json:"spec,omitempty"`
	Status            MemcachedStatus `json:"status,omitempty"`
}

+kubebuilder:object:root=true +kubebuilder:resource:path=memcacheds,singular=memcached,shortName=mc,categories={datastore,kubedb,appscode,all} +kubebuilder:subresource:status +kubebuilder:storageversion +kubebuilder:printcolumn:name="Version",type="string",JSONPath=".spec.version" +kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.phase" +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"

func (Memcached) Address

func (m Memcached) Address() string

func (Memcached) AppBindingMeta

func (m Memcached) AppBindingMeta() appcat.AppBindingMeta

func (*Memcached) AsOwner

func (m *Memcached) AsOwner() *metav1.OwnerReference

func (*Memcached) CertificateName added in v0.49.0

func (m *Memcached) CertificateName(alias MemcachedCertificateAlias) string

CertificateName returns the default certificate name and/or certificate secret name for a certificate alias

func (Memcached) ConfigSecretName

func (m Memcached) ConfigSecretName() string

func (Memcached) CustomConfigSecretName

func (m Memcached) CustomConfigSecretName() string

func (Memcached) CustomResourceDefinition

func (_ Memcached) CustomResourceDefinition() *apiextensions.CustomResourceDefinition

func (*Memcached) DeepCopy

func (in *Memcached) DeepCopy() *Memcached

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

func (*Memcached) DeepCopyInto

func (in *Memcached) DeepCopyInto(out *Memcached)

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

func (*Memcached) DeepCopyObject

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

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

func (*Memcached) GetCertSecretName added in v0.49.0

func (m *Memcached) GetCertSecretName(alias MemcachedCertificateAlias) string

GetCertSecretName returns the secret name for a certificate alias if any provide, otherwise returns default certificate secret name for the given alias.

func (Memcached) GetMemcachedAuthSecretName added in v0.49.0

func (m Memcached) GetMemcachedAuthSecretName() string

func (Memcached) GoverningServiceName

func (m Memcached) GoverningServiceName() string

func (*Memcached) Hub

func (*Memcached) Hub()

func (Memcached) OffshootLabels

func (m Memcached) OffshootLabels() map[string]string

func (Memcached) OffshootName

func (m Memcached) OffshootName() string

func (Memcached) OffshootSelectors

func (m Memcached) OffshootSelectors() map[string]string

func (*Memcached) Owner added in v0.49.0

func (m *Memcached) Owner() *metav1.OwnerReference

Owner returns owner reference to resources

func (Memcached) PodControllerLabels

func (m Memcached) PodControllerLabels() map[string]string

func (Memcached) PodLabels

func (m Memcached) PodLabels() map[string]string

func (*Memcached) ReplicasAreReady

func (m *Memcached) ReplicasAreReady(lister pslister.PetSetLister) (bool, string, error)

func (Memcached) ResourceFQN

func (m Memcached) ResourceFQN() string

func (Memcached) ResourceKind

func (m Memcached) ResourceKind() string

func (Memcached) ResourcePlural

func (m Memcached) ResourcePlural() string

func (Memcached) ResourceShortCode

func (m Memcached) ResourceShortCode() string

func (Memcached) ResourceSingular

func (m Memcached) ResourceSingular() string

func (Memcached) ServiceLabels

func (m Memcached) ServiceLabels(alias ServiceAlias, extraLabels ...map[string]string) map[string]string

func (Memcached) ServiceName

func (m Memcached) ServiceName() string

func (*Memcached) SetDefaults

func (m *Memcached) SetDefaults(mcVersion *catalog.MemcachedVersion)

func (*Memcached) SetHealthCheckerDefaults

func (m *Memcached) SetHealthCheckerDefaults()

func (*Memcached) SetTLSDefaults added in v0.49.0

func (m *Memcached) SetTLSDefaults()

func (Memcached) StatsService

func (m Memcached) StatsService() mona.StatsAccessor

func (Memcached) StatsServiceLabels

func (m Memcached) StatsServiceLabels() map[string]string

type MemcachedCertificateAlias

type MemcachedCertificateAlias string

+kubebuilder:validation:Enum=server;metrics-exporter

const (
	MemcachedServerCert          MemcachedCertificateAlias = "server"
	MemcachedClientCert          MemcachedCertificateAlias = "client"
	MemcachedMetricsExporterCert MemcachedCertificateAlias = "metrics-exporter"
)

type MemcachedList

type MemcachedList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	// Items is a list of Memcached TPR objects
	Items []Memcached `json:"items,omitempty"`
}

func (*MemcachedList) DeepCopy

func (in *MemcachedList) DeepCopy() *MemcachedList

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

func (*MemcachedList) DeepCopyInto

func (in *MemcachedList) DeepCopyInto(out *MemcachedList)

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

func (*MemcachedList) DeepCopyObject

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

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

type MemcachedSpec

type MemcachedSpec struct {
	// Version of Memcached to be deployed.
	Version string `json:"version"`

	// Number of instances to deploy for a Memcached database.
	Replicas *int32 `json:"replicas,omitempty"`

	// Monitor is used monitor database instance
	// +optional
	Monitor *mona.AgentSpec `json:"monitor,omitempty"`

	// ConfigSecret is an optional field to provide custom configuration file for database.
	// If specified, this file will be used as configuration file otherwise default configuration file will be used.
	ConfigSecret *core.LocalObjectReference `json:"configSecret,omitempty"`

	// Database Authentication Secret
	// If specified, this will be used for authentication otherwise default secret will be used.
	// +optional
	AuthSecret *SecretReference `json:"authSecret,omitempty"`

	// If disable Auth true then don't create any auth secret
	// +optional
	DisableAuth bool `json:"disableAuth,omitempty"`

	// DataVolume is an optional field to add one volume to each
	// memcached pod.  The volume will be made available under
	// /data and owned by the memcached user.
	//
	// While not mandated by the API and not configured
	// automatically, the intended purpose is to use that volume
	// for memcached's persistent memory support
	// (https://memcached.org/blog/persistent-memory/) by adding
	// the memory-file and memory-limit options to the config
	// (https://github.com/memcached/memcached/wiki/WarmRestart).
	//
	// For that purpose, a CSI inline volume provided by PMEM-CSI
	// can be used, in which case each pod will get its own, empty
	// volume. Warm restarts are not supported.
	//
	// For testing, an empty dir can be used instead.
	DataVolume *core.VolumeSource `json:"dataVolume,omitempty"`

	// PodTemplate is an optional configuration for pods used to expose database
	// +optional
	PodTemplate ofstv2.PodTemplateSpec `json:"podTemplate,omitempty"`

	// ServiceTemplates is an optional configuration for services used to expose database
	// +optional
	ServiceTemplates []NamedServiceTemplateSpec `json:"serviceTemplates,omitempty"`

	// TLS contains tls configurations
	// +optional
	TLS *kmapi.TLSConfig `json:"tls,omitempty"`

	// Indicates that the database is halted and all offshoot Kubernetes resources except PVCs are deleted.
	// +optional
	Halted bool `json:"halted,omitempty"`

	// DeletionPolicy controls the delete operation for database
	// +optional
	DeletionPolicy DeletionPolicy `json:"deletionPolicy,omitempty"`

	// HealthChecker defines attributes of the health checker
	// +optional
	// +kubebuilder:default={periodSeconds: 10, timeoutSeconds: 10, failureThreshold: 1}
	HealthChecker kmapi.HealthCheckSpec `json:"healthChecker"`
}

func (*MemcachedSpec) DeepCopy

func (in *MemcachedSpec) DeepCopy() *MemcachedSpec

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

func (*MemcachedSpec) DeepCopyInto

func (in *MemcachedSpec) DeepCopyInto(out *MemcachedSpec)

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

func (*MemcachedSpec) GetPersistentSecrets

func (m *MemcachedSpec) GetPersistentSecrets() []string

type MemcachedStatus

type MemcachedStatus struct {
	// Specifies the current phase of the database
	// +optional
	Phase DatabasePhase `json:"phase,omitempty"`
	// observedGeneration is the most recent generation observed for this resource. It corresponds to the
	// resource's generation, which is updated on mutation by the API Server.
	// +optional
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`
	// Conditions applied to the database, such as approval or denial.
	// +optional
	Conditions []kmapi.Condition `json:"conditions,omitempty"`
}

func (*MemcachedStatus) DeepCopy

func (in *MemcachedStatus) DeepCopy() *MemcachedStatus

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

func (*MemcachedStatus) DeepCopyInto

func (in *MemcachedStatus) DeepCopyInto(out *MemcachedStatus)

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

type MongoArbiterNode

type MongoArbiterNode struct {
	// ConfigSecret is an optional field to provide custom configuration file for database (i.e mongod.cnf).
	// If specified, this file will be used as configuration file otherwise default configuration file will be used.
	ConfigSecret *core.LocalObjectReference `json:"configSecret,omitempty"`

	// PodTemplate is an optional configuration for pods used to expose database
	// +optional
	PodTemplate *ofstv2.PodTemplateSpec `json:"podTemplate,omitempty"`
}

func (*MongoArbiterNode) DeepCopy

func (in *MongoArbiterNode) DeepCopy() *MongoArbiterNode

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

func (*MongoArbiterNode) DeepCopyInto

func (in *MongoArbiterNode) DeepCopyInto(out *MongoArbiterNode)

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

type MongoDB

type MongoDB struct {
	metav1.TypeMeta   `json:",inline,omitempty"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	Spec              MongoDBSpec   `json:"spec,omitempty"`
	Status            MongoDBStatus `json:"status,omitempty"`
}

+kubebuilder:object:root=true +kubebuilder:resource:path=mongodbs,singular=mongodb,shortName=mg,categories={datastore,kubedb,appscode,all} +kubebuilder:subresource:status +kubebuilder:storageversion +kubebuilder:printcolumn:name="Version",type="string",JSONPath=".spec.version" +kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.phase" +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"

func (MongoDB) AppBindingMeta

func (m MongoDB) AppBindingMeta() appcat.AppBindingMeta

func (MongoDB) ArbiterLabels

func (m MongoDB) ArbiterLabels() map[string]string

func (MongoDB) ArbiterNodeName

func (m MongoDB) ArbiterNodeName() string

func (MongoDB) ArbiterSelectors

func (m MongoDB) ArbiterSelectors() map[string]string

func (MongoDB) ArbiterShardLabels

func (m MongoDB) ArbiterShardLabels(nodeNum int32) map[string]string

func (MongoDB) ArbiterShardNodeName

func (m MongoDB) ArbiterShardNodeName(nodeNum int32) string

func (MongoDB) ArbiterShardSelectors

func (m MongoDB) ArbiterShardSelectors(nodeNum int32) map[string]string

func (*MongoDB) AsOwner

func (m *MongoDB) AsOwner() *metav1.OwnerReference

func (*MongoDB) CertificateName

func (m *MongoDB) CertificateName(alias MongoDBCertificateAlias, psName string) string

CertificateName returns the default certificate name and/or certificate secret name for a certificate alias

func (*MongoDB) ConfigSecretName

func (m *MongoDB) ConfigSecretName(nodeType string) string

ConfigSecretName returns the secret name for different nodetype

func (MongoDB) ConfigSvrDSN

func (m MongoDB) ConfigSvrDSN() string

ConfigSvrDSN = <configSvrReplName>/<host1:port>,<host2:port>,<host3:port> Here, host1 = <pod-name>.<governing-serviceName>.svc

func (MongoDB) ConfigSvrHosts

func (m MongoDB) ConfigSvrHosts() []string

func (MongoDB) ConfigSvrLabels

func (m MongoDB) ConfigSvrLabels() map[string]string

func (MongoDB) ConfigSvrNodeName

func (m MongoDB) ConfigSvrNodeName() string

func (MongoDB) ConfigSvrRepSetName

func (m MongoDB) ConfigSvrRepSetName() string

func (MongoDB) ConfigSvrSelectors

func (m MongoDB) ConfigSvrSelectors() map[string]string

func (MongoDB) CustomResourceDefinition

func (_ MongoDB) CustomResourceDefinition() *apiextensions.CustomResourceDefinition

func (*MongoDB) DeepCopy

func (in *MongoDB) DeepCopy() *MongoDB

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

func (*MongoDB) DeepCopyInto

func (in *MongoDB) DeepCopyInto(out *MongoDB)

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

func (*MongoDB) DeepCopyObject

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

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

func (MongoDB) GetAuthSecretName

func (m MongoDB) GetAuthSecretName() string

func (*MongoDB) GetCertSecretName

func (m *MongoDB) GetCertSecretName(alias MongoDBCertificateAlias, psName string) string

GetCertSecretName returns the secret name for a certificate alias

func (MongoDB) GetCorrespondingArbiterStsName

func (m MongoDB) GetCorrespondingArbiterStsName(replStsName string) string

func (MongoDB) GetCorrespondingHiddenStsName

func (m MongoDB) GetCorrespondingHiddenStsName(replStsName string) string

func (MongoDB) GetCorrespondingReplicaStsName

func (m MongoDB) GetCorrespondingReplicaStsName(arbStsName string) string

func (MongoDB) GetCorrespondingReplicaStsNameFromHidden

func (m MongoDB) GetCorrespondingReplicaStsNameFromHidden(hiddenStsName string) string

func (*MongoDB) GetDefaultLivenessProbeSpec

func (m *MongoDB) GetDefaultLivenessProbeSpec(mgVersion *v1alpha1.MongoDBVersion, isArbiter ...bool) *core.Probe

func (*MongoDB) GetDefaultReadinessProbeSpec

func (m *MongoDB) GetDefaultReadinessProbeSpec(mgVersion *v1alpha1.MongoDBVersion, isArbiter ...bool) *core.Probe

func (*MongoDB) GetEntryCommand

func (m *MongoDB) GetEntryCommand(mgVersion *v1alpha1.MongoDBVersion) string

func (MongoDB) GetShardNumber

func (m MongoDB) GetShardNumber(shardName string) int

func (*MongoDB) GetURL

func (m *MongoDB) GetURL(psName string) string

func (MongoDB) GoverningServiceName

func (m MongoDB) GoverningServiceName(name string) string

Governing Service Name. Here, name parameter is either OffshootName, ShardNodeName, ConfigSvrNodeName , ArbiterNodeName or HiddenNodeName

func (MongoDB) HiddenNodeLabels

func (m MongoDB) HiddenNodeLabels() map[string]string

func (MongoDB) HiddenNodeName

func (m MongoDB) HiddenNodeName() string

func (MongoDB) HiddenNodeSelectors

func (m MongoDB) HiddenNodeSelectors() map[string]string

func (MongoDB) HiddenNodeShardLabels

func (m MongoDB) HiddenNodeShardLabels(nodeNum int32) map[string]string

func (MongoDB) HiddenNodeShardSelectors

func (m MongoDB) HiddenNodeShardSelectors(nodeNum int32) map[string]string

func (MongoDB) HiddenShardNodeName

func (m MongoDB) HiddenShardNodeName(nodeNum int32) string

func (MongoDB) HostAddress

func (m MongoDB) HostAddress() string

HostAddress returns serviceName for standalone mongodb. and, for replica set = <replName>/<host1>,<host2>,<host3> Here, host1 = <pod-name>.<governing-serviceName> Governing service name is used for replica host because, we used governing service name as part of host while adding members to replicaset.

func (MongoDB) HostAddressOnlyCoreMembers

func (m MongoDB) HostAddressOnlyCoreMembers() string

func (MongoDB) Hosts

func (m MongoDB) Hosts() []string

func (MongoDB) HostsOnlyCoreMembers

func (m MongoDB) HostsOnlyCoreMembers() []string

func (*MongoDB) Hub

func (*MongoDB) Hub()

func (*MongoDB) KeyFileRequired

func (m *MongoDB) KeyFileRequired() bool

func (MongoDB) MongosHosts

func (m MongoDB) MongosHosts() []string

func (MongoDB) MongosLabels

func (m MongoDB) MongosLabels() map[string]string

func (MongoDB) MongosNodeName

func (m MongoDB) MongosNodeName() string

func (MongoDB) MongosSelectors

func (m MongoDB) MongosSelectors() map[string]string

func (MongoDB) OffshootLabels

func (m MongoDB) OffshootLabels() map[string]string

func (MongoDB) OffshootLabelsWhenOthers

func (m MongoDB) OffshootLabelsWhenOthers() map[string]string

func (MongoDB) OffshootName

func (m MongoDB) OffshootName() string

func (MongoDB) OffshootSelectors

func (m MongoDB) OffshootSelectors() map[string]string

func (MongoDB) OffshootSelectorsWhenOthers

func (m MongoDB) OffshootSelectorsWhenOthers() map[string]string

func (MongoDB) PodControllerLabels

func (m MongoDB) PodControllerLabels(podControllerLabels map[string]string, extraLabels ...map[string]string) map[string]string

func (MongoDB) PodLabels

func (m MongoDB) PodLabels(podTemplateLabels map[string]string, extraLabels ...map[string]string) map[string]string

func (MongoDB) RepSetName

func (m MongoDB) RepSetName() string

RepSetName returns Replicaset name only for spec.replicaset

func (*MongoDB) ReplicasAreReady

func (m *MongoDB) ReplicasAreReady(lister pslister.PetSetLister) (bool, string, error)

func (MongoDB) ResourceFQN

func (m MongoDB) ResourceFQN() string

func (MongoDB) ResourceKind

func (m MongoDB) ResourceKind() string

func (MongoDB) ResourcePlural

func (m MongoDB) ResourcePlural() string

func (MongoDB) ResourceShortCode

func (m MongoDB) ResourceShortCode() string

func (MongoDB) ResourceSingular

func (m MongoDB) ResourceSingular() string

func (MongoDB) ServiceLabels

func (m MongoDB) ServiceLabels(alias ServiceAlias, extraLabels ...map[string]string) map[string]string

func (MongoDB) ServiceName

func (m MongoDB) ServiceName() string

func (*MongoDB) SetDefaults

func (m *MongoDB) SetDefaults(mgVersion *v1alpha1.MongoDBVersion)

func (*MongoDB) SetHealthCheckerDefaults

func (m *MongoDB) SetHealthCheckerDefaults()

func (*MongoDB) SetTLSDefaults

func (m *MongoDB) SetTLSDefaults()

func (MongoDB) ShardCommonNodeName

func (m MongoDB) ShardCommonNodeName() string

func (MongoDB) ShardDSN

func (m MongoDB) ShardDSN(nodeNum int32) string

ShardDSN = <shardReplName>/<host1:port>,<host2:port>,<host3:port> Here, host1 = <pod-name>.<governing-serviceName>.svc

func (MongoDB) ShardDSNOnlyCoreMembers

func (m MongoDB) ShardDSNOnlyCoreMembers(nodeNum int32) string

func (MongoDB) ShardHosts

func (m MongoDB) ShardHosts(nodeNum int32) []string

func (MongoDB) ShardHostsOnlyCoreMembers

func (m MongoDB) ShardHostsOnlyCoreMembers(nodeNum int32) []string

func (MongoDB) ShardLabels

func (m MongoDB) ShardLabels(nodeNum int32) map[string]string

func (MongoDB) ShardLabelsWhenOthers

func (m MongoDB) ShardLabelsWhenOthers(nodeNum int32) map[string]string

func (MongoDB) ShardNodeName

func (m MongoDB) ShardNodeName(nodeNum int32) string

func (MongoDB) ShardNodeTemplate

func (m MongoDB) ShardNodeTemplate() string

func (MongoDB) ShardRepSetName

func (m MongoDB) ShardRepSetName(nodeNum int32) string

func (MongoDB) ShardSelectors

func (m MongoDB) ShardSelectors(nodeNum int32) map[string]string

func (MongoDB) ShardSelectorsWhenOthers

func (m MongoDB) ShardSelectorsWhenOthers(nodeNum int32) map[string]string

func (MongoDB) StatsService

func (m MongoDB) StatsService() mona.StatsAccessor

func (MongoDB) StatsServiceLabels

func (m MongoDB) StatsServiceLabels() map[string]string

type MongoDBCertificateAlias

type MongoDBCertificateAlias string

+kubebuilder:validation:Enum=server;client;metrics-exporter

const (
	MongoDBServerCert          MongoDBCertificateAlias = "server"
	MongoDBClientCert          MongoDBCertificateAlias = "client"
	MongoDBMetricsExporterCert MongoDBCertificateAlias = "metrics-exporter"
)

type MongoDBConfigNode

type MongoDBConfigNode struct {
	// MongoDB config server node configs
	MongoDBNode `json:",inline"`

	// Storage to specify how storage shall be used.
	Storage *core.PersistentVolumeClaimSpec `json:"storage,omitempty"`

	// EphemeralStorage spec to specify the configuration of ephemeral storage type.
	EphemeralStorage *core.EmptyDirVolumeSource `json:"ephemeralStorage,omitempty"`
}

func (*MongoDBConfigNode) DeepCopy

func (in *MongoDBConfigNode) DeepCopy() *MongoDBConfigNode

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

func (*MongoDBConfigNode) DeepCopyInto

func (in *MongoDBConfigNode) DeepCopyInto(out *MongoDBConfigNode)

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

type MongoDBList

type MongoDBList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	// Items is a list of MongoDB TPR objects
	Items []MongoDB `json:"items,omitempty"`
}

func (*MongoDBList) DeepCopy

func (in *MongoDBList) DeepCopy() *MongoDBList

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

func (*MongoDBList) DeepCopyInto

func (in *MongoDBList) DeepCopyInto(out *MongoDBList)

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

func (*MongoDBList) DeepCopyObject

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

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

type MongoDBMongosNode

type MongoDBMongosNode struct {
	// MongoDB mongos node configs
	MongoDBNode `json:",inline"`
}

func (*MongoDBMongosNode) DeepCopy

func (in *MongoDBMongosNode) DeepCopy() *MongoDBMongosNode

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

func (*MongoDBMongosNode) DeepCopyInto

func (in *MongoDBMongosNode) DeepCopyInto(out *MongoDBMongosNode)

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

type MongoDBNode

type MongoDBNode struct {
	// Replicas represents number of replicas of this specific node.
	// If current node has replicaset enabled, then replicas is the amount of replicaset nodes.
	Replicas int32 `json:"replicas"`

	// Prefix is the name prefix of this node.
	Prefix string `json:"prefix,omitempty"`

	// ConfigSecret is an optional field to provide custom configuration file for database (i.e mongod.cnf).
	// If specified, this file will be used as configuration file otherwise default configuration file will be used.
	ConfigSecret *core.LocalObjectReference `json:"configSecret,omitempty"`

	// PodTemplate is an optional configuration for pods used to expose database
	// +optional
	PodTemplate *ofstv2.PodTemplateSpec `json:"podTemplate,omitempty"`
}

func (*MongoDBNode) DeepCopy

func (in *MongoDBNode) DeepCopy() *MongoDBNode

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

func (*MongoDBNode) DeepCopyInto

func (in *MongoDBNode) DeepCopyInto(out *MongoDBNode)

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

type MongoDBReplicaSet

type MongoDBReplicaSet struct {
	// Name of replicaset
	Name string `json:"name"`
}

func (*MongoDBReplicaSet) DeepCopy

func (in *MongoDBReplicaSet) DeepCopy() *MongoDBReplicaSet

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

func (*MongoDBReplicaSet) DeepCopyInto

func (in *MongoDBReplicaSet) DeepCopyInto(out *MongoDBReplicaSet)

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

type MongoDBShardNode

type MongoDBShardNode struct {
	// Shards represents number of shards for shard type of node
	// More info: https://docs.mongodb.com/manual/core/sharded-cluster-shards/
	Shards int32 `json:"shards"`

	// MongoDB sharding node configs
	MongoDBNode `json:",inline"`

	// Storage to specify how storage shall be used.
	Storage *core.PersistentVolumeClaimSpec `json:"storage,omitempty"`

	// EphemeralStorage spec to specify the configuration of ephemeral storage type.
	EphemeralStorage *core.EmptyDirVolumeSource `json:"ephemeralStorage,omitempty"`
}

func (*MongoDBShardNode) DeepCopy

func (in *MongoDBShardNode) DeepCopy() *MongoDBShardNode

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

func (*MongoDBShardNode) DeepCopyInto

func (in *MongoDBShardNode) DeepCopyInto(out *MongoDBShardNode)

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

type MongoDBShardingTopology

type MongoDBShardingTopology struct {
	// Shard component of mongodb.
	// More info: https://docs.mongodb.com/manual/core/sharded-cluster-shards/
	Shard MongoDBShardNode `json:"shard"`

	// Config Server (metadata) component of mongodb.
	// More info: https://docs.mongodb.com/manual/core/sharded-cluster-config-servers/
	ConfigServer MongoDBConfigNode `json:"configServer"`

	// Mongos (router) component of mongodb.
	// More info: https://docs.mongodb.com/manual/core/sharded-cluster-query-router/
	Mongos MongoDBMongosNode `json:"mongos"`
}

func (*MongoDBShardingTopology) DeepCopy

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

func (*MongoDBShardingTopology) DeepCopyInto

func (in *MongoDBShardingTopology) DeepCopyInto(out *MongoDBShardingTopology)

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

type MongoDBSpec

type MongoDBSpec struct {
	// AutoOps contains configuration of automatic ops-request-recommendation generation
	// +optional
	AutoOps AutoOpsSpec `json:"autoOps,omitempty"`

	// Version of MongoDB to be deployed.
	Version string `json:"version"`

	// Number of instances to deploy for a MongoDB database.
	Replicas *int32 `json:"replicas,omitempty"`

	// MongoDB replica set
	ReplicaSet *MongoDBReplicaSet `json:"replicaSet,omitempty"`

	// MongoDB sharding topology.
	ShardTopology *MongoDBShardingTopology `json:"shardTopology,omitempty"`

	// StorageType can be durable (default) or ephemeral
	StorageType StorageType `json:"storageType,omitempty"`

	// Storage spec to specify how storage shall be used.
	Storage *core.PersistentVolumeClaimSpec `json:"storage,omitempty"`

	// EphemeralStorage spec to specify the configuration of ephemeral storage type.
	EphemeralStorage *core.EmptyDirVolumeSource `json:"ephemeralStorage,omitempty"`

	// Database authentication secret
	// +optional
	AuthSecret *SecretReference `json:"authSecret,omitempty"`

	// ClusterAuthMode for replicaset or sharding. (default will be x509 if sslmode is not `disabled`.)
	// See available ClusterAuthMode: https://docs.mongodb.com/manual/reference/program/mongod/#cmdoption-mongod-clusterauthmode
	ClusterAuthMode ClusterAuthMode `json:"clusterAuthMode,omitempty"`

	// SSLMode for both standalone and clusters. (default, disabled.)
	// See more options: https://docs.mongodb.com/manual/reference/program/mongod/#cmdoption-mongod-sslmode
	SSLMode SSLMode `json:"sslMode,omitempty"`

	// Init is used to initialize database
	// +optional
	Init *InitSpec `json:"init,omitempty"`

	// Monitor is used monitor database instance
	// +optional
	Monitor *mona.AgentSpec `json:"monitor,omitempty"`

	// ConfigSecret is an optional field to provide custom configuration file for database (i.e mongod.cnf).
	// If specified, this file will be used as configuration file otherwise default configuration file will be used.
	ConfigSecret *core.LocalObjectReference `json:"configSecret,omitempty"`

	// PodTemplate is an optional configuration for pods used to expose database
	// +optional
	PodTemplate *ofstv2.PodTemplateSpec `json:"podTemplate,omitempty"`

	// ServiceTemplates is an optional configuration for services used to expose database
	// +optional
	ServiceTemplates []NamedServiceTemplateSpec `json:"serviceTemplates,omitempty"`

	// TLS contains tls configurations for client and server.
	// +optional
	TLS *kmapi.TLSConfig `json:"tls,omitempty"`

	// Secret for KeyFileSecret. Contains keyfile `key.txt` if spec.clusterAuthMode == keyFile || sendKeyFile
	KeyFileSecret *core.LocalObjectReference `json:"keyFileSecret,omitempty"`

	// Indicates that the database is halted and all offshoot Kubernetes resources except PVCs are deleted.
	// +optional
	Halted bool `json:"halted,omitempty"`

	// DeletionPolicy controls the delete operation for database
	// +optional
	DeletionPolicy DeletionPolicy `json:"deletionPolicy,omitempty"`

	// StorageEngine can be wiredTiger (default) or inMemory
	// See available StorageEngine: https://docs.mongodb.com/manual/core/storage-engines/
	StorageEngine StorageEngine `json:"storageEngine,omitempty"`

	// AllowedSchemas defines the types of database schemas that MAY refer to
	// a database instance and the trusted namespaces where those schema resources MAY be
	// present.
	//
	// +kubebuilder:default={namespaces:{from: Same}}
	// +optional
	AllowedSchemas *AllowedConsumers `json:"allowedSchemas,omitempty"`

	// Mongo Arbiter component of mongodb.
	// More info: https://docs.mongodb.com/manual/core/replica-set-arbiter/
	// +optional
	// +nullable
	Arbiter *MongoArbiterNode `json:"arbiter,omitempty"`

	// Hidden component of mongodb which is invisible to client applications
	// More info: https://www.mongodb.com/docs/manual/core/replica-set-hidden-member/
	// +optional
	// +nullable
	Hidden *MongoHiddenNode `json:"hidden,omitempty"`

	// HealthChecker defines attributes of the health checker
	// +optional
	// +kubebuilder:default={periodSeconds: 10, timeoutSeconds: 10, failureThreshold: 1}
	HealthChecker kmapi.HealthCheckSpec `json:"healthChecker"`

	// Archiver controls database backup using Archiver CR
	// +optional
	Archiver *Archiver `json:"archiver,omitempty"`
}

func (*MongoDBSpec) DeepCopy

func (in *MongoDBSpec) DeepCopy() *MongoDBSpec

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

func (*MongoDBSpec) DeepCopyInto

func (in *MongoDBSpec) DeepCopyInto(out *MongoDBSpec)

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

func (*MongoDBSpec) GetPersistentSecrets

func (m *MongoDBSpec) GetPersistentSecrets() []string

type MongoDBStatus

type MongoDBStatus struct {
	// Specifies the current phase of the database
	// +optional
	Phase DatabasePhase `json:"phase,omitempty"`
	// observedGeneration is the most recent generation observed for this resource. It corresponds to the
	// resource's generation, which is updated on mutation by the API Server.
	// +optional
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`
	// Conditions applied to the database, such as approval or denial.
	// +optional
	Conditions []kmapi.Condition `json:"conditions,omitempty"`
	// +optional
	AuthSecret *Age `json:"authSecret,omitempty"`
}

func (*MongoDBStatus) DeepCopy

func (in *MongoDBStatus) DeepCopy() *MongoDBStatus

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

func (*MongoDBStatus) DeepCopyInto

func (in *MongoDBStatus) DeepCopyInto(out *MongoDBStatus)

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

type MongoHiddenNode

type MongoHiddenNode struct {
	// ConfigSecret is an optional field to provide custom configuration file for database (i.e mongod.cnf).
	// If specified, this file will be used as configuration file otherwise default configuration file will be used.
	ConfigSecret *core.LocalObjectReference `json:"configSecret,omitempty"`

	// PodTemplate is an optional configuration for pods used to expose database
	// +optional
	PodTemplate *ofstv2.PodTemplateSpec `json:"podTemplate,omitempty"`

	// Replicas represents number of replicas of this specific node.
	// If current node has replicaset enabled, then replicas is the amount of replicaset nodes.
	Replicas int32 `json:"replicas"`

	// Storage to specify how storage shall be used.
	Storage core.PersistentVolumeClaimSpec `json:"storage"`
}

func (*MongoHiddenNode) DeepCopy

func (in *MongoHiddenNode) DeepCopy() *MongoHiddenNode

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

func (*MongoHiddenNode) DeepCopyInto

func (in *MongoHiddenNode) DeepCopyInto(out *MongoHiddenNode)

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

type MongoShellScriptName

type MongoShellScriptName string
const (
	ScriptNameCommon     MongoShellScriptName = "common.sh"
	ScriptNameInstall    MongoShellScriptName = "install.sh"
	ScriptNameMongos     MongoShellScriptName = "mongos.sh"
	ScriptNameShard      MongoShellScriptName = "sharding.sh"
	ScriptNameConfig     MongoShellScriptName = "configdb.sh"
	ScriptNameReplicaset MongoShellScriptName = "replicaset.sh"
	ScriptNameArbiter    MongoShellScriptName = "arbiter.sh"
	ScriptNameHidden     MongoShellScriptName = "hidden.sh"
)

type MySQL

type MySQL struct {
	metav1.TypeMeta   `json:",inline,omitempty"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	Spec              MySQLSpec   `json:"spec,omitempty"`
	Status            MySQLStatus `json:"status,omitempty"`
}

+kubebuilder:object:root=true +kubebuilder:resource:path=mysqls,singular=mysql,shortName=my,categories={datastore,kubedb,appscode,all} +kubebuilder:subresource:status +kubebuilder:storageversion +kubebuilder:printcolumn:name="Version",type="string",JSONPath=".spec.version" +kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.phase" +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"

func (MySQL) AppBindingMeta

func (m MySQL) AppBindingMeta() appcat.AppBindingMeta

func (*MySQL) AsOwner

func (m *MySQL) AsOwner() *metav1.OwnerReference

func (*MySQL) CertificateName

func (m *MySQL) CertificateName(alias MySQLCertificateAlias) string

CertificateName returns the default certificate name and/or certificate secret name for a certificate alias

func (MySQL) CustomResourceDefinition

func (_ MySQL) CustomResourceDefinition() *apiextensions.CustomResourceDefinition

func (*MySQL) DeepCopy

func (in *MySQL) DeepCopy() *MySQL

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

func (*MySQL) DeepCopyInto

func (in *MySQL) DeepCopyInto(out *MySQL)

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

func (*MySQL) DeepCopyObject

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

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

func (MySQL) GetAuthSecretName

func (m MySQL) GetAuthSecretName() string

func (*MySQL) GetCertSecretName

func (m *MySQL) GetCertSecretName(alias MySQLCertificateAlias) string

GetCertSecretName returns the secret name for a certificate alias if any otherwise returns default certificate secret name for the given alias.

func (MySQL) GetNameSpacedName

func (m MySQL) GetNameSpacedName() string

func (*MySQL) GetRouterName

func (m *MySQL) GetRouterName() string

func (MySQL) GoverningServiceName

func (m MySQL) GoverningServiceName() string

func (MySQL) Hosts

func (m MySQL) Hosts() []string

func (*MySQL) Hub

func (*MySQL) Hub()

func (*MySQL) IsInnoDBCluster

func (m *MySQL) IsInnoDBCluster() bool

func (*MySQL) IsRemoteReplica

func (m *MySQL) IsRemoteReplica() bool

func (*MySQL) IsSemiSync

func (m *MySQL) IsSemiSync() bool

func (*MySQL) MySQLTLSArgs

func (m *MySQL) MySQLTLSArgs() []string

func (MySQL) OffshootLabels

func (m MySQL) OffshootLabels() map[string]string

func (MySQL) OffshootName

func (m MySQL) OffshootName() string

func (MySQL) OffshootSelectors

func (m MySQL) OffshootSelectors() map[string]string

func (MySQL) PeerName

func (m MySQL) PeerName(idx int) string

func (MySQL) PodControllerLabels

func (m MySQL) PodControllerLabels() map[string]string

func (MySQL) PodLabels

func (m MySQL) PodLabels() map[string]string

func (MySQL) PrimaryServiceDNS

func (m MySQL) PrimaryServiceDNS() string

func (*MySQL) ReplicasAreReady

func (m *MySQL) ReplicasAreReady(lister pslister.PetSetLister) (bool, string, error)

func (MySQL) ResourceFQN

func (m MySQL) ResourceFQN() string

func (MySQL) ResourceKind

func (m MySQL) ResourceKind() string

func (MySQL) ResourcePlural

func (m MySQL) ResourcePlural() string

func (MySQL) ResourceShortCode

func (m MySQL) ResourceShortCode() string

func (MySQL) ResourceSingular

func (m MySQL) ResourceSingular() string

func (MySQL) RouterOffshootLabels

func (m MySQL) RouterOffshootLabels() map[string]string

func (MySQL) RouterOffshootSelectors

func (m MySQL) RouterOffshootSelectors() map[string]string

func (MySQL) RouterPodControllerLabels

func (m MySQL) RouterPodControllerLabels() map[string]string

func (MySQL) RouterPodLabels

func (m MySQL) RouterPodLabels() map[string]string

func (MySQL) ServiceLabels

func (m MySQL) ServiceLabels(alias ServiceAlias, extraLabels ...map[string]string) map[string]string

func (MySQL) ServiceName

func (m MySQL) ServiceName() string

func (*MySQL) SetDefaults

func (m *MySQL) SetDefaults(myVersion *v1alpha1.MySQLVersion)

func (*MySQL) SetHealthCheckerDefaults

func (m *MySQL) SetHealthCheckerDefaults()

func (*MySQL) SetTLSDefaults

func (m *MySQL) SetTLSDefaults()

func (MySQL) StandbyServiceDNS

func (m MySQL) StandbyServiceDNS() string

func (MySQL) StandbyServiceName

func (m MySQL) StandbyServiceName() string

func (MySQL) StatsService

func (m MySQL) StatsService() mona.StatsAccessor

func (MySQL) StatsServiceLabels

func (m MySQL) StatsServiceLabels() map[string]string

func (*MySQL) UsesGroupReplication

func (m *MySQL) UsesGroupReplication() bool

type MySQLCertificateAlias

type MySQLCertificateAlias string

+kubebuilder:validation:Enum=server;client;metrics-exporter

const (
	MySQLServerCert          MySQLCertificateAlias = "server"
	MySQLClientCert          MySQLCertificateAlias = "client"
	MySQLMetricsExporterCert MySQLCertificateAlias = "metrics-exporter"
	MySQLRouterCert          MySQLCertificateAlias = "router"
)

type MySQLGroupMode

type MySQLGroupMode string

+kubebuilder:validation:Enum=Single-Primary;Multi-Primary

const (
	MySQLGroupModeSinglePrimary MySQLGroupMode = "Single-Primary"
	MySQLGroupModeMultiPrimary  MySQLGroupMode = "Multi-Primary"
)

type MySQLGroupSpec

type MySQLGroupSpec struct {
	// TODO: "Multi-Primary" needs to be implemented
	// Group Replication can be deployed in either "Single-Primary" or "Multi-Primary" mode
	// +kubebuilder:default=Single-Primary
	Mode *MySQLGroupMode `json:"mode,omitempty"`

	// Group name is a version 4 UUID
	// ref: https://dev.mysql.com/doc/refman/5.7/en/group-replication-options.html#sysvar_group_replication_group_name
	Name string `json:"name,omitempty"`
}

func (*MySQLGroupSpec) DeepCopy

func (in *MySQLGroupSpec) DeepCopy() *MySQLGroupSpec

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

func (*MySQLGroupSpec) DeepCopyInto

func (in *MySQLGroupSpec) DeepCopyInto(out *MySQLGroupSpec)

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

type MySQLInnoDBClusterSpec

type MySQLInnoDBClusterSpec struct {
	// +kubebuilder:default=Single-Primary
	// +optional
	Mode *MySQLGroupMode `json:"mode,omitempty"`

	Router MySQLRouterSpec `json:"router,omitempty"`
}

func (*MySQLInnoDBClusterSpec) DeepCopy

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

func (*MySQLInnoDBClusterSpec) DeepCopyInto

func (in *MySQLInnoDBClusterSpec) DeepCopyInto(out *MySQLInnoDBClusterSpec)

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

type MySQLList

type MySQLList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	// Items is a list of MySQL TPR objects
	Items []MySQL `json:"items,omitempty"`
}

func (*MySQLList) DeepCopy

func (in *MySQLList) DeepCopy() *MySQLList

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

func (*MySQLList) DeepCopyInto

func (in *MySQLList) DeepCopyInto(out *MySQLList)

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

func (*MySQLList) DeepCopyObject

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

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

type MySQLMode

type MySQLMode string

+kubebuilder:validation:Enum=GroupReplication;InnoDBCluster;RemoteReplica;SemiSync

const (
	MySQLModeGroupReplication MySQLMode = "GroupReplication"
	MySQLModeInnoDBCluster    MySQLMode = "InnoDBCluster"
	MySQLModeRemoteReplica    MySQLMode = "RemoteReplica"
	MySQLModeSemiSync         MySQLMode = "SemiSync"
)

type MySQLRouterSpec

type MySQLRouterSpec struct {
	// +optional
	// +kubebuilder:default=1
	// +kubebuilder:validation:Minimum:=1
	Replicas *int32 `json:"replicas,omitempty"`

	// PodTemplate is an optional configuration for pods used to expose MySQL router
	// +optional
	PodTemplate *ofstv2.PodTemplateSpec `json:"podTemplate,omitempty"`
}

func (*MySQLRouterSpec) DeepCopy

func (in *MySQLRouterSpec) DeepCopy() *MySQLRouterSpec

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

func (*MySQLRouterSpec) DeepCopyInto

func (in *MySQLRouterSpec) DeepCopyInto(out *MySQLRouterSpec)

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

type MySQLSpec

type MySQLSpec struct {
	// AutoOps contains configuration of automatic ops-request-recommendation generation
	// +optional
	AutoOps AutoOpsSpec `json:"autoOps,omitempty"`

	// Version of MySQL to be deployed.
	Version string `json:"version"`

	// Number of instances to deploy for a MySQL database. In case of MySQL group
	// replication, max allowed value is 9 (default 3).
	// (see ref: https://dev.mysql.com/doc/refman/5.7/en/group-replication-frequently-asked-questions.html)
	Replicas *int32 `json:"replicas,omitempty"`

	// MySQL cluster topology
	Topology *MySQLTopology `json:"topology,omitempty"`

	// StorageType can be durable (default) or ephemeral
	StorageType StorageType `json:"storageType,omitempty"`

	// Storage spec to specify how storage shall be used.
	Storage *core.PersistentVolumeClaimSpec `json:"storage,omitempty"`

	// Database authentication secret
	// +optional
	AuthSecret *SecretReference `json:"authSecret,omitempty"`

	// Init is used to initialize database
	// +optional
	Init *InitSpec `json:"init,omitempty"`

	// Monitor is used monitor database instance
	// +optional
	Monitor *mona.AgentSpec `json:"monitor,omitempty"`

	// ConfigSecret is an optional field to provide custom configuration file for database (i.e custom-mysql.cnf).
	// If specified, this file will be used as configuration file otherwise default configuration file will be used.
	ConfigSecret *core.LocalObjectReference `json:"configSecret,omitempty"`

	// PodTemplate is an optional configuration for pods used to expose database
	// +optional
	PodTemplate ofstv2.PodTemplateSpec `json:"podTemplate,omitempty"`

	// ServiceTemplates is an optional configuration for services used to expose database
	// +optional
	ServiceTemplates []NamedServiceTemplateSpec `json:"serviceTemplates,omitempty"`

	// Indicates that the database server need to be encrypted connections(ssl)
	// +optional
	RequireSSL bool `json:"requireSSL,omitempty"`

	// TLS contains tls configurations for client and server.
	// +optional
	TLS *kmapi.TLSConfig `json:"tls,omitempty"`

	// Indicates that the database is halted and all offshoot Kubernetes resources except PVCs are deleted.
	// +optional
	Halted bool `json:"halted,omitempty"`

	// DeletionPolicy controls the delete operation for database
	// +optional
	DeletionPolicy DeletionPolicy `json:"deletionPolicy,omitempty"`

	// Indicated whether to use DNS or IP address to address pods in a db cluster.
	// If IP address is used, HostNetwork will be used. Defaults to DNS.
	// +kubebuilder:default=DNS
	// +optional
	// +default="DNS"
	UseAddressType AddressType `json:"useAddressType,omitempty"`

	// AllowedSchemas defines the types of database schemas that may refer to
	// a database instance and the trusted namespaces where those schema resources may be
	// present.
	//
	// +kubebuilder:default={namespaces:{from: Same}}
	// +optional
	AllowedSchemas *AllowedConsumers `json:"allowedSchemas,omitempty"`

	// AllowedReadReplicas defines the types of read replicas that MAY be attached to a
	// MySQL instance and the trusted namespaces where those Read Replica resources MAY be
	// present.
	//
	// Support: Core
	// +kubebuilder:default={namespaces:{from: Same}}
	// +optional
	AllowedReadReplicas *AllowedConsumers `json:"allowedReadReplicas,omitempty"`

	// HealthChecker defines attributes of the health checker
	// +optional
	// +kubebuilder:default={periodSeconds: 10, timeoutSeconds: 10, failureThreshold: 1}
	HealthChecker kmapi.HealthCheckSpec `json:"healthChecker"`

	// Archiver controls database backup using Archiver CR
	// +optional
	Archiver *Archiver `json:"archiver,omitempty"`
}

func (*MySQLSpec) DeepCopy

func (in *MySQLSpec) DeepCopy() *MySQLSpec

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

func (*MySQLSpec) DeepCopyInto

func (in *MySQLSpec) DeepCopyInto(out *MySQLSpec)

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

func (*MySQLSpec) GetPersistentSecrets

func (m *MySQLSpec) GetPersistentSecrets() []string

type MySQLStatus

type MySQLStatus struct {
	// Specifies the current phase of the database
	// +optional
	Phase DatabasePhase `json:"phase,omitempty"`
	// observedGeneration is the most recent generation observed for this resource. It corresponds to the
	// resource's generation, which is updated on mutation by the API Server.
	// +optional
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`
	// Conditions applied to the database, such as approval or denial.
	// +optional
	Conditions []kmapi.Condition `json:"conditions,omitempty"`
	// +optional
	AuthSecret *Age `json:"authSecret,omitempty"`
}

func (*MySQLStatus) DeepCopy

func (in *MySQLStatus) DeepCopy() *MySQLStatus

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

func (*MySQLStatus) DeepCopyInto

func (in *MySQLStatus) DeepCopyInto(out *MySQLStatus)

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

type MySQLTopology

type MySQLTopology struct {
	// If set to -
	// "GroupReplication", GroupSpec is required and MySQL servers will start  a replication group
	Mode *MySQLMode `json:"mode,omitempty"`

	// Group replication info for MySQL
	// +optional
	Group *MySQLGroupSpec `json:"group,omitempty"`

	// InnoDBCluster replication info for MySQL InnodbCluster
	// +optional
	InnoDBCluster *MySQLInnoDBClusterSpec `json:"innoDBCluster,omitempty"`

	// RemoteReplica implies that the instance will be a MySQL Read Only Replica
	// and it will take reference of  appbinding of the source
	// +optional
	RemoteReplica *RemoteReplicaSpec `json:"remoteReplica,omitempty"`
	// +optional
	SemiSync *SemiSyncSpec `json:"semiSync,omitempty"`
}

func (*MySQLTopology) DeepCopy

func (in *MySQLTopology) DeepCopy() *MySQLTopology

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

func (*MySQLTopology) DeepCopyInto

func (in *MySQLTopology) DeepCopyInto(out *MySQLTopology)

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

type MySQLUser

type MySQLUser struct {
	Username string `json:"username"`

	// +optional
	Active *int `json:"active,omitempty"`

	// +optional
	UseSSL int `json:"use_ssl,omitempty"`

	// +optional
	DefaultHostgroup int `json:"default_hostgroup,omitempty"`

	// +optional
	DefaultSchema string `json:"default_schema,omitempty"`

	// +optional
	SchemaLocked int `json:"schema_locked,omitempty"`

	// +optional
	TransactionPersistent *int `json:"transaction_persistent,omitempty"`

	// +optional
	FastForward int `json:"fast_forward,omitempty"`

	// +optional
	Backend *int `json:"backend,omitempty"`

	// +optional
	Frontend *int `json:"frontend,omitempty"`

	// +optional
	MaxConnections *int32 `json:"max_connections,omitempty"`

	// +optional
	Attributes string `json:"attributes,omitempty"`

	// +optional
	Comment string `json:"comment,omitempty"`
}

func (*MySQLUser) DeepCopy

func (in *MySQLUser) DeepCopy() *MySQLUser

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

func (*MySQLUser) DeepCopyInto

func (in *MySQLUser) DeepCopyInto(out *MySQLUser)

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

type NamedServiceTemplateSpec

type NamedServiceTemplateSpec struct {
	// Alias represents the identifier of the service.
	Alias ServiceAlias `json:"alias"`

	// ServiceTemplate is an optional configuration for a service used to expose database
	// +optional
	ofstv1.ServiceTemplateSpec `json:",inline,omitempty"`
}

func (*NamedServiceTemplateSpec) DeepCopy

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

func (*NamedServiceTemplateSpec) DeepCopyInto

func (in *NamedServiceTemplateSpec) DeepCopyInto(out *NamedServiceTemplateSpec)

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

type PITRReplicationStrategy added in v0.49.0

type PITRReplicationStrategy string

+kubebuilder:validation:Enum=fscopy;clone;sync;none

const (
	// ReplicationStrategySync means data will be synced from primary to secondary
	ReplicationStrategySync PITRReplicationStrategy = "sync"
	// ReplicationStrategyFSCopy means data will be copied from filesystem
	ReplicationStrategyFSCopy PITRReplicationStrategy = "fscopy"
	// ReplicationStrategyClone means volumeSnapshot will be used to create pvc's
	ReplicationStrategyClone PITRReplicationStrategy = "clone"
	// ReplicationStrategyNone means no replication will be used
	// data will be fully restored in every replicas instead of replication
	ReplicationStrategyNone PITRReplicationStrategy = "none"
)

type PerconaXtraDB

type PerconaXtraDB struct {
	metav1.TypeMeta   `json:",inline,omitempty"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	Spec              PerconaXtraDBSpec   `json:"spec,omitempty"`
	Status            PerconaXtraDBStatus `json:"status,omitempty"`
}

+kubebuilder:object:root=true +kubebuilder:resource:path=perconaxtradbs,singular=perconaxtradb,shortName=px,categories={datastore,kubedb,appscode,all} +kubebuilder:subresource:status +kubebuilder:storageversion +kubebuilder:printcolumn:name="Version",type="string",JSONPath=".spec.version" +kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.phase" +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"

func (PerconaXtraDB) AppBindingMeta

func (p PerconaXtraDB) AppBindingMeta() appcat.AppBindingMeta

func (*PerconaXtraDB) AsOwner

func (p *PerconaXtraDB) AsOwner() *metav1.OwnerReference

func (*PerconaXtraDB) CertFilePath

func (p *PerconaXtraDB) CertFilePath(certAlias PerconaXtraDBCertificateAlias, certFileName string) string

func (*PerconaXtraDB) CertMountPath

func (p *PerconaXtraDB) CertMountPath(alias PerconaXtraDBCertificateAlias) string

func (*PerconaXtraDB) CertificateName

func (p *PerconaXtraDB) CertificateName(alias PerconaXtraDBCertificateAlias) string

CertificateName returns the default certificate name and/or certificate secret name for a certificate alias

func (PerconaXtraDB) ClusterName

func (p PerconaXtraDB) ClusterName() string

func (PerconaXtraDB) CustomResourceDefinition

func (_ PerconaXtraDB) CustomResourceDefinition() *apiextensions.CustomResourceDefinition

func (*PerconaXtraDB) DeepCopy

func (in *PerconaXtraDB) DeepCopy() *PerconaXtraDB

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

func (*PerconaXtraDB) DeepCopyInto

func (in *PerconaXtraDB) DeepCopyInto(out *PerconaXtraDB)

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

func (*PerconaXtraDB) DeepCopyObject

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

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

func (PerconaXtraDB) GetAuthSecretName

func (p PerconaXtraDB) GetAuthSecretName() string

func (*PerconaXtraDB) GetCertSecretName

func (p *PerconaXtraDB) GetCertSecretName(alias PerconaXtraDBCertificateAlias) string

GetCertSecretName returns the secret name for a certificate alias if any, otherwise returns default certificate secret name for the given alias.

func (PerconaXtraDB) GetMonitorSecretName

func (p PerconaXtraDB) GetMonitorSecretName() string

func (PerconaXtraDB) GetReplicationSecretName

func (p PerconaXtraDB) GetReplicationSecretName() string

func (PerconaXtraDB) GoverningServiceName

func (p PerconaXtraDB) GoverningServiceName() string

func (*PerconaXtraDB) Hub

func (*PerconaXtraDB) Hub()

func (PerconaXtraDB) OffshootLabels

func (p PerconaXtraDB) OffshootLabels() map[string]string

func (PerconaXtraDB) OffshootName

func (p PerconaXtraDB) OffshootName() string

func (PerconaXtraDB) OffshootSelectors

func (p PerconaXtraDB) OffshootSelectors() map[string]string

func (PerconaXtraDB) PeerName

func (p PerconaXtraDB) PeerName(idx int) string

func (PerconaXtraDB) PodControllerLabels

func (p PerconaXtraDB) PodControllerLabels() map[string]string

func (PerconaXtraDB) PodLabels

func (p PerconaXtraDB) PodLabels() map[string]string

func (PerconaXtraDB) PrimaryServiceDNS

func (p PerconaXtraDB) PrimaryServiceDNS() string

func (*PerconaXtraDB) ReplicasAreReady

func (p *PerconaXtraDB) ReplicasAreReady(lister pslister.PetSetLister) (bool, string, error)

func (PerconaXtraDB) ResourceFQN

func (p PerconaXtraDB) ResourceFQN() string

func (PerconaXtraDB) ResourceKind

func (p PerconaXtraDB) ResourceKind() string

func (PerconaXtraDB) ResourcePlural

func (p PerconaXtraDB) ResourcePlural() string

func (PerconaXtraDB) ResourceShortCode

func (p PerconaXtraDB) ResourceShortCode() string

func (PerconaXtraDB) ResourceSingular

func (p PerconaXtraDB) ResourceSingular() string

func (PerconaXtraDB) ServiceLabels

func (p PerconaXtraDB) ServiceLabels(alias ServiceAlias, extraLabels ...map[string]string) map[string]string

func (PerconaXtraDB) ServiceName

func (p PerconaXtraDB) ServiceName() string

func (*PerconaXtraDB) SetDefaults

func (p *PerconaXtraDB) SetDefaults(pVersion *v1alpha1.PerconaXtraDBVersion)

func (*PerconaXtraDB) SetHealthCheckerDefaults

func (p *PerconaXtraDB) SetHealthCheckerDefaults()

func (*PerconaXtraDB) SetTLSDefaults

func (p *PerconaXtraDB) SetTLSDefaults()

func (PerconaXtraDB) StatsService

func (p PerconaXtraDB) StatsService() mona.StatsAccessor

func (PerconaXtraDB) StatsServiceLabels

func (p PerconaXtraDB) StatsServiceLabels() map[string]string

type PerconaXtraDBCertificateAlias

type PerconaXtraDBCertificateAlias string

+kubebuilder:validation:Enum=server;client;metrics-exporter

const (
	PerconaXtraDBServerCert   PerconaXtraDBCertificateAlias = "server"
	PerconaXtraDBClientCert   PerconaXtraDBCertificateAlias = "client"
	PerconaXtraDBExporterCert PerconaXtraDBCertificateAlias = "metrics-exporter"
)

type PerconaXtraDBList

type PerconaXtraDBList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	// Items is a list of PerconaXtraDB TPR objects
	Items []PerconaXtraDB `json:"items,omitempty"`
}

func (*PerconaXtraDBList) DeepCopy

func (in *PerconaXtraDBList) DeepCopy() *PerconaXtraDBList

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

func (*PerconaXtraDBList) DeepCopyInto

func (in *PerconaXtraDBList) DeepCopyInto(out *PerconaXtraDBList)

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

func (*PerconaXtraDBList) DeepCopyObject

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

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

type PerconaXtraDBSpec

type PerconaXtraDBSpec struct {
	// AutoOps contains configuration of automatic ops-request-recommendation generation
	// +optional
	AutoOps AutoOpsSpec `json:"autoOps,omitempty"`

	// Version of PerconaXtraDB to be deployed.
	Version string `json:"version"`

	// Replicas defines the number of instances to deploy for PerconaXtraDB.
	Replicas *int32 `json:"replicas,omitempty"`

	// StorageType can be durable (default) or ephemeral
	StorageType StorageType `json:"storageType,omitempty"`

	// Storage spec to specify how storage shall be used.
	Storage *core.PersistentVolumeClaimSpec `json:"storage,omitempty"`

	// Database authentication secret
	// +optional
	AuthSecret *SecretReference `json:"authSecret,omitempty"`

	// Init is used to initialize database
	// +optional
	Init *InitSpec `json:"init,omitempty"`

	// Monitor is used monitor database instance
	// +optional
	Monitor *mona.AgentSpec `json:"monitor,omitempty"`

	// ConfigSecret is an optional field to provide custom configuration file for database (i.e custom-mysql.cnf).
	// If specified, this file will be used as configuration file otherwise default configuration file will be used.
	ConfigSecret *core.LocalObjectReference `json:"configSecret,omitempty"`

	// PodTemplate is an optional configuration for pods used to expose database
	// +optional
	PodTemplate ofstv2.PodTemplateSpec `json:"podTemplate,omitempty"`

	// ServiceTemplates is an optional configuration for services used to expose database
	// +optional
	ServiceTemplates []NamedServiceTemplateSpec `json:"serviceTemplates,omitempty"`

	// Indicates that the database server need to be encrypted connections(ssl)
	// +optional
	RequireSSL bool `json:"requireSSL,omitempty"`

	// TLS contains tls configurations
	// +optional
	TLS *kmapi.TLSConfig `json:"tls,omitempty"`

	// Indicates that the database is halted and all offshoot Kubernetes resources except PVCs are deleted.
	// +optional
	Halted bool `json:"halted,omitempty"`

	// DeletionPolicy controls the delete operation for database
	// +optional
	DeletionPolicy DeletionPolicy `json:"deletionPolicy,omitempty"`

	// AllowedSchemas defines the types of database schemas that MAY refer to
	// a database instance and the trusted namespaces where those schema resources MAY be
	// present.
	//
	// +kubebuilder:default={namespaces:{from: Same}}
	// +optional
	AllowedSchemas *AllowedConsumers `json:"allowedSchemas,omitempty"`

	// HealthChecker defines attributes of the health checker
	// +optional
	// +kubebuilder:default={periodSeconds: 10, timeoutSeconds: 10, failureThreshold: 1}
	HealthChecker kmapi.HealthCheckSpec `json:"healthChecker"`

	// SystemUserSecrets contains the system user credentials
	// +optional
	SystemUserSecrets *SystemUserSecretsSpec `json:"systemUserSecrets,omitempty"`
}

func (*PerconaXtraDBSpec) DeepCopy

func (in *PerconaXtraDBSpec) DeepCopy() *PerconaXtraDBSpec

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

func (*PerconaXtraDBSpec) DeepCopyInto

func (in *PerconaXtraDBSpec) DeepCopyInto(out *PerconaXtraDBSpec)

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

func (*PerconaXtraDBSpec) GetPersistentSecrets

func (p *PerconaXtraDBSpec) GetPersistentSecrets() []string

CertificateName returns the default certificate name and/or certificate secret name for a certificate alias

type PerconaXtraDBStatus

type PerconaXtraDBStatus struct {
	// Specifies the current phase of the database
	// +optional
	Phase DatabasePhase `json:"phase,omitempty"`
	// observedGeneration is the most recent generation observed for this resource. It corresponds to the
	// resource's generation, which is updated on mutation by the API Server.
	// +optional
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`
	// Conditions applied to the database, such as approval or denial.
	// +optional
	Conditions []kmapi.Condition `json:"conditions,omitempty"`
	// +optional
	AuthSecret *Age `json:"authSecret,omitempty"`
}

func (*PerconaXtraDBStatus) DeepCopy

func (in *PerconaXtraDBStatus) DeepCopy() *PerconaXtraDBStatus

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

func (*PerconaXtraDBStatus) DeepCopyInto

func (in *PerconaXtraDBStatus) DeepCopyInto(out *PerconaXtraDBStatus)

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

type PgBouncer

type PgBouncer struct {
	metav1.TypeMeta   `json:",inline,omitempty"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	Spec              PgBouncerSpec   `json:"spec,omitempty"`
	Status            PgBouncerStatus `json:"status,omitempty"`
}

+kubebuilder:object:root=true +kubebuilder:resource:path=pgbouncers,singular=pgbouncer,shortName=pb,categories={datastore,kubedb,appscode,all} +kubebuilder:subresource:status +kubebuilder:storageversion +kubebuilder:printcolumn:name="Version",type="string",JSONPath=".spec.version" +kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.phase" +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"

func (PgBouncer) AppBindingMeta

func (p PgBouncer) AppBindingMeta() appcat.AppBindingMeta

func (*PgBouncer) AsOwner

func (p *PgBouncer) AsOwner() *metav1.OwnerReference

func (*PgBouncer) CertificateName

func (p *PgBouncer) CertificateName(alias PgBouncerCertificateAlias) string

CertificateName returns the default certificate name and/or certificate secret name for a certificate alias

func (PgBouncer) CustomResourceDefinition

func (p PgBouncer) CustomResourceDefinition() *apiextensions.CustomResourceDefinition

func (*PgBouncer) DeepCopy

func (in *PgBouncer) DeepCopy() *PgBouncer

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

func (*PgBouncer) DeepCopyInto

func (in *PgBouncer) DeepCopyInto(out *PgBouncer)

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

func (*PgBouncer) DeepCopyObject

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

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

func (PgBouncer) GetAuthSecretName

func (p PgBouncer) GetAuthSecretName() string

func (PgBouncer) GetBackendSecretName

func (p PgBouncer) GetBackendSecretName() string

func (*PgBouncer) GetCertSecretName

func (p *PgBouncer) GetCertSecretName(alias PgBouncerCertificateAlias) string

GetCertSecretName returns the secret name for a certificate alias if any provide, otherwise returns default certificate secret name for the given alias.

func (*PgBouncer) GetPersistentSecrets

func (p *PgBouncer) GetPersistentSecrets() []string

GetPersistentSecrets returns auth secret and config secret of a pgbouncer object

func (PgBouncer) GetPgBouncerFinalConfigSecret added in v0.48.0

func (p PgBouncer) GetPgBouncerFinalConfigSecret() (*core.Secret, error)

func (PgBouncer) GoverningServiceName

func (p PgBouncer) GoverningServiceName() string

func (*PgBouncer) Hub

func (*PgBouncer) Hub()

func (PgBouncer) IsPgBouncerFinalConfigSecretExist added in v0.48.0

func (p PgBouncer) IsPgBouncerFinalConfigSecretExist() bool

func (PgBouncer) OffshootLabels

func (p PgBouncer) OffshootLabels() map[string]string

func (PgBouncer) OffshootName

func (p PgBouncer) OffshootName() string

func (PgBouncer) OffshootSelectors

func (p PgBouncer) OffshootSelectors() map[string]string

func (PgBouncer) PgBouncerFinalConfigSecretName added in v0.48.0

func (p PgBouncer) PgBouncerFinalConfigSecretName() string

func (PgBouncer) PodControllerLabels

func (p PgBouncer) PodControllerLabels() map[string]string

func (PgBouncer) PodLabels

func (p PgBouncer) PodLabels(backendSecretRV string) map[string]string

func (*PgBouncer) ReplicasAreReady

func (p *PgBouncer) ReplicasAreReady(lister pslister.PetSetLister) (bool, string, error)

func (PgBouncer) ReplicasServiceName

func (p PgBouncer) ReplicasServiceName() string

func (PgBouncer) ResourceFQN

func (p PgBouncer) ResourceFQN() string

func (PgBouncer) ResourceKind

func (p PgBouncer) ResourceKind() string

func (PgBouncer) ResourcePlural

func (p PgBouncer) ResourcePlural() string

func (PgBouncer) ResourceShortCode

func (p PgBouncer) ResourceShortCode() string

func (PgBouncer) ResourceSingular

func (p PgBouncer) ResourceSingular() string

func (PgBouncer) ServiceLabels

func (p PgBouncer) ServiceLabels(alias ServiceAlias, extraLabels ...map[string]string) map[string]string

func (PgBouncer) ServiceName

func (p PgBouncer) ServiceName() string

func (*PgBouncer) SetDefaults

func (p *PgBouncer) SetDefaults(pgBouncerVersion *catalog.PgBouncerVersion, usesAcme bool)

func (*PgBouncer) SetHealthCheckerDefaults

func (p *PgBouncer) SetHealthCheckerDefaults()

func (*PgBouncer) SetSecurityContext

func (p *PgBouncer) SetSecurityContext(pgBouncerVersion *catalog.PgBouncerVersion)

func (*PgBouncer) SetTLSDefaults

func (p *PgBouncer) SetTLSDefaults(usesAcme bool)

func (PgBouncer) StatsService

func (p PgBouncer) StatsService() mona.StatsAccessor

func (PgBouncer) StatsServiceLabels

func (p PgBouncer) StatsServiceLabels() map[string]string

type PgBouncerCertificateAlias

type PgBouncerCertificateAlias string

+kubebuilder:validation:Enum=server;archiver;metrics-exporter

const (
	PgBouncerServerCert          PgBouncerCertificateAlias = "server"
	PgBouncerClientCert          PgBouncerCertificateAlias = "client"
	PgBouncerMetricsExporterCert PgBouncerCertificateAlias = "metrics-exporter"
)

type PgBouncerClientAuthMode

type PgBouncerClientAuthMode string

PgBouncerClientAuthMode represents the ClientAuthMode of PgBouncer clusters ( replicaset ) We are allowing md5, scram-sha-256, cert as ClientAuthMode +kubebuilder:validation:Enum=md5;scram-sha-256;cert;

const (
	// ClientAuthModeMD5 uses a custom less secure challenge-response mechanism.
	// It prevents password sniffing and avoids storing passwords on the server in plain text but provides no protection
	// if an attacker manages to steal the password hash from the server.
	// Also, the MD5 hash algorithm is nowadays no longer considered secure against determined attacks
	PgBouncerClientAuthModeMD5 PgBouncerClientAuthMode = "md5"

	// ClientAuthModeScram performs SCRAM-SHA-256 authentication, as described in RFC 7677.
	// It is a challenge-response scheme that prevents password sniffing on untrusted connections
	// and supports storing passwords on the server in a cryptographically hashed form that is thought to be secure.
	// This is the most secure of the currently provided methods, but it is not supported by older client libraries.
	PgBouncerClientAuthModeScram PgBouncerClientAuthMode = "scram-sha-256"

	// ClientAuthModeCert represents `cert clientcert=1` auth mode where client need to provide cert and private key for authentication.
	// When server is config with this auth method. Client can't connect with pgbouncer server with password. They need
	// to Send the client cert and client key certificate for authentication.
	PgBouncerClientAuthModeCert PgBouncerClientAuthMode = "cert"
)

type PgBouncerList

type PgBouncerList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	// Items is a list of PgBouncer CRD objects.
	Items []PgBouncer `json:"items,omitempty"`
}

+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*PgBouncerList) DeepCopy

func (in *PgBouncerList) DeepCopy() *PgBouncerList

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

func (*PgBouncerList) DeepCopyInto

func (in *PgBouncerList) DeepCopyInto(out *PgBouncerList)

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

func (*PgBouncerList) DeepCopyObject

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

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

type PgBouncerSSLMode

type PgBouncerSSLMode string

+kubebuilder:validation:Enum=disable;allow;prefer;require;verify-ca;verify-full

const (
	// PgBouncerSSLModeDisable represents `disable` sslMode. It ensures that the server does not use TLS/SSL.
	PgBouncerSSLModeDisable PgBouncerSSLMode = "disable"

	// PgBouncerSSLModeAllow represents `allow` sslMode. 	I don't care about security,
	// but I will pay the overhead of encryption if the server insists on it.
	PgBouncerSSLModeAllow PgBouncerSSLMode = "allow"

	// PgBouncerSSLModePrefer represents `preferSSL` sslMode.
	// I don't care about encryption, but I wish to pay the overhead of encryption if the server supports it.
	PgBouncerSSLModePrefer PgBouncerSSLMode = "prefer"

	// PgBouncerSSLModeRequire represents `requiteSSL` sslmode. I want my data to be encrypted, and I accept the overhead.
	// I trust that the network will make sure I always connect to the server I want.
	PgBouncerSSLModeRequire PgBouncerSSLMode = "require"

	// PgBouncerSSLModeVerifyCA represents `verify-ca` sslmode. I want my data encrypted, and I accept the overhead.
	// I want to be sure that I connect to a server that I trust.
	PgBouncerSSLModeVerifyCA PgBouncerSSLMode = "verify-ca"

	// PgBouncerSSLModeVerifyFull represents `verify-full` sslmode. I want my data encrypted, and I accept the overhead.
	// I want to be sure that I connect to a server I trust, and that it's the one I specify.
	PgBouncerSSLModeVerifyFull PgBouncerSSLMode = "verify-full"
)

type PgBouncerSpec

type PgBouncerSpec struct {
	// AutoOps contains configuration of automatic ops-request-recommendation generation
	// +optional
	AutoOps AutoOpsSpec `json:"autoOps,omitempty"`

	// Version of PgBouncer to be deployed.
	Version string `json:"version"`

	// Number of instances to deploy for a PgBouncer instance.
	// +optional
	Replicas *int32 `json:"replicas,omitempty"`

	// ServiceTemplates is an optional configuration for services used to expose database
	// +optional
	ServiceTemplates []NamedServiceTemplateSpec `json:"serviceTemplates,omitempty"`

	// PodTemplate is an optional configuration for pods.
	// +optional
	PodTemplate ofstv2.PodTemplateSpec `json:"podTemplate,omitempty"`

	// Database to proxy by connection pooling.
	Database Database `json:"database"`

	// ConnectionPoolConfig defines Connection pool configuration.
	// +optional
	ConnectionPool *ConnectionPoolConfig `json:"connectionPool,omitempty"`

	// Database authentication secret
	// +optional
	AuthSecret *SecretReference `json:"authSecret,omitempty"`

	// ConfigSecret is an optional field to provide custom configuration file for database (i.e mongod.cnf).
	// If specified, this file will be used as configuration file otherwise default configuration file will be used.
	ConfigSecret *core.LocalObjectReference `json:"configSecret,omitempty"`

	// Monitor is used monitor database instance.
	// +optional
	Monitor *mona.AgentSpec `json:"monitor,omitempty"`

	// SSLMode for both standalone and clusters. [disable;allow;prefer;require;verify-ca;verify-full]
	SSLMode PgBouncerSSLMode `json:"sslMode,omitempty"`

	// TLS contains tls configurations for client and server.
	// +optional
	TLS *kmapi.TLSConfig `json:"tls,omitempty"`

	// DeletionPolicy controls the delete operation for database
	// +optional
	DeletionPolicy DeletionPolicy `json:"deletionPolicy,omitempty"`

	// HealthChecker defines attributes of the health checker
	// +optional
	// +kubebuilder:default={periodSeconds: 10, timeoutSeconds: 10, failureThreshold: 1}
	HealthChecker kmapi.HealthCheckSpec `json:"healthChecker"`

	// Indicates that the database is halted and all offshoot Kubernetes resources are deleted.
	// +optional
	Halted bool `json:"halted,omitempty"`
}

func (*PgBouncerSpec) DeepCopy

func (in *PgBouncerSpec) DeepCopy() *PgBouncerSpec

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

func (*PgBouncerSpec) DeepCopyInto

func (in *PgBouncerSpec) DeepCopyInto(out *PgBouncerSpec)

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

type PgBouncerStatus

type PgBouncerStatus struct {
	// Specifies the current phase of the database
	// +optional
	Phase DatabasePhase `json:"phase,omitempty"`
	// observedGeneration is the most recent generation observed for this resource. It corresponds to the
	// resource's generation, which is updated on mutation by the API Server.
	// +optional
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`
	// Conditions applied to the database, such as approval or denial.
	// +optional
	Conditions []kmapi.Condition `json:"conditions,omitempty"`
}

func (*PgBouncerStatus) DeepCopy

func (in *PgBouncerStatus) DeepCopy() *PgBouncerStatus

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

func (*PgBouncerStatus) DeepCopyInto

func (in *PgBouncerStatus) DeepCopyInto(out *PgBouncerStatus)

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

type PostgreLeaderElectionConfig

type PostgreLeaderElectionConfig struct {
	// LeaseDuration is the duration in second that non-leader candidates will
	// wait to force acquire leadership. This is measured against time of
	// last observed ack. Default 15
	// Deprecated
	LeaseDurationSeconds int32 `json:"leaseDurationSeconds,omitempty"`
	// RenewDeadline is the duration in second that the acting master will retry
	// refreshing leadership before giving up. Normally, LeaseDuration * 2 / 3.
	// Default 10
	// Deprecated
	RenewDeadlineSeconds int32 `json:"renewDeadlineSeconds,omitempty"`
	// RetryPeriod is the duration in second the LeaderElector clients should wait
	// between tries of actions. Normally, LeaseDuration / 3.
	// Default 2
	// Deprecated
	RetryPeriodSeconds int32 `json:"retryPeriodSeconds,omitempty"`

	// MaximumLagBeforeFailover is used as maximum lag tolerance for the cluster.
	// when ever a replica is lagging more than MaximumLagBeforeFailover
	// this node need to sync manually with the primary node. default value is 32MB
	// +default=33554432
	// +kubebuilder:default=33554432
	// +optional
	MaximumLagBeforeFailover uint64 `json:"maximumLagBeforeFailover,omitempty"`

	// Period between Node.Tick invocations
	// +kubebuilder:default="100ms"
	// +optional
	Period metav1.Duration `json:"period,omitempty"`

	// ElectionTick is the number of Node.Tick invocations that must pass between
	//	elections. That is, if a follower does not receive any message from the
	//  leader of current term before ElectionTick has elapsed, it will become
	//	candidate and start an election. ElectionTick must be greater than
	//  HeartbeatTick. We suggest ElectionTick = 10 * HeartbeatTick to avoid
	//  unnecessary leader switching. default value is 10.
	// +default=10
	// +kubebuilder:default=10
	// +optional
	ElectionTick int32 `json:"electionTick,omitempty"`

	// HeartbeatTick is the number of Node.Tick invocations that must pass between
	// heartbeats. That is, a leader sends heartbeat messages to maintain its
	// leadership every HeartbeatTick ticks. default value is 1.
	// +default=1
	// +kubebuilder:default=1
	// +optional
	HeartbeatTick int32 `json:"heartbeatTick,omitempty"`

	// TransferLeadershipInterval retry interval for transfer leadership
	// to the healthiest node
	// +kubebuilder:default="1s"
	// +optional
	TransferLeadershipInterval *metav1.Duration `json:"transferLeadershipInterval,omitempty"`

	// TransferLeadershipTimeout retry timeout for transfer leadership
	// to the healthiest node
	// +kubebuilder:default="60s"
	// +optional
	TransferLeadershipTimeout *metav1.Duration `json:"transferLeadershipTimeout,omitempty"`
}

PostgreLeaderElectionConfig contains essential attributes of leader election.

func (*PostgreLeaderElectionConfig) DeepCopy

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

func (*PostgreLeaderElectionConfig) DeepCopyInto

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

type PostgreSQLMode

type PostgreSQLMode string
const (
	PostgreSQLModeStandAlone    PostgreSQLMode = "Standalone"
	PostgreSQLModeRemoteReplica PostgreSQLMode = "RemoteReplica"
	PostgreSQLModeCluster       PostgreSQLMode = "Cluster"
)

type Postgres

type Postgres struct {
	metav1.TypeMeta   `json:",inline,omitempty"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	Spec              PostgresSpec   `json:"spec,omitempty"`
	Status            PostgresStatus `json:"status,omitempty"`
}

+kubebuilder:object:root=true +kubebuilder:resource:path=postgreses,singular=postgres,shortName=pg,categories={datastore,kubedb,appscode,all} +kubebuilder:subresource:status +kubebuilder:storageversion +kubebuilder:printcolumn:name="Version",type="string",JSONPath=".spec.version" +kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.phase" +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"

func (Postgres) AppBindingMeta

func (p Postgres) AppBindingMeta() appcat.AppBindingMeta

func (*Postgres) AsOwner

func (p *Postgres) AsOwner() *metav1.OwnerReference

func (*Postgres) CertificateName

func (p *Postgres) CertificateName(alias PostgresCertificateAlias) string

CertificateName returns the default certificate name and/or certificate secret name for a certificate alias

func (Postgres) CustomResourceDefinition

func (_ Postgres) CustomResourceDefinition() *apiextensions.CustomResourceDefinition

func (*Postgres) DeepCopy

func (in *Postgres) DeepCopy() *Postgres

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

func (*Postgres) DeepCopyInto

func (in *Postgres) DeepCopyInto(out *Postgres)

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

func (*Postgres) DeepCopyObject

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

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

func (Postgres) GetAuthSecretName

func (p Postgres) GetAuthSecretName() string

func (*Postgres) GetCertSecretName

func (p *Postgres) GetCertSecretName(alias PostgresCertificateAlias) string

GetCertSecretName returns the secret name for a certificate alias if any provide, otherwise returns default certificate secret name for the given alias.

func (Postgres) GoverningServiceName

func (p Postgres) GoverningServiceName() string

func (*Postgres) Hub

func (*Postgres) Hub()

func (*Postgres) IsRemoteReplica

func (m *Postgres) IsRemoteReplica() bool

func (Postgres) OffshootLabels

func (p Postgres) OffshootLabels() map[string]string

func (Postgres) OffshootName

func (p Postgres) OffshootName() string

func (Postgres) OffshootSelectors

func (p Postgres) OffshootSelectors() map[string]string

func (Postgres) PodControllerLabels

func (p Postgres) PodControllerLabels() map[string]string

func (Postgres) PodLabels

func (p Postgres) PodLabels() map[string]string

func (*Postgres) ReplicasAreReady

func (p *Postgres) ReplicasAreReady(lister pslister.PetSetLister) (bool, string, error)

func (Postgres) ResourceFQN

func (p Postgres) ResourceFQN() string

func (Postgres) ResourceKind

func (p Postgres) ResourceKind() string

func (Postgres) ResourcePlural

func (p Postgres) ResourcePlural() string

func (Postgres) ResourceShortCode

func (p Postgres) ResourceShortCode() string

func (Postgres) ResourceSingular

func (p Postgres) ResourceSingular() string

func (Postgres) ServiceLabels

func (p Postgres) ServiceLabels(alias ServiceAlias, extraLabels ...map[string]string) map[string]string

func (Postgres) ServiceName

func (p Postgres) ServiceName() string

func (*Postgres) SetArbiterDefault

func (p *Postgres) SetArbiterDefault()

func (*Postgres) SetDefaultReplicationMode

func (p *Postgres) SetDefaultReplicationMode(postgresVersion *catalog.PostgresVersion)

SetDefaultReplicationMode set the default replication mode. Replication slot will be prioritized if no WalLimitPolicy is mentioned

func (*Postgres) SetDefaults

func (p *Postgres) SetDefaults(postgresVersion *catalog.PostgresVersion)

func (*Postgres) SetHealthCheckerDefaults

func (m *Postgres) SetHealthCheckerDefaults()

func (*Postgres) SetTLSDefaults

func (p *Postgres) SetTLSDefaults()

func (Postgres) StandbyServiceName

func (p Postgres) StandbyServiceName() string

func (Postgres) StatsService

func (p Postgres) StatsService() mona.StatsAccessor

func (Postgres) StatsServiceLabels

func (p Postgres) StatsServiceLabels() map[string]string

type PostgresCertificateAlias

type PostgresCertificateAlias string

+kubebuilder:validation:Enum=server;archiver;metrics-exporter

const (
	PostgresServerCert          PostgresCertificateAlias = "server"
	PostgresClientCert          PostgresCertificateAlias = "client"
	PostgresArchiverCert        PostgresCertificateAlias = "archiver"
	PostgresMetricsExporterCert PostgresCertificateAlias = "metrics-exporter"
)

type PostgresClientAuthMode

type PostgresClientAuthMode string

PostgresClientAuthMode represents the ClientAuthMode of PostgreSQL clusters ( replicaset ) ref: https://www.postgresql.org/docs/12/auth-methods.html +kubebuilder:validation:Enum=md5;scram;cert

const (
	// ClientAuthModeMD5 uses a custom less secure challenge-response mechanism.
	// It prevents password sniffing and avoids storing passwords on the server in plain text but provides no protection
	// if an attacker manages to steal the password hash from the server.
	// Also, the MD5 hash algorithm is nowadays no longer considered secure against determined attacks
	ClientAuthModeMD5 PostgresClientAuthMode = "md5"

	// ClientAuthModeScram performs SCRAM-SHA-256 authentication, as described in RFC 7677.
	// It is a challenge-response scheme that prevents password sniffing on untrusted connections
	// and supports storing passwords on the server in a cryptographically hashed form that is thought to be secure.
	// This is the most secure of the currently provided methods, but it is not supported by older client libraries.
	ClientAuthModeScram PostgresClientAuthMode = "scram"

	// ClientAuthModeCert represents `cert clientcert=1` auth mode where client need to provide cert and private key for authentication.
	// When server is config with this auth method. Client can't connect with postgreSQL server with password. They need
	// to Send the client cert and client key certificate for authentication.
	ClientAuthModeCert PostgresClientAuthMode = "cert"
)

type PostgresList

type PostgresList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	// Items is a list of Postgres CRD objects
	Items []Postgres `json:"items,omitempty"`
}

func (*PostgresList) DeepCopy

func (in *PostgresList) DeepCopy() *PostgresList

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

func (*PostgresList) DeepCopyInto

func (in *PostgresList) DeepCopyInto(out *PostgresList)

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

func (*PostgresList) DeepCopyObject

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

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

type PostgresReplication

type PostgresReplication struct {
	WALLimitPolicy WALLimitPolicy `json:"walLimitPolicy"`

	// +optional
	WalKeepSizeInMegaBytes *int32 `json:"walKeepSize,omitempty"`
	// +optional
	WalKeepSegment *int32 `json:"walKeepSegment,omitempty"`
	// +optional
	MaxSlotWALKeepSizeInMegaBytes *int32 `json:"maxSlotWALKeepSize,omitempty"`
}

func (*PostgresReplication) DeepCopy

func (in *PostgresReplication) DeepCopy() *PostgresReplication

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

func (*PostgresReplication) DeepCopyInto

func (in *PostgresReplication) DeepCopyInto(out *PostgresReplication)

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

type PostgresSSLMode

type PostgresSSLMode string

ref: https://www.postgresql.org/docs/13/libpq-ssl.html +kubebuilder:validation:Enum=disable;allow;prefer;require;verify-ca;verify-full

const (
	// PostgresSSLModeDisable represents `disable` sslMode. It ensures that the server does not use TLS/SSL.
	PostgresSSLModeDisable PostgresSSLMode = "disable"

	// PostgresSSLModeAllow represents `allow` sslMode. 	I don't care about security,
	// but I will pay the overhead of encryption if the server insists on it.
	PostgresSSLModeAllow PostgresSSLMode = "allow"

	// PostgresSSLModePrefer represents `preferSSL` sslMode.
	// I don't care about encryption, but I wish to pay the overhead of encryption if the server supports it.
	PostgresSSLModePrefer PostgresSSLMode = "prefer"

	// PostgresSSLModeRequire represents `requiteSSL` sslmode. I want my data to be encrypted, and I accept the overhead.
	// I trust that the network will make sure I always connect to the server I want.
	PostgresSSLModeRequire PostgresSSLMode = "require"

	// PostgresSSLModeVerifyCA represents `verify-ca` sslmode. I want my data encrypted, and I accept the overhead.
	// I want to be sure that I connect to a server that I trust.
	PostgresSSLModeVerifyCA PostgresSSLMode = "verify-ca"

	// PostgresSSLModeVerifyFull represents `verify-full` sslmode. I want my data encrypted, and I accept the overhead.
	// I want to be sure that I connect to a server I trust, and that it's the one I specify.
	PostgresSSLModeVerifyFull PostgresSSLMode = "verify-full"
)

type PostgresSpec

type PostgresSpec struct {
	// AutoOps contains configuration of automatic ops-request-recommendation generation
	// +optional
	AutoOps AutoOpsSpec `json:"autoOps,omitempty"`

	// Version of Postgres to be deployed.
	Version string `json:"version"`

	// Number of instances to deploy for a Postgres database.
	Replicas *int32 `json:"replicas,omitempty"`

	// Standby mode
	StandbyMode *PostgresStandbyMode `json:"standbyMode,omitempty"`

	// Streaming mode
	StreamingMode *PostgresStreamingMode `json:"streamingMode,omitempty"`

	// + optional
	Mode *PostgreSQLMode `json:"mode,omitempty"`
	// RemoteReplica implies that the instance will be a MySQL Read Only Replica,
	// and it will take reference of  appbinding of the source
	// +optional
	RemoteReplica *RemoteReplicaSpec `json:"remoteReplica,omitempty"`

	// Leader election configuration
	// +optional
	LeaderElection *PostgreLeaderElectionConfig `json:"leaderElection,omitempty"`

	// Database authentication secret
	// +optional
	AuthSecret *SecretReference `json:"authSecret,omitempty"`

	// StorageType can be durable (default) or ephemeral
	StorageType StorageType `json:"storageType,omitempty"`

	// Storage to specify how storage shall be used.
	Storage *core.PersistentVolumeClaimSpec `json:"storage,omitempty"`

	// ClientAuthMode for sidecar or sharding. (default will be md5. [md5;scram;cert])
	ClientAuthMode PostgresClientAuthMode `json:"clientAuthMode,omitempty"`

	// SSLMode for both standalone and clusters. [disable;allow;prefer;require;verify-ca;verify-full]
	SSLMode PostgresSSLMode `json:"sslMode,omitempty"`

	// Init is used to initialize database
	// +optional
	Init *InitSpec `json:"init,omitempty"`

	// Monitor is used monitor database instance
	// +optional
	Monitor *mona.AgentSpec `json:"monitor,omitempty"`

	// ConfigSecret is an optional field to provide custom configuration file for database (i.e postgresql.conf).
	// If specified, this file will be used as configuration file otherwise default configuration file will be used.
	ConfigSecret *core.LocalObjectReference `json:"configSecret,omitempty"`

	// PodTemplate is an optional configuration for pods used to expose database
	// +optional
	PodTemplate ofstv2.PodTemplateSpec `json:"podTemplate,omitempty"`

	// ServiceTemplates is an optional configuration for services used to expose database
	// +optional
	ServiceTemplates []NamedServiceTemplateSpec `json:"serviceTemplates,omitempty"`

	// TLS contains tls configurations for client and server.
	// +optional
	TLS *kmapi.TLSConfig `json:"tls,omitempty"`

	// Indicates that the database is halted and all offshoot Kubernetes resources except PVCs are deleted.
	// +optional
	Halted bool `json:"halted,omitempty"`

	// DeletionPolicy controls the delete operation for database
	// +optional
	DeletionPolicy DeletionPolicy `json:"deletionPolicy,omitempty"`

	// EnforceFsGroup Is Used when the storageClass's CSI Driver doesn't support FsGroup properties properly.
	// If It's true then The Init Container will run as RootUser and
	// the init-container will set user's permission for the mounted pvc volume with which coordinator and postgres containers are going to run.
	// In postgres it is /var/pv
	// +optional
	EnforceFsGroup bool `json:"enforceFsGroup,omitempty"`

	// AllowedSchemas defines the types of database schemas that MAY refer to
	// a database instance and the trusted namespaces where those schema resources MAY be
	// present.
	//
	// +kubebuilder:default={namespaces:{from: Same}}
	// +optional
	AllowedSchemas *AllowedConsumers `json:"allowedSchemas,omitempty"`

	// HealthChecker defines attributes of the health checker
	// +optional
	// +kubebuilder:default={periodSeconds: 10, timeoutSeconds: 10, failureThreshold: 1}
	HealthChecker kmapi.HealthCheckSpec `json:"healthChecker"`

	// Archiver controls database backup using Archiver CR
	// +optional
	Archiver *Archiver `json:"archiver,omitempty"`

	// Arbiter controls spec for arbiter pods
	// +optional
	Arbiter *ArbiterSpec `json:"arbiter,omitempty"`

	// +optional
	Replication *PostgresReplication `json:"replication,omitempty"`
}

func (*PostgresSpec) DeepCopy

func (in *PostgresSpec) DeepCopy() *PostgresSpec

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

func (*PostgresSpec) DeepCopyInto

func (in *PostgresSpec) DeepCopyInto(out *PostgresSpec)

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

func (*PostgresSpec) GetPersistentSecrets

func (p *PostgresSpec) GetPersistentSecrets() []string

type PostgresStandbyMode

type PostgresStandbyMode string

+kubebuilder:validation:Enum=Hot;Warm

const (
	HotPostgresStandbyMode  PostgresStandbyMode = "Hot"
	WarmPostgresStandbyMode PostgresStandbyMode = "Warm"
)

type PostgresStatus

type PostgresStatus struct {
	// Specifies the current phase of the database
	// +optional
	Phase DatabasePhase `json:"phase,omitempty"`
	// observedGeneration is the most recent generation observed for this resource. It corresponds to the
	// resource's generation, which is updated on mutation by the API Server.
	// +optional
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`
	// Conditions applied to the database, such as approval or denial.
	// +optional
	Conditions []kmapi.Condition `json:"conditions,omitempty"`
	// +optional
	AuthSecret *Age `json:"authSecret,omitempty"`
}

func (*PostgresStatus) DeepCopy

func (in *PostgresStatus) DeepCopy() *PostgresStatus

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

func (*PostgresStatus) DeepCopyInto

func (in *PostgresStatus) DeepCopyInto(out *PostgresStatus)

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

type PostgresStreamingMode

type PostgresStreamingMode string

+kubebuilder:validation:Enum=Synchronous;Asynchronous

const (
	SynchronousPostgresStreamingMode  PostgresStreamingMode = "Synchronous"
	AsynchronousPostgresStreamingMode PostgresStreamingMode = "Asynchronous"
)

type ProxySQL

type ProxySQL struct {
	metav1.TypeMeta   `json:",inline,omitempty"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	Spec              ProxySQLSpec   `json:"spec,omitempty"`
	Status            ProxySQLStatus `json:"status,omitempty"`
}

+kubebuilder:object:root=true +kubebuilder:resource:path=proxysqls,singular=proxysql,shortName=prx,categories={datastore,kubedb,appscode,all} +kubebuilder:subresource:status +kubebuilder:storageversion +kubebuilder:printcolumn:name="Version",type="string",JSONPath=".spec.version" +kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.phase" +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"

func (ProxySQL) AppBindingMeta

func (p ProxySQL) AppBindingMeta() appcat.AppBindingMeta

func (*ProxySQL) AsOwner

func (p *ProxySQL) AsOwner() *metav1.OwnerReference

func (*ProxySQL) CertificateName

func (m *ProxySQL) CertificateName(alias ProxySQLCertificateAlias) string

CertificateName returns the default certificate name and/or certificate secret name for a certificate alias

func (ProxySQL) CustomResourceDefinition

func (_ ProxySQL) CustomResourceDefinition() *apiextensions.CustomResourceDefinition

func (*ProxySQL) DeepCopy

func (in *ProxySQL) DeepCopy() *ProxySQL

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

func (*ProxySQL) DeepCopyInto

func (in *ProxySQL) DeepCopyInto(out *ProxySQL)

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

func (*ProxySQL) DeepCopyObject

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

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

func (ProxySQL) GetAuthSecretName

func (p ProxySQL) GetAuthSecretName() string

func (*ProxySQL) GetCertSecretName

func (m *ProxySQL) GetCertSecretName(alias ProxySQLCertificateAlias) string

GetCertSecretName returns the secret name for a certificate alias if any, otherwise returns default certificate secret name for the given alias.

func (ProxySQL) GoverningServiceName

func (p ProxySQL) GoverningServiceName() string

func (*ProxySQL) Hub

func (*ProxySQL) Hub()

func (*ProxySQL) IsCluster

func (m *ProxySQL) IsCluster() bool

IsCluster returns boolean true if the proxysql is in cluster mode, otherwise false

func (ProxySQL) OffshootLabels

func (p ProxySQL) OffshootLabels() map[string]string

func (ProxySQL) OffshootName

func (p ProxySQL) OffshootName() string

func (ProxySQL) OffshootSelectors

func (p ProxySQL) OffshootSelectors() map[string]string

func (ProxySQL) PodControllerLabels

func (p ProxySQL) PodControllerLabels() map[string]string

func (ProxySQL) PodLabels

func (p ProxySQL) PodLabels() map[string]string

func (*ProxySQL) ReplicasAreReady

func (p *ProxySQL) ReplicasAreReady(lister pslister.PetSetLister) (bool, string, error)

func (ProxySQL) ResourceFQN

func (p ProxySQL) ResourceFQN() string

func (ProxySQL) ResourceKind

func (p ProxySQL) ResourceKind() string

func (ProxySQL) ResourcePlural

func (p ProxySQL) ResourcePlural() string

func (ProxySQL) ResourceShortCode

func (p ProxySQL) ResourceShortCode() string

func (ProxySQL) ResourceSingular

func (p ProxySQL) ResourceSingular() string

func (ProxySQL) ServiceLabels

func (p ProxySQL) ServiceLabels(alias ServiceAlias, extraLabels ...map[string]string) map[string]string

func (ProxySQL) ServiceName

func (p ProxySQL) ServiceName() string

func (*ProxySQL) SetDefaults

func (p *ProxySQL) SetDefaults(psVersion *v1alpha1.ProxySQLVersion, usesAcme bool)

func (*ProxySQL) SetHealthCheckerDefaults

func (p *ProxySQL) SetHealthCheckerDefaults()

func (*ProxySQL) SetTLSDefaults

func (m *ProxySQL) SetTLSDefaults(usesAcme bool)

func (ProxySQL) StatsService

func (p ProxySQL) StatsService() mona.StatsAccessor

func (ProxySQL) StatsServiceLabels

func (p ProxySQL) StatsServiceLabels() map[string]string

type ProxySQLCertificateAlias

type ProxySQLCertificateAlias string

+kubebuilder:validation:Enum=server;archiver;metrics-exporter

const (
	ProxySQLServerCert          ProxySQLCertificateAlias = "server"
	ProxySQLClientCert          ProxySQLCertificateAlias = "client"
	ProxySQLMetricsExporterCert ProxySQLCertificateAlias = "metrics-exporter"
)

type ProxySQLConfiguration

type ProxySQLConfiguration struct {
	// +optional
	MySQLUsers []MySQLUser `json:"mysqlUsers,omitempty"`

	// +optional
	// +kubebuilder:pruning:PreserveUnknownFields
	MySQLQueryRules []*runtime.RawExtension `json:"mysqlQueryRules,omitempty"`

	// +optional
	// +kubebuilder:pruning:PreserveUnknownFields
	MySQLVariables *runtime.RawExtension `json:"mysqlVariables,omitempty"`

	// +optional
	// +kubebuilder:pruning:PreserveUnknownFields
	AdminVariables *runtime.RawExtension `json:"adminVariables,omitempty"`
}

func (*ProxySQLConfiguration) DeepCopy

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

func (*ProxySQLConfiguration) DeepCopyInto

func (in *ProxySQLConfiguration) DeepCopyInto(out *ProxySQLConfiguration)

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

type ProxySQLList

type ProxySQLList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	// Items is a list of ProxySQL TPR objects
	Items []ProxySQL `json:"items,omitempty"`
}

func (*ProxySQLList) DeepCopy

func (in *ProxySQLList) DeepCopy() *ProxySQLList

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

func (*ProxySQLList) DeepCopyInto

func (in *ProxySQLList) DeepCopyInto(out *ProxySQLList)

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

func (*ProxySQLList) DeepCopyObject

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

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

type ProxySQLSpec

type ProxySQLSpec struct {
	// AutoOps contains configuration of automatic ops-request-recommendation generation
	// +optional
	AutoOps AutoOpsSpec `json:"autoOps,omitempty"`

	// +optional
	// SyncUsers is a boolean type and when enabled, operator fetches all users created in the backend server to the
	// ProxySQL server . Password changes are also synced in proxysql when it is enabled.
	SyncUsers bool `json:"syncUsers,omitempty"`

	// +optional
	// InitConfiguration contains information with which the proxysql will bootstrap (only 4 tables are configurable)
	InitConfiguration *ProxySQLConfiguration `json:"initConfig,omitempty"`

	// Version of ProxySQL to be deployed.
	Version string `json:"version"`

	// Number of instances to deploy for ProxySQL. Currently we support only replicas = 1.
	// TODO: If replicas > 1, proxysql will be clustered
	Replicas *int32 `json:"replicas,omitempty"`

	// Backend refers to the AppBinding of the backend MySQL/MariaDB/Percona-XtraDB server
	Backend *core.LocalObjectReference `json:"backend,omitempty"`

	// ProxySQL secret containing username and password for root user and proxysql user
	// +optional
	AuthSecret *SecretReference `json:"authSecret,omitempty"`

	// Monitor is used monitor proxysql instance
	// +optional
	Monitor *mona.AgentSpec `json:"monitor,omitempty"`

	// ConfigSecret is an optional field to provide custom configuration file for proxysql (i.e custom-proxysql.cnf).
	// If specified, this file will be used as configuration file otherwise default configuration file will be used.
	ConfigSecret *core.LocalObjectReference `json:"configSecret,omitempty"`

	// PodTemplate is an optional configuration for pods used to expose proxysql
	// +optional
	PodTemplate ofstv2.PodTemplateSpec `json:"podTemplate,omitempty"`

	// ServiceTemplates is an optional configuration for services used to expose database
	// +optional
	ServiceTemplates []NamedServiceTemplateSpec `json:"serviceTemplates,omitempty"`

	// TLS contains tls configurations for client and server.
	// +optional
	TLS *kmapi.TLSConfig `json:"tls,omitempty"`

	// DeletionPolicy controls the delete operation for database
	// +optional
	DeletionPolicy DeletionPolicy `json:"deletionPolicy,omitempty"`

	// HealthChecker defines attributes of the health checker
	// +optional
	// +kubebuilder:default={periodSeconds: 10, timeoutSeconds: 10, failureThreshold: 1}
	HealthChecker kmapi.HealthCheckSpec `json:"healthChecker"`

	// Indicates that the database is halted and all offshoot Kubernetes resources except PVCs are deleted.
	// +optional
	Halted bool `json:"halted,omitempty"`
}

func (*ProxySQLSpec) DeepCopy

func (in *ProxySQLSpec) DeepCopy() *ProxySQLSpec

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

func (*ProxySQLSpec) DeepCopyInto

func (in *ProxySQLSpec) DeepCopyInto(out *ProxySQLSpec)

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

func (*ProxySQLSpec) GetPersistentSecrets

func (p *ProxySQLSpec) GetPersistentSecrets() []string

type ProxySQLStatus

type ProxySQLStatus struct {
	// Specifies the current phase of the database
	// +optional
	Phase DatabasePhase `json:"phase,omitempty"`
	// observedGeneration is the most recent generation observed for this resource. It corresponds to the
	// resource's generation, which is updated on mutation by the API Server.
	// +optional
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`
	// Conditions applied to the database, such as approval or denial.
	// +optional
	Conditions []kmapi.Condition `json:"conditions,omitempty"`
	// +optional
	AuthSecret *Age `json:"authSecret,omitempty"`
}

func (*ProxySQLStatus) DeepCopy

func (in *ProxySQLStatus) DeepCopy() *ProxySQLStatus

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

func (*ProxySQLStatus) DeepCopyInto

func (in *ProxySQLStatus) DeepCopyInto(out *ProxySQLStatus)

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

type RecoveryTarget

type RecoveryTarget struct {
	// TargetTime specifies the time stamp up to which recovery will proceed.
	TargetTime string `json:"targetTime,omitempty"`
	// TargetTimeline specifies recovering into a particular timeline.
	// The default is to recover along the same timeline that was current when the base backup was taken.
	TargetTimeline string `json:"targetTimeline,omitempty"`
	// TargetXID specifies the transaction ID up to which recovery will proceed.
	TargetXID string `json:"targetXID,omitempty"`
	// TargetInclusive specifies whether to include ongoing transaction in given target point.
	TargetInclusive *bool `json:"targetInclusive,omitempty"`
}

func (*RecoveryTarget) DeepCopy

func (in *RecoveryTarget) DeepCopy() *RecoveryTarget

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

func (*RecoveryTarget) DeepCopyInto

func (in *RecoveryTarget) DeepCopyInto(out *RecoveryTarget)

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

type Redis

type Redis struct {
	metav1.TypeMeta   `json:",inline,omitempty"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	Spec              RedisSpec   `json:"spec,omitempty"`
	Status            RedisStatus `json:"status,omitempty"`
}

+kubebuilder:object:root=true +kubebuilder:resource:path=redises,singular=redis,shortName=rd,categories={datastore,kubedb,appscode,all} +kubebuilder:subresource:status +kubebuilder:storageversion +kubebuilder:printcolumn:name="Version",type="string",JSONPath=".spec.version" +kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.phase" +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"

func (Redis) Address

func (r Redis) Address() string

func (Redis) AppBindingMeta

func (r Redis) AppBindingMeta() appcat.AppBindingMeta

func (*Redis) AsOwner

func (r *Redis) AsOwner() *metav1.OwnerReference

func (Redis) BaseNameForShard

func (r Redis) BaseNameForShard() string

func (*Redis) CertificateName

func (r *Redis) CertificateName(alias RedisCertificateAlias) string

CertificateName returns the default certificate name and/or certificate secret name for a certificate alias

func (Redis) ConfigSecretName

func (r Redis) ConfigSecretName() string

func (Redis) CustomConfigSecretName

func (r Redis) CustomConfigSecretName() string

func (Redis) CustomResourceDefinition

func (r Redis) CustomResourceDefinition() *apiextensions.CustomResourceDefinition

func (*Redis) DeepCopy

func (in *Redis) DeepCopy() *Redis

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

func (*Redis) DeepCopyInto

func (in *Redis) DeepCopyInto(out *Redis)

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

func (*Redis) DeepCopyObject

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

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

func (Redis) GetAuthSecretName

func (r Redis) GetAuthSecretName() string

func (*Redis) GetCertSecretName

func (r *Redis) GetCertSecretName(alias RedisCertificateAlias) string

GetCertSecretName returns the secret name for a certificate alias if any provide, otherwise returns default certificate secret name for the given alias.

func (Redis) GoverningServiceName

func (r Redis) GoverningServiceName() string

func (*Redis) Hub

func (*Redis) Hub()

func (Redis) OffshootLabels

func (r Redis) OffshootLabels() map[string]string

func (Redis) OffshootName

func (r Redis) OffshootName() string

func (Redis) OffshootSelectors

func (r Redis) OffshootSelectors(extraSelectors ...map[string]string) map[string]string

func (Redis) PetSetNameWithShard

func (r Redis) PetSetNameWithShard(i int) string

func (Redis) PodControllerLabels

func (r Redis) PodControllerLabels(extraLabels ...map[string]string) map[string]string

func (Redis) PodLabels

func (r Redis) PodLabels(extraLabels ...map[string]string) map[string]string

func (*Redis) ReplicasAreReady

func (r *Redis) ReplicasAreReady(lister pslister.PetSetLister) (bool, string, error)

func (Redis) ResourceFQN

func (r Redis) ResourceFQN() string

func (Redis) ResourceKind

func (r Redis) ResourceKind() string

func (Redis) ResourcePlural

func (r Redis) ResourcePlural() string

func (Redis) ResourceShortCode

func (r Redis) ResourceShortCode() string

func (Redis) ResourceSingular

func (r Redis) ResourceSingular() string

func (Redis) ServiceLabels

func (r Redis) ServiceLabels(alias ServiceAlias, extraLabels ...map[string]string) map[string]string

func (Redis) ServiceName

func (r Redis) ServiceName() string

func (*Redis) SetDefaults

func (r *Redis) SetDefaults(rdVersion *catalog.RedisVersion)

func (*Redis) SetHealthCheckerDefaults

func (r *Redis) SetHealthCheckerDefaults()

func (*Redis) SetTLSDefaults

func (r *Redis) SetTLSDefaults()

func (Redis) ShardNodeTemplate

func (r Redis) ShardNodeTemplate() string

func (Redis) StandbyServiceName

func (r Redis) StandbyServiceName() string

func (Redis) StatsService

func (r Redis) StatsService() mona.StatsAccessor

func (Redis) StatsServiceLabels

func (r Redis) StatsServiceLabels() map[string]string

type RedisCertificateAlias

type RedisCertificateAlias string

+kubebuilder:validation:Enum=server;client;metrics-exporter

const (
	RedisServerCert          RedisCertificateAlias = "server"
	RedisClientCert          RedisCertificateAlias = "client"
	RedisMetricsExporterCert RedisCertificateAlias = "metrics-exporter"
)

type RedisClusterSpec

type RedisClusterSpec struct {
	// Number of shards. It must be >= 3. If not specified, defaults to 3.
	Shards *int32 `json:"shards,omitempty"`

	// Number of replica(s) per shard. If not specified, defaults to 2.
	Replicas *int32 `json:"replicas,omitempty"`
}

func (*RedisClusterSpec) DeepCopy

func (in *RedisClusterSpec) DeepCopy() *RedisClusterSpec

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

func (*RedisClusterSpec) DeepCopyInto

func (in *RedisClusterSpec) DeepCopyInto(out *RedisClusterSpec)

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

type RedisList

type RedisList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	// Items is a list of Redis TPR objects
	Items []Redis `json:"items,omitempty"`
}

func (*RedisList) DeepCopy

func (in *RedisList) DeepCopy() *RedisList

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

func (*RedisList) DeepCopyInto

func (in *RedisList) DeepCopyInto(out *RedisList)

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

func (*RedisList) DeepCopyObject

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

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

type RedisMode

type RedisMode string

+kubebuilder:validation:Enum=Standalone;Cluster;Sentinel

const (
	RedisModeStandalone RedisMode = "Standalone"
	RedisModeCluster    RedisMode = "Cluster"
	RedisModeSentinel   RedisMode = "Sentinel"
)

type RedisSentinel

type RedisSentinel struct {
	metav1.TypeMeta   `json:",inline,omitempty"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	Spec              RedisSentinelSpec   `json:"spec,omitempty"`
	Status            RedisSentinelStatus `json:"status,omitempty"`
}

+kubebuilder:object:root=true +kubebuilder:resource:path=redissentinels,singular=redissentinel,shortName=rds,categories={datastore,kubedb,appscode,all} +kubebuilder:subresource:status +kubebuilder:storageversion +kubebuilder:printcolumn:name="Version",type="string",JSONPath=".spec.version" +kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.phase" +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"

func (RedisSentinel) Address

func (r RedisSentinel) Address() string

func (RedisSentinel) AppBindingMeta

func (rs RedisSentinel) AppBindingMeta() appcat.AppBindingMeta

func (*RedisSentinel) AsOwner

func (rs *RedisSentinel) AsOwner() *metav1.OwnerReference

func (*RedisSentinel) CertificateName

func (rs *RedisSentinel) CertificateName(alias RedisCertificateAlias) string

CertificateName returns the default certificate name and/or certificate secret name for a certificate alias

func (RedisSentinel) ConfigSecretName

func (rs RedisSentinel) ConfigSecretName() string

func (RedisSentinel) CustomResourceDefinition

func (rs RedisSentinel) CustomResourceDefinition() *apiextensions.CustomResourceDefinition

func (*RedisSentinel) DeepCopy

func (in *RedisSentinel) DeepCopy() *RedisSentinel

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

func (*RedisSentinel) DeepCopyInto

func (in *RedisSentinel) DeepCopyInto(out *RedisSentinel)

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

func (*RedisSentinel) DeepCopyObject

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

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

func (RedisSentinel) GetAuthSecretName

func (rs RedisSentinel) GetAuthSecretName() string

func (*RedisSentinel) GetCertSecretName

func (rs *RedisSentinel) GetCertSecretName(alias RedisCertificateAlias) string

GetCertSecretName returns the secret name for a certificate alias if any provide, otherwise returns default certificate secret name for the given alias.

func (*RedisSentinel) GetPersistentSecrets

func (rs *RedisSentinel) GetPersistentSecrets() []string

func (RedisSentinel) GoverningServiceName

func (rs RedisSentinel) GoverningServiceName() string

func (*RedisSentinel) Hub

func (*RedisSentinel) Hub()

func (RedisSentinel) OffshootLabels

func (rs RedisSentinel) OffshootLabels() map[string]string

func (RedisSentinel) OffshootName

func (rs RedisSentinel) OffshootName() string

func (RedisSentinel) OffshootSelectors

func (rs RedisSentinel) OffshootSelectors() map[string]string

func (RedisSentinel) PodControllerLabels

func (rs RedisSentinel) PodControllerLabels() map[string]string

func (RedisSentinel) PodLabels

func (rs RedisSentinel) PodLabels() map[string]string

func (*RedisSentinel) ReplicasAreReady

func (rs *RedisSentinel) ReplicasAreReady(lister pslister.PetSetLister) (bool, string, error)

func (RedisSentinel) ResourceFQN

func (rs RedisSentinel) ResourceFQN() string

func (RedisSentinel) ResourceKind

func (rs RedisSentinel) ResourceKind() string

func (RedisSentinel) ResourcePlural

func (rs RedisSentinel) ResourcePlural() string

func (RedisSentinel) ResourceShortCode

func (rs RedisSentinel) ResourceShortCode() string

func (RedisSentinel) ResourceSingular

func (rs RedisSentinel) ResourceSingular() string

func (RedisSentinel) ServiceLabels

func (rs RedisSentinel) ServiceLabels(alias ServiceAlias, extraLabels ...map[string]string) map[string]string

func (*RedisSentinel) SetDefaults

func (rs *RedisSentinel) SetDefaults(rdVersion *catalog.RedisVersion)

func (*RedisSentinel) SetHealthCheckerDefaults

func (rs *RedisSentinel) SetHealthCheckerDefaults()

func (*RedisSentinel) SetTLSDefaults

func (rs *RedisSentinel) SetTLSDefaults()

func (RedisSentinel) StatsService

func (rs RedisSentinel) StatsService() mona.StatsAccessor

func (RedisSentinel) StatsServiceLabels

func (rs RedisSentinel) StatsServiceLabels() map[string]string

type RedisSentinelList

type RedisSentinelList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	// Items is a list of RedisSentinel TPR objects
	Items []RedisSentinel `json:"items,omitempty"`
}

func (*RedisSentinelList) DeepCopy

func (in *RedisSentinelList) DeepCopy() *RedisSentinelList

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

func (*RedisSentinelList) DeepCopyInto

func (in *RedisSentinelList) DeepCopyInto(out *RedisSentinelList)

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

func (*RedisSentinelList) DeepCopyObject

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

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

type RedisSentinelRef

type RedisSentinelRef struct {
	// Name of the refereed sentinel
	Name string `json:"name,omitempty"`

	// Namespace where refereed sentinel has been deployed
	Namespace string `json:"namespace,omitempty"`
}

func (*RedisSentinelRef) DeepCopy

func (in *RedisSentinelRef) DeepCopy() *RedisSentinelRef

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

func (*RedisSentinelRef) DeepCopyInto

func (in *RedisSentinelRef) DeepCopyInto(out *RedisSentinelRef)

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

type RedisSentinelSpec

type RedisSentinelSpec struct {
	// AutoOps contains configuration of automatic ops-request-recommendation generation
	// +optional
	AutoOps AutoOpsSpec `json:"autoOps,omitempty"`

	// Version of Postgres to be deployed.
	Version string `json:"version"`

	// Number of instances to deploy for a Redis Sentinel.
	Replicas *int32 `json:"replicas,omitempty"`

	// PodTemplate is an optional configuration for pods used to expose database
	// +optional
	PodTemplate ofstv2.PodTemplateSpec `json:"podTemplate,omitempty"`

	// ServiceTemplates is an optional configuration for services used to expose database
	// +optional
	ServiceTemplates []NamedServiceTemplateSpec `json:"serviceTemplates,omitempty"`

	// TLS contains tls configurations for client and server.
	// +optional
	TLS *kmapi.TLSConfig `json:"tls,omitempty"`

	// StorageType can be durable (default) or ephemeral
	StorageType StorageType `json:"storageType,omitempty"`

	// Storage spec to specify how storage shall be used.
	Storage *core.PersistentVolumeClaimSpec `json:"storage,omitempty"`

	// Database authentication secret
	// +optional
	AuthSecret *SecretReference `json:"authSecret,omitempty"`

	// If disable Auth true then don't create any auth secret
	// +optional
	DisableAuth bool `json:"disableAuth,omitempty"`

	// Indicates that the database is halted and all offshoot Kubernetes resources except PVCs are deleted.
	// +optional
	Halted bool `json:"halted,omitempty"`

	// Monitor is used monitor database instance
	// +optional
	Monitor *mona.AgentSpec `json:"monitor,omitempty"`

	// DeletionPolicy controls the delete operation for database
	// +optional
	DeletionPolicy DeletionPolicy `json:"deletionPolicy,omitempty"`

	// HealthChecker defines attributes of the health checker
	// +optional
	// +kubebuilder:default={periodSeconds: 10, timeoutSeconds: 10, failureThreshold: 1}
	HealthChecker kmapi.HealthCheckSpec `json:"healthChecker"`
}

func (*RedisSentinelSpec) DeepCopy

func (in *RedisSentinelSpec) DeepCopy() *RedisSentinelSpec

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

func (*RedisSentinelSpec) DeepCopyInto

func (in *RedisSentinelSpec) DeepCopyInto(out *RedisSentinelSpec)

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

type RedisSentinelStatus

type RedisSentinelStatus struct {
	// Specifies the current phase of the database
	// +optional
	Phase DatabasePhase `json:"phase,omitempty"`
	// observedGeneration is the most recent generation observed for this resource. It corresponds to the
	// resource's generation, which is updated on mutation by the API Server.
	// +optional
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`
	// Conditions applied to the database, such as approval or denial.
	// +optional
	Conditions []kmapi.Condition `json:"conditions,omitempty"`
	// +optional
	AuthSecret *Age `json:"authSecret,omitempty"`
}

func (*RedisSentinelStatus) DeepCopy

func (in *RedisSentinelStatus) DeepCopy() *RedisSentinelStatus

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

func (*RedisSentinelStatus) DeepCopyInto

func (in *RedisSentinelStatus) DeepCopyInto(out *RedisSentinelStatus)

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

type RedisSpec

type RedisSpec struct {
	// AutoOps contains configuration of automatic ops-request-recommendation generation
	// +optional
	AutoOps AutoOpsSpec `json:"autoOps,omitempty"`

	// Version of Redis to be deployed.
	Version string `json:"version"`

	// Number of instances to deploy for a Redis database.
	Replicas *int32 `json:"replicas,omitempty"`

	// Default is "Standalone". If set to "Cluster", ClusterSpec is required and redis servers will
	// start in cluster mode
	Mode RedisMode `json:"mode,omitempty"`

	SentinelRef *RedisSentinelRef `json:"sentinelRef,omitempty"`

	// Redis cluster configuration for running redis servers in cluster mode. Required if Mode is set to "Cluster"
	Cluster *RedisClusterSpec `json:"cluster,omitempty"`

	// StorageType can be durable (default) or ephemeral
	StorageType StorageType `json:"storageType,omitempty"`

	// Storage spec to specify how storage shall be used.
	Storage *core.PersistentVolumeClaimSpec `json:"storage,omitempty"`

	// Database authentication secret
	// +optional
	AuthSecret *SecretReference `json:"authSecret,omitempty"`

	// If disable Auth true then don't create any auth secret
	// +optional
	DisableAuth bool `json:"disableAuth,omitempty"`

	// Init is used to initialize database
	// +optional
	Init *InitSpec `json:"init,omitempty"`

	// Monitor is used monitor database instance
	// +optional
	Monitor *mona.AgentSpec `json:"monitor,omitempty"`

	// ConfigSecret is an optional field to provide custom configuration file for database (i.e redis.conf).
	// If specified, this file will be used as configuration file otherwise default configuration file will be used.
	ConfigSecret *core.LocalObjectReference `json:"configSecret,omitempty"`

	// PodTemplate is an optional configuration for pods used to expose database
	// +optional
	PodTemplate ofstv2.PodTemplateSpec `json:"podTemplate,omitempty"`

	// ServiceTemplates is an optional configuration for services used to expose database
	// +optional
	ServiceTemplates []NamedServiceTemplateSpec `json:"serviceTemplates,omitempty"`

	// TLS contains tls configurations for client and server.
	// +optional
	TLS *kmapi.TLSConfig `json:"tls,omitempty"`

	// Indicates that the database is halted and all offshoot Kubernetes resources except PVCs are deleted.
	// +optional
	Halted bool `json:"halted,omitempty"`

	// DeletionPolicy controls the delete operation for database
	// +optional
	DeletionPolicy DeletionPolicy `json:"deletionPolicy,omitempty"`

	// AllowedSchemas defines the types of database schemas that MAY refer to
	// a database instance and the trusted namespaces where those schema resources MAY be
	// present.
	//
	// +kubebuilder:default={namespaces:{from: Same}}
	// +optional
	AllowedSchemas *AllowedConsumers `json:"allowedSchemas,omitempty"`

	// HealthChecker defines attributes of the health checker
	// +optional
	// +kubebuilder:default={periodSeconds: 10, timeoutSeconds: 10, failureThreshold: 1}
	HealthChecker kmapi.HealthCheckSpec `json:"healthChecker"`
}

func (*RedisSpec) DeepCopy

func (in *RedisSpec) DeepCopy() *RedisSpec

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

func (*RedisSpec) DeepCopyInto

func (in *RedisSpec) DeepCopyInto(out *RedisSpec)

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

func (*RedisSpec) GetPersistentSecrets

func (r *RedisSpec) GetPersistentSecrets() []string

type RedisStatus

type RedisStatus struct {
	// Specifies the current phase of the database
	// +optional
	Phase DatabasePhase `json:"phase,omitempty"`
	// observedGeneration is the most recent generation observed for this resource. It corresponds to the
	// resource's generation, which is updated on mutation by the API Server.
	// +optional
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`
	// Conditions applied to the database, such as approval or denial.
	// +optional
	Conditions []kmapi.Condition `json:"conditions,omitempty"`
	// +optional
	AuthSecret *Age `json:"authSecret,omitempty"`
}

func (*RedisStatus) DeepCopy

func (in *RedisStatus) DeepCopy() *RedisStatus

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

func (*RedisStatus) DeepCopyInto

func (in *RedisStatus) DeepCopyInto(out *RedisStatus)

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

type RemoteReplicaSpec

type RemoteReplicaSpec struct {
	// SourceRef specifies the  source object
	SourceRef core.ObjectReference `json:"sourceRef" protobuf:"bytes,1,opt,name=sourceRef"`
}

func (*RemoteReplicaSpec) DeepCopy

func (in *RemoteReplicaSpec) DeepCopy() *RemoteReplicaSpec

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

func (*RemoteReplicaSpec) DeepCopyInto

func (in *RemoteReplicaSpec) DeepCopyInto(out *RemoteReplicaSpec)

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

type SSLMode

type SSLMode string

SSLMode represents available sslmodes of mongodb. ref: https://docs.mongodb.com/manual/reference/program/mongod/#cmdoption-mongod-sslmode +kubebuilder:validation:Enum=disabled;allowSSL;preferSSL;requireSSL

const (
	// SSLModeDisabled represents `disabled` sslMode. It ensures that the server does not use TLS/SSL.
	SSLModeDisabled SSLMode = "disabled"

	// SSLModeAllowSSL represents `allowSSL` sslMode. It ensures that the connections between servers do not use TLS/SSL. For incoming connections,
	// the server accepts both TLS/SSL and non-TLS/non-SSL.
	SSLModeAllowSSL SSLMode = "allowSSL"

	// SSLModePreferSSL represents `preferSSL` sslMode. It ensures that the connections between servers use TLS/SSL. For incoming connections,
	// the server accepts both TLS/SSL and non-TLS/non-SSL.
	SSLModePreferSSL SSLMode = "preferSSL"

	// SSLModeRequireSSL represents `requiteSSL` sslmode. It ensures that the server uses and accepts only TLS/SSL encrypted connections.
	SSLModeRequireSSL SSLMode = "requireSSL"
)

type ScriptSourceSpec

type ScriptSourceSpec struct {
	ScriptPath        string `json:"scriptPath,omitempty"`
	core.VolumeSource `json:",inline,omitempty"`
	Git               *GitRepo `json:"git,omitempty"`
}

func (*ScriptSourceSpec) DeepCopy

func (in *ScriptSourceSpec) DeepCopy() *ScriptSourceSpec

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

func (*ScriptSourceSpec) DeepCopyInto

func (in *ScriptSourceSpec) DeepCopyInto(out *ScriptSourceSpec)

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

type SecretReference

type SecretReference struct {
	core.LocalObjectReference `json:",inline,omitempty"`
	// Recommendation engine will generate RotateAuth opsReq using this field
	// +optional
	RotateAfter *metav1.Duration `json:"rotateAfter,omitempty"`
	// ActiveFrom holds the RFC3339 time. The referred authSecret is in-use from this timestamp.
	// +optional
	ActiveFrom        *metav1.Time `json:"activeFrom,omitempty"`
	ExternallyManaged bool         `json:"externallyManaged,omitempty"`
}

func (*SecretReference) DeepCopy

func (in *SecretReference) DeepCopy() *SecretReference

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

func (*SecretReference) DeepCopyInto

func (in *SecretReference) DeepCopyInto(out *SecretReference)

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

type SemiSyncSpec

type SemiSyncSpec struct {
	// count of slave to wait for before commit
	// +kubebuilder:default=1
	//+kubebuilder:validation:Minimum=1
	SourceWaitForReplicaCount int `json:"sourceWaitForReplicaCount,omitempty"`
	// +kubebuilder:default="24h"
	SourceTimeout metav1.Duration `json:"sourceTimeout,omitempty"`
	// recovery method if the slave has any errant transaction
	// +kubebuilder:default=PseudoTransaction
	ErrantTransactionRecoveryPolicy *ErrantTransactionRecoveryPolicy `json:"errantTransactionRecoveryPolicy"`
}

func (*SemiSyncSpec) DeepCopy

func (in *SemiSyncSpec) DeepCopy() *SemiSyncSpec

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

func (*SemiSyncSpec) DeepCopyInto

func (in *SemiSyncSpec) DeepCopyInto(out *SemiSyncSpec)

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

type ServiceAlias

type ServiceAlias string

+kubebuilder:validation:Enum=primary;standby;stats

const (
	PrimaryServiceAlias ServiceAlias = "primary"
	StandbyServiceAlias ServiceAlias = "standby"
	StatsServiceAlias   ServiceAlias = "stats"
)

type StorageEngine

type StorageEngine string

StorageEngine represents storage engine of mongodb clusters. ref: https://docs.mongodb.com/manual/core/storage-engines/

const (
	// StorageEngineWiredTiger represents `wiredTiger` storage engine of mongodb.
	StorageEngineWiredTiger StorageEngine = "wiredTiger"

	// StorageEngineInMemory represents `inMemory` storage engine of mongodb.
	StorageEngineInMemory StorageEngine = "inMemory"
)

type StorageType

type StorageType string

+kubebuilder:validation:Enum=Durable;Ephemeral

const (
	// default storage type and requires spec.storage to be configured
	StorageTypeDurable StorageType = "Durable"
	// Uses emptyDir as storage
	StorageTypeEphemeral StorageType = "Ephemeral"
)

type SystemUserSecretsSpec

type SystemUserSecretsSpec struct {
	// ReplicationUserSecret contains replication system user credentials
	// +optional
	ReplicationUserSecret *SecretReference `json:"replicationUserSecret,omitempty"`

	// MonitorUserSecret contains monitor system user credentials
	// +optional
	MonitorUserSecret *SecretReference `json:"monitorUserSecret,omitempty"`
}

func (*SystemUserSecretsSpec) DeepCopy

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

func (*SystemUserSecretsSpec) DeepCopyInto

func (in *SystemUserSecretsSpec) DeepCopyInto(out *SystemUserSecretsSpec)

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

type WALLimitPolicy

type WALLimitPolicy string
const (
	WALKeepSize     WALLimitPolicy = "WALKeepSize"
	ReplicationSlot WALLimitPolicy = "ReplicationSlot"
	WALKeepSegment  WALLimitPolicy = "WALKeepSegment"
)

Jump to

Keyboard shortcuts

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