v1

package
v0.0.0-...-bbbf66a Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: Apache-2.0 Imports: 27 Imported by: 19

Documentation

Overview

Package v1 defines version 1 of the API used with ClickHouse Installation Custom Resources.

Package v1 defines version 1 of the API used with ClickHouse Installation Custom Resources.

Index

Constants

View Source
const (
	ClickHouseInstallationCRDResourceKind         = "ClickHouseInstallation"
	ClickHouseInstallationTemplateCRDResourceKind = "ClickHouseInstallationTemplate"
	ClickHouseOperatorCRDResourceKind             = "ClickHouseOperator"
)

Possible kinds of CRDs

View Source
const (
	TemplatingPolicyAuto   = "auto"
	TemplatingPolicyManual = "manual"
)

Possible templating policies

View Source
const (
	// CommonConfigDir specifies folder's name, where generated common XML files for ClickHouse would be placed
	CommonConfigDir = "config.d"

	// UsersConfigDir specifies folder's name, where generated users XML files for ClickHouse would be placed
	UsersConfigDir = "users.d"

	// HostConfigDir specifies folder's name, where generated host XML files for ClickHouse would be placed
	HostConfigDir = "conf.d"

	// TemplatesDir specifies folder's name where ClickHouseInstallationTemplates are located
	TemplatesDir = "templates.d"
)
View Source
const (

	// ChSchemeHTTP specifies HTTP access scheme
	ChSchemeHTTP = "http"
	// ChSchemeHTTPS specifies HTTPS access scheme
	ChSchemeHTTPS = "https"
	// ChSchemeAuto specifies that operator has to decide itself should https or http be used
	ChSchemeAuto = "auto"

	// DefaultReconcileThreadsWarmup specifies default reconcile threads warmup time
	DefaultReconcileThreadsWarmup = 10 * time.Second

	// DefaultReconcileSystemThreadsNumber specifies default number of system controller threads running concurrently.
	// Used in case no other specified in config
	DefaultReconcileSystemThreadsNumber = 1
)
View Source
const (
	UsernameReplacer = "***"
	PasswordReplacer = "***"
)

Username/password replacers

View Source
const (
	// What to do in case StatefulSet can't reach new Generation - abort CHI reconcile
	OnStatefulSetCreateFailureActionAbort = "abort"

	// What to do in case StatefulSet can't reach new Generation - delete newly created problematic StatefulSet
	OnStatefulSetCreateFailureActionDelete = "delete"

	// What to do in case StatefulSet can't reach new Generation - do nothing, keep StatefulSet broken and move to the next
	OnStatefulSetCreateFailureActionIgnore = "ignore"
)
View Source
const (
	// What to do in case StatefulSet can't reach new Generation - abort CHI reconcile
	OnStatefulSetUpdateFailureActionAbort = "abort"

	// What to do in case StatefulSet can't reach new Generation - delete Pod and rollback StatefulSet to previous Generation
	// Pod would be recreated by StatefulSet based on rollback-ed configuration
	OnStatefulSetUpdateFailureActionRollback = "rollback"

	// What to do in case StatefulSet can't reach new Generation - do nothing, keep StatefulSet broken and move to the next
	OnStatefulSetUpdateFailureActionIgnore = "ignore"
)
View Source
const (
	StatusInProgress  = "InProgress"
	StatusCompleted   = "Completed"
	StatusAborted     = "Aborted"
	StatusTerminating = "Terminating"
)

Possible CHI statuses

View Source
const (
	StringBool0                    = "0"
	StringBool1                    = "1"
	StringBoolFalseFirstCapital    = "False"
	StringBoolFalseLowercase       = "false"
	StringBoolTrueFirstCapital     = "True"
	StringBoolTrueLowercase        = "true"
	StringBoolNoFirstCapital       = "No"
	StringBoolNoLowercase          = "no"
	StringBoolYesFirstCapital      = "Yes"
	StringBoolYesLowercase         = "yes"
	StringBoolOffFirstCapital      = "Off"
	StringBoolOffLowercase         = "off"
	StringBoolOnFirstCapital       = "On"
	StringBoolOnLowercase          = "on"
	StringBoolDisableFirstCapital  = "Disable"
	StringBoolDisableLowercase     = "disable"
	StringBoolEnableFirstCapital   = "Enable"
	StringBoolEnableLowercase      = "enable"
	StringBoolDisabledFirstCapital = "Disabled"
	StringBoolDisabledLowercase    = "disabled"
	StringBoolEnabledFirstCapital  = "Enabled"
	StringBoolEnabledLowercase     = "enabled"
)

Set of string boolean constants

View Source
const (
	ObjectsCleanupUnspecified = "Unspecified"
	ObjectsCleanupRetain      = "Retain"
	ObjectsCleanupDelete      = "Delete"
)

Possible objects cleanup options

View Source
const (
	ReconcilingPolicyUnspecified = "unspecified"
	ReconcilingPolicyWait        = "wait"
	ReconcilingPolicyNoWait      = "nowait"
)

Possible reconcile policy values

View Source
const (
	// APIVersion is the version of the Clickhouse Operator API.
	APIVersion = "v1"
)
View Source
const (
	// PortMayBeAssignedLaterOrLeftUnused value means that port
	// is not assigned yet and is expected to be assigned later.
	PortMayBeAssignedLaterOrLeftUnused = int32(0)
)
View Source
const (
	// RestartRollingUpdate requires to roll over all hosts in the cluster and shutdown and reconcile each of it.
	// This restart policy means that all hosts in the cluster would pass through shutdown/reconcile cycle.
	RestartRollingUpdate = "RollingUpdate"
)

Restart constants present available values for .spec.restart Controlling the operator's Clickhouse instances restart policy

Variables

View Source
var (
	// SchemeGroupVersion is group version used to register these objects
	SchemeGroupVersion = schema.GroupVersion{
		Group:   clickhouse_altinity_com.APIGroupName,
		Version: APIVersion,
	}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{
		GroupVersion: SchemeGroupVersion,
	}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)
View Source
var ErrDataSourceAddressHasIncorrectFormat = fmt.Errorf("data source address has incorrect format")

Functions

func EnsurePortValue

func EnsurePortValue(port int32, value, _default int32) int32

EnsurePortValue ensures port either: - already has own value assigned - or has provided value - or value is fell back to default

func IsPortAssigned

func IsPortAssigned(port int32) bool

IsPortAssigned checks whether port is assigned

func IsPortInvalid

func IsPortInvalid(port int32) bool

IsPortInvalid checks whether port is invalid

func IsPortUnassigned

func IsPortUnassigned(port int32) bool

IsPortUnassigned checks whether port is unassigned

func ListAffectedSettingsPathsFromDiff

func ListAffectedSettingsPathsFromDiff(a, b *Settings, diff *messagediff.Diff, prefix string) (paths []string)

ListAffectedSettingsPathsFromDiff makes list of paths that were modified between two settings prefixed with the specified `prefix` Ex.: `prefix` = file file/setting1 file/setting2

func PortUnassigned

func PortUnassigned() int32

PortUnassigned returns value for unassigned port

func Resource

func Resource(resource string) schema.GroupResource

Resource returns schema.GroupResource

Types

type CHISelector

type CHISelector map[string]string

CHISelector specifies CHI label selector

func (CHISelector) DeepCopy

func (in CHISelector) DeepCopy() CHISelector

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

func (CHISelector) DeepCopyInto

func (in CHISelector) DeepCopyInto(out *CHISelector)

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

func (CHISelector) Matches

func (s CHISelector) Matches(labels map[string]string) bool

Matches checks whether CHISelector matches provided set of labels

type ChiCleanup

type ChiCleanup struct {
	// UnknownObjects specifies cleanup of unknown objects
	UnknownObjects *ChiObjectsCleanup `json:"unknownObjects,omitempty" yaml:"unknownObjects,omitempty"`
	// ReconcileFailedObjects specifies cleanup of failed objects
	ReconcileFailedObjects *ChiObjectsCleanup `json:"reconcileFailedObjects,omitempty" yaml:"reconcileFailedObjects,omitempty"`
}

ChiCleanup defines cleanup

func NewChiCleanup

func NewChiCleanup() *ChiCleanup

NewChiCleanup creates new cleanup

func (*ChiCleanup) DeepCopy

func (in *ChiCleanup) DeepCopy() *ChiCleanup

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

func (*ChiCleanup) DeepCopyInto

func (in *ChiCleanup) DeepCopyInto(out *ChiCleanup)

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

func (*ChiCleanup) DefaultReconcileFailedObjects

func (t *ChiCleanup) DefaultReconcileFailedObjects() *ChiObjectsCleanup

DefaultReconcileFailedObjects makes default cleanup for failed objects

func (*ChiCleanup) DefaultUnknownObjects

func (t *ChiCleanup) DefaultUnknownObjects() *ChiObjectsCleanup

DefaultUnknownObjects makes default cleanup for known objects

func (*ChiCleanup) GetReconcileFailedObjects

func (t *ChiCleanup) GetReconcileFailedObjects() *ChiObjectsCleanup

GetReconcileFailedObjects gets failed objects cleanup

func (*ChiCleanup) GetUnknownObjects

func (t *ChiCleanup) GetUnknownObjects() *ChiObjectsCleanup

GetUnknownObjects gets unknown objects cleanup

func (*ChiCleanup) MergeFrom

func (t *ChiCleanup) MergeFrom(from *ChiCleanup, _type MergeType) *ChiCleanup

MergeFrom merges from specified cleanup

func (*ChiCleanup) SetDefaults

func (t *ChiCleanup) SetDefaults() *ChiCleanup

SetDefaults set defaults for cleanup

type ChiClusterAddress

type ChiClusterAddress struct {
	Namespace    string `json:"namespace,omitempty"    yaml:"namespace,omitempty"`
	CHIName      string `json:"chiName,omitempty"      yaml:"chiName,omitempty"`
	ClusterName  string `json:"clusterName,omitempty"  yaml:"clusterName,omitempty"`
	ClusterIndex int    `json:"clusterIndex,omitempty" yaml:"clusterIndex,omitempty"`
}

ChiClusterAddress defines address of a cluster within ClickHouseInstallation

func (*ChiClusterAddress) DeepCopy

func (in *ChiClusterAddress) DeepCopy() *ChiClusterAddress

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

func (*ChiClusterAddress) DeepCopyInto

func (in *ChiClusterAddress) DeepCopyInto(out *ChiClusterAddress)

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

type ChiClusterLayout

type ChiClusterLayout struct {
	// DEPRECATED - to be removed soon
	Type          string `json:"type,omitempty"          yaml:"type,omitempty"`
	ShardsCount   int    `json:"shardsCount,omitempty"   yaml:"shardsCount,omitempty"`
	ReplicasCount int    `json:"replicasCount,omitempty" yaml:"replicasCount,omitempty"`
	// TODO refactor into map[string]ChiShard
	Shards   []ChiShard   `json:"shards,omitempty"   yaml:"shards,omitempty"`
	Replicas []ChiReplica `json:"replicas,omitempty" yaml:"replicas,omitempty"`

	// Internal data
	// Whether shards or replicas are explicitly specified as Shards []ChiShard or Replicas []ChiReplica
	ShardsSpecified   bool        `json:"-" yaml:"-" testdiff:"ignore"`
	ReplicasSpecified bool        `json:"-" yaml:"-" testdiff:"ignore"`
	HostsField        *HostsField `json:"-" yaml:"-" testdiff:"ignore"`
}

ChiClusterLayout defines layout section of .spec.configuration.clusters

func NewChiClusterLayout

func NewChiClusterLayout() *ChiClusterLayout

NewChiClusterLayout creates new cluster layout

func (*ChiClusterLayout) DeepCopy

func (in *ChiClusterLayout) DeepCopy() *ChiClusterLayout

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

func (*ChiClusterLayout) DeepCopyInto

func (in *ChiClusterLayout) DeepCopyInto(out *ChiClusterLayout)

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

type ChiDefaults

type ChiDefaults struct {
	ReplicasUseFQDN   *StringBool        `json:"replicasUseFQDN,omitempty"    yaml:"replicasUseFQDN,omitempty"`
	DistributedDDL    *ChiDistributedDDL `json:"distributedDDL,omitempty"     yaml:"distributedDDL,omitempty"`
	StorageManagement *StorageManagement `json:"storageManagement,omitempty"  yaml:"storageManagement,omitempty"`
	Templates         *ChiTemplateNames  `json:"templates,omitempty"          yaml:"templates,omitempty"`
}

ChiDefaults defines defaults section of .spec

func NewChiDefaults

func NewChiDefaults() *ChiDefaults

NewChiDefaults creates new ChiDefaults object

func (*ChiDefaults) DeepCopy

func (in *ChiDefaults) DeepCopy() *ChiDefaults

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

func (*ChiDefaults) DeepCopyInto

func (in *ChiDefaults) DeepCopyInto(out *ChiDefaults)

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

func (*ChiDefaults) MergeFrom

func (defaults *ChiDefaults) MergeFrom(from *ChiDefaults, _type MergeType) *ChiDefaults

MergeFrom merges from specified object

type ChiDistributedDDL

type ChiDistributedDDL struct {
	Profile string `json:"profile,omitempty" yaml:"profile"`
}

ChiDistributedDDL defines distributedDDL section of .spec.defaults

func NewChiDistributedDDL

func NewChiDistributedDDL() *ChiDistributedDDL

NewChiDistributedDDL creates new ChiDistributedDDL

func (*ChiDistributedDDL) DeepCopy

func (in *ChiDistributedDDL) DeepCopy() *ChiDistributedDDL

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

func (*ChiDistributedDDL) DeepCopyInto

func (in *ChiDistributedDDL) DeepCopyInto(out *ChiDistributedDDL)

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

func (*ChiDistributedDDL) GetProfile

func (d *ChiDistributedDDL) GetProfile() string

GetProfile gets profile

func (*ChiDistributedDDL) HasProfile

func (d *ChiDistributedDDL) HasProfile() bool

HasProfile checks whether profile is present

func (*ChiDistributedDDL) MergeFrom

func (d *ChiDistributedDDL) MergeFrom(from *ChiDistributedDDL, _type MergeType) *ChiDistributedDDL

MergeFrom merges from specified source

type ChiHost

type ChiHost struct {
	Name string `json:"name,omitempty" yaml:"name,omitempty"`
	// DEPRECATED - to be removed soon
	Port int32 `json:"port,omitempty"  yaml:"port,omitempty"`

	Insecure            *StringBool       `json:"insecure,omitempty"            yaml:"insecure,omitempty"`
	Secure              *StringBool       `json:"secure,omitempty"              yaml:"secure,omitempty"`
	TCPPort             int32             `json:"tcpPort,omitempty"             yaml:"tcpPort,omitempty"`
	TLSPort             int32             `json:"tlsPort,omitempty"             yaml:"tlsPort,omitempty"`
	HTTPPort            int32             `json:"httpPort,omitempty"            yaml:"httpPort,omitempty"`
	HTTPSPort           int32             `json:"httpsPort,omitempty"           yaml:"httpsPort,omitempty"`
	InterserverHTTPPort int32             `json:"interserverHTTPPort,omitempty" yaml:"interserverHTTPPort,omitempty"`
	Settings            *Settings         `json:"settings,omitempty"            yaml:"settings,omitempty"`
	Files               *Settings         `json:"files,omitempty"               yaml:"files,omitempty"`
	Templates           *ChiTemplateNames `json:"templates,omitempty"           yaml:"templates,omitempty"`

	Runtime ChiHostRuntime `json:"-" yaml:"-"`
}

ChiHost defines host (a data replica within a shard) of .spec.configuration.clusters[n].shards[m]

func (*ChiHost) DeepCopy

func (in *ChiHost) DeepCopy() *ChiHost

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

func (*ChiHost) DeepCopyInto

func (in *ChiHost) DeepCopyInto(out *ChiHost)

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

func (*ChiHost) GetAncestor

func (host *ChiHost) GetAncestor() *ChiHost

GetAncestor gets ancestor of a host

func (*ChiHost) GetAncestorCHI

func (host *ChiHost) GetAncestorCHI() *ClickHouseInstallation

GetAncestorCHI gets ancestor of a host

func (*ChiHost) GetCHI

func (host *ChiHost) GetCHI() *ClickHouseInstallation

GetCHI gets CHI

func (*ChiHost) GetCluster

func (host *ChiHost) GetCluster() *Cluster

GetCluster gets cluster

func (*ChiHost) GetHostTemplate

func (host *ChiHost) GetHostTemplate() (*HostTemplate, bool)

GetHostTemplate gets host template

func (*ChiHost) GetName

func (host *ChiHost) GetName() string

GetName gets name

func (*ChiHost) GetPodTemplate

func (host *ChiHost) GetPodTemplate() (*PodTemplate, bool)

GetPodTemplate gets pod template

func (*ChiHost) GetReconcileAttributes

func (host *ChiHost) GetReconcileAttributes() *HostReconcileAttributes

GetReconcileAttributes is an ensurer getter

func (*ChiHost) GetServiceTemplate

func (host *ChiHost) GetServiceTemplate() (*ServiceTemplate, bool)

GetServiceTemplate gets service template

func (*ChiHost) GetSettings

func (host *ChiHost) GetSettings() *Settings

GetSettings gets settings

func (*ChiHost) GetShard

func (host *ChiHost) GetShard() *ChiShard

GetShard gets shard

func (*ChiHost) GetStatefulSetReplicasNum

func (host *ChiHost) GetStatefulSetReplicasNum(shutdown bool) *int32

GetStatefulSetReplicasNum gets stateful set replica num

func (*ChiHost) GetZookeeper

func (host *ChiHost) GetZookeeper() *ChiZookeeperConfig

GetZookeeper gets zookeeper

func (*ChiHost) HasAncestor

func (host *ChiHost) HasAncestor() bool

HasAncestor checks whether host has an ancestor

func (*ChiHost) HasAncestorCHI

func (host *ChiHost) HasAncestorCHI() bool

HasAncestorCHI checks whether host has an ancestor

func (*ChiHost) HasCHI

func (host *ChiHost) HasCHI() bool

HasCHI checks whether host has CHI

func (*ChiHost) HasCurStatefulSet

func (host *ChiHost) HasCurStatefulSet() bool

HasCurStatefulSet checks whether host has CurStatefulSet

func (*ChiHost) HasDesiredStatefulSet

func (host *ChiHost) HasDesiredStatefulSet() bool

HasDesiredStatefulSet checks whether host has DesiredStatefulSet

func (*ChiHost) InheritFilesFrom

func (host *ChiHost) InheritFilesFrom(shard *ChiShard, replica *ChiReplica)

InheritFilesFrom inherits files from specified shard and replica

func (*ChiHost) InheritSettingsFrom

func (host *ChiHost) InheritSettingsFrom(shard *ChiShard, replica *ChiReplica)

InheritSettingsFrom inherits settings from specified shard and replica

func (*ChiHost) InheritTemplatesFrom

func (host *ChiHost) InheritTemplatesFrom(shard *ChiShard, replica *ChiReplica, template *HostTemplate)

InheritTemplatesFrom inherits templates from specified shard and replica

func (*ChiHost) IsFirst

func (host *ChiHost) IsFirst() bool

IsFirst checks whether the host is the first host of the whole CHI

func (*ChiHost) IsInsecure

func (host *ChiHost) IsInsecure() bool

IsInsecure checks whether the host requires insecure communication

func (*ChiHost) IsNewOne

func (host *ChiHost) IsNewOne() bool

IsNewOne checks whether host is a new one TODO unify with model HostIsNewOne

func (*ChiHost) IsSecure

func (host *ChiHost) IsSecure() bool

IsSecure checks whether the host requires secure communication

func (*ChiHost) IsStopped

func (host *ChiHost) IsStopped() bool

IsStopped checks whether host is stopped

func (*ChiHost) MergeFrom

func (host *ChiHost) MergeFrom(from *ChiHost)

MergeFrom merges from specified host

func (*ChiHost) WalkVolumeClaimTemplates

func (host *ChiHost) WalkVolumeClaimTemplates(f func(template *VolumeClaimTemplate))

WalkVolumeClaimTemplates walks VolumeClaimTemplate(s)

func (*ChiHost) WalkVolumeMounts

func (host *ChiHost) WalkVolumeMounts(which WhichStatefulSet, f func(volumeMount *core.VolumeMount))

WalkVolumeMounts walks VolumeMount(s)

type ChiHostAddress

type ChiHostAddress struct {
	Namespace               string `json:"namespace,omitempty"               yaml:"namespace,omitempty"`
	StatefulSet             string `json:"statefulSet,omitempty"             yaml:"statefulSet,omitempty"`
	FQDN                    string `json:"fqdn,omitempty"                    yaml:"fqdn,omitempty"`
	CHIName                 string `json:"chiName,omitempty"                 yaml:"chiName,omitempty"`
	ClusterName             string `json:"clusterName,omitempty"             yaml:"clusterName,omitempty"`
	ClusterIndex            int    `json:"clusterIndex,omitempty"            yaml:"clusterIndex,omitempty"`
	ShardName               string `json:"shardName,omitempty"               yaml:"shardName,omitempty"`
	ShardIndex              int    `json:"shardIndex,omitempty"              yaml:"shardIndex,omitempty"`
	ShardScopeIndex         int    `json:"shardScopeIndex,omitempty"         yaml:"shardScopeIndex,omitempty"`
	ReplicaName             string `json:"replicaName,omitempty"             yaml:"replicaName,omitempty"`
	ReplicaIndex            int    `json:"replicaIndex,omitempty"            yaml:"replicaIndex,omitempty"`
	ReplicaScopeIndex       int    `json:"replicaScopeIndex,omitempty"       yaml:"replicaScopeIndex,omitempty"`
	HostName                string `json:"hostName,omitempty"                yaml:"hostName,omitempty"`
	CHIScopeIndex           int    `json:"chiScopeIndex,omitempty"           yaml:"chiScopeIndex,omitempty"`
	CHIScopeCycleSize       int    `json:"chiScopeCycleSize,omitempty"       yaml:"chiScopeCycleSize,omitempty"`
	CHIScopeCycleIndex      int    `json:"chiScopeCycleIndex,omitempty"      yaml:"chiScopeCycleIndex,omitempty"`
	CHIScopeCycleOffset     int    `json:"chiScopeCycleOffset,omitempty"     yaml:"chiScopeCycleOffset,omitempty"`
	ClusterScopeIndex       int    `json:"clusterScopeIndex,omitempty"       yaml:"clusterScopeIndex,omitempty"`
	ClusterScopeCycleSize   int    `json:"clusterScopeCycleSize,omitempty"   yaml:"clusterScopeCycleSize,omitempty"`
	ClusterScopeCycleIndex  int    `json:"clusterScopeCycleIndex,omitempty"  yaml:"clusterScopeCycleIndex,omitempty"`
	ClusterScopeCycleOffset int    `json:"clusterScopeCycleOffset,omitempty" yaml:"clusterScopeCycleOffset,omitempty"`
}

ChiHostAddress defines address of a host within ClickHouseInstallation

func (ChiHostAddress) ClusterNameString

func (a ChiHostAddress) ClusterNameString() string

ClusterNameString creates cluster+host pair

func (ChiHostAddress) CompactString

func (a ChiHostAddress) CompactString() string

CompactString creates compact string representation

func (*ChiHostAddress) DeepCopy

func (in *ChiHostAddress) DeepCopy() *ChiHostAddress

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

func (*ChiHostAddress) DeepCopyInto

func (in *ChiHostAddress) DeepCopyInto(out *ChiHostAddress)

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

func (ChiHostAddress) NamespaceCHINameString

func (a ChiHostAddress) NamespaceCHINameString() string

NamespaceCHINameString creates namespace+CHI pair

func (ChiHostAddress) NamespaceNameString

func (a ChiHostAddress) NamespaceNameString() string

NamespaceNameString creates namespace+name pair

type ChiHostConfig

type ChiHostConfig struct {
	ZookeeperFingerprint string `json:"zookeeperfingerprint" yaml:"zookeeperfingerprint"`
	SettingsFingerprint  string `json:"settingsfingerprint"  yaml:"settingsfingerprint"`
	FilesFingerprint     string `json:"filesfingerprint"     yaml:"filesfingerprint"`
}

ChiHostConfig defines additional data related to a host

func (*ChiHostConfig) DeepCopy

func (in *ChiHostConfig) DeepCopy() *ChiHostConfig

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

func (*ChiHostConfig) DeepCopyInto

func (in *ChiHostConfig) DeepCopyInto(out *ChiHostConfig)

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

type ChiHostReconcileAttributesCounters

type ChiHostReconcileAttributesCounters struct {
	// contains filtered or unexported fields
}

ChiHostReconcileAttributesCounters defines host reconcile status and attributes counters

func NewChiHostReconcileAttributesCounters

func NewChiHostReconcileAttributesCounters() *ChiHostReconcileAttributesCounters

NewChiHostReconcileAttributesCounters creates new reconcile attributes

func (*ChiHostReconcileAttributesCounters) Add

Add adds to counters provided HostReconcileAttributes

func (*ChiHostReconcileAttributesCounters) DeepCopy

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

func (*ChiHostReconcileAttributesCounters) DeepCopyInto

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

func (*ChiHostReconcileAttributesCounters) GetAdd

GetAdd gets added

func (*ChiHostReconcileAttributesCounters) GetExclude

func (s *ChiHostReconcileAttributesCounters) GetExclude() int

GetExclude gets exclude

func (*ChiHostReconcileAttributesCounters) GetFound

GetFound gets found

func (*ChiHostReconcileAttributesCounters) GetModify

func (s *ChiHostReconcileAttributesCounters) GetModify() int

GetModify gets modified

func (*ChiHostReconcileAttributesCounters) GetRemove

func (s *ChiHostReconcileAttributesCounters) GetRemove() int

GetRemove gets removed

type ChiHostRuntime

type ChiHostRuntime struct {
	// Internal data
	Address ChiHostAddress             `json:"-" yaml:"-"`
	Config  ChiHostConfig              `json:"-" yaml:"-"`
	Version *swversion.SoftWareVersion `json:"-" yaml:"-"`

	// CurStatefulSet is a current stateful set, fetched from k8s
	CurStatefulSet *apps.StatefulSet `json:"-" yaml:"-" testdiff:"ignore"`
	// DesiredStatefulSet is a desired stateful set - reconcile target
	DesiredStatefulSet *apps.StatefulSet       `json:"-" yaml:"-" testdiff:"ignore"`
	CHI                *ClickHouseInstallation `json:"-" yaml:"-" testdiff:"ignore"`
	// contains filtered or unexported fields
}

func (*ChiHostRuntime) DeepCopy

func (in *ChiHostRuntime) DeepCopy() *ChiHostRuntime

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

func (*ChiHostRuntime) DeepCopyInto

func (in *ChiHostRuntime) DeepCopyInto(out *ChiHostRuntime)

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

type ChiObjectsCleanup

type ChiObjectsCleanup struct {
	StatefulSet string `json:"statefulSet,omitempty" yaml:"statefulSet,omitempty"`
	PVC         string `json:"pvc,omitempty"         yaml:"pvc,omitempty"`
	ConfigMap   string `json:"configMap,omitempty"   yaml:"configMap,omitempty"`
	Service     string `json:"service,omitempty"     yaml:"service,omitempty"`
	Secret      string `json:"secret,omitempty"      yaml:"secret,omitempty"`
}

ChiObjectsCleanup specifies object cleanup struct

func NewChiObjectsCleanup

func NewChiObjectsCleanup() *ChiObjectsCleanup

NewChiObjectsCleanup creates new object cleanup

func (*ChiObjectsCleanup) DeepCopy

func (in *ChiObjectsCleanup) DeepCopy() *ChiObjectsCleanup

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

func (*ChiObjectsCleanup) DeepCopyInto

func (in *ChiObjectsCleanup) DeepCopyInto(out *ChiObjectsCleanup)

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

func (*ChiObjectsCleanup) GetConfigMap

func (c *ChiObjectsCleanup) GetConfigMap() string

GetConfigMap gets config map

func (*ChiObjectsCleanup) GetPVC

func (c *ChiObjectsCleanup) GetPVC() string

GetPVC gets PVC

func (*ChiObjectsCleanup) GetSecret

func (c *ChiObjectsCleanup) GetSecret() string

GetSecret gets secret

func (*ChiObjectsCleanup) GetService

func (c *ChiObjectsCleanup) GetService() string

GetService gets service

func (*ChiObjectsCleanup) GetStatefulSet

func (c *ChiObjectsCleanup) GetStatefulSet() string

GetStatefulSet gets stateful set

func (*ChiObjectsCleanup) MergeFrom

func (c *ChiObjectsCleanup) MergeFrom(from *ChiObjectsCleanup, _type MergeType) *ChiObjectsCleanup

MergeFrom merges from specified cleanup

func (*ChiObjectsCleanup) SetConfigMap

func (c *ChiObjectsCleanup) SetConfigMap(v string) *ChiObjectsCleanup

SetConfigMap sets config map

func (*ChiObjectsCleanup) SetPVC

SetPVC sets PVC

func (*ChiObjectsCleanup) SetSecret

func (c *ChiObjectsCleanup) SetSecret(v string) *ChiObjectsCleanup

SetSecret sets service

func (*ChiObjectsCleanup) SetService

func (c *ChiObjectsCleanup) SetService(v string) *ChiObjectsCleanup

SetService sets service

func (*ChiObjectsCleanup) SetStatefulSet

func (c *ChiObjectsCleanup) SetStatefulSet(v string) *ChiObjectsCleanup

SetStatefulSet sets stateful set

type ChiReconciling

type ChiReconciling struct {
	// About to be DEPRECATED
	Policy string `json:"policy,omitempty" yaml:"policy,omitempty"`
	// ConfigMapPropagationTimeout specifies timeout for ConfigMap to propagate
	ConfigMapPropagationTimeout int `json:"configMapPropagationTimeout,omitempty" yaml:"configMapPropagationTimeout,omitempty"`
	// Cleanup specifies cleanup behavior
	Cleanup *ChiCleanup `json:"cleanup,omitempty" yaml:"cleanup,omitempty"`
}

ChiReconciling defines CHI reconciling struct

func NewChiReconciling

func NewChiReconciling() *ChiReconciling

NewChiReconciling creates new reconciling

func (*ChiReconciling) DeepCopy

func (in *ChiReconciling) DeepCopy() *ChiReconciling

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

func (*ChiReconciling) DeepCopyInto

func (in *ChiReconciling) DeepCopyInto(out *ChiReconciling)

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

func (*ChiReconciling) GetCleanup

func (t *ChiReconciling) GetCleanup() *ChiCleanup

GetCleanup gets cleanup

func (*ChiReconciling) GetConfigMapPropagationTimeout

func (t *ChiReconciling) GetConfigMapPropagationTimeout() int

GetConfigMapPropagationTimeout gets config map propagation timeout

func (*ChiReconciling) GetConfigMapPropagationTimeoutDuration

func (t *ChiReconciling) GetConfigMapPropagationTimeoutDuration() time.Duration

GetConfigMapPropagationTimeoutDuration gets config map propagation timeout duration

func (*ChiReconciling) GetPolicy

func (t *ChiReconciling) GetPolicy() string

GetPolicy gets policy

func (*ChiReconciling) IsReconcilingPolicyNoWait

func (t *ChiReconciling) IsReconcilingPolicyNoWait() bool

IsReconcilingPolicyNoWait checks whether reconcile policy is "no wait"

func (*ChiReconciling) IsReconcilingPolicyWait

func (t *ChiReconciling) IsReconcilingPolicyWait() bool

IsReconcilingPolicyWait checks whether reconcile policy is "wait"

func (*ChiReconciling) MergeFrom

func (t *ChiReconciling) MergeFrom(from *ChiReconciling, _type MergeType) *ChiReconciling

MergeFrom merges from specified reconciling

func (*ChiReconciling) SetConfigMapPropagationTimeout

func (t *ChiReconciling) SetConfigMapPropagationTimeout(timeout int)

SetConfigMapPropagationTimeout sets config map propagation timeout

func (*ChiReconciling) SetDefaults

func (t *ChiReconciling) SetDefaults() *ChiReconciling

SetDefaults set default values for reconciling

func (*ChiReconciling) SetPolicy

func (t *ChiReconciling) SetPolicy(p string)

SetPolicy sets policy

type ChiReplica

type ChiReplica struct {
	Name        string            `json:"name,omitempty"        yaml:"name,omitempty"`
	Settings    *Settings         `json:"settings,omitempty"    yaml:"settings,omitempty"`
	Files       *Settings         `json:"files,omitempty"       yaml:"files,omitempty"`
	Templates   *ChiTemplateNames `json:"templates,omitempty"   yaml:"templates,omitempty"`
	ShardsCount int               `json:"shardsCount,omitempty" yaml:"shardsCount,omitempty"`
	// TODO refactor into map[string]ChiHost
	Hosts []*ChiHost `json:"shards,omitempty" yaml:"shards,omitempty"`

	Runtime ChiReplicaRuntime `json:"-" yaml:"-"`
}

ChiReplica defines item of a replica section of .spec.configuration.clusters[n].replicas TODO unify with ChiShard based on HostsSet

func (*ChiReplica) DeepCopy

func (in *ChiReplica) DeepCopy() *ChiReplica

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

func (*ChiReplica) DeepCopyInto

func (in *ChiReplica) DeepCopyInto(out *ChiReplica)

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

func (*ChiReplica) GetServiceTemplate

func (replica *ChiReplica) GetServiceTemplate() (*ServiceTemplate, bool)

GetServiceTemplate gets service template

func (*ChiReplica) HasShardsCount

func (replica *ChiReplica) HasShardsCount() bool

HasShardsCount checks whether replica has shards count specified

func (*ChiReplica) HostsCount

func (replica *ChiReplica) HostsCount() int

HostsCount returns number of hosts

func (*ChiReplica) InheritFilesFrom

func (replica *ChiReplica) InheritFilesFrom(cluster *Cluster)

InheritFilesFrom inherits files from specified cluster

func (*ChiReplica) InheritSettingsFrom

func (replica *ChiReplica) InheritSettingsFrom(cluster *Cluster)

InheritSettingsFrom inherits settings from specified cluster

func (*ChiReplica) InheritTemplatesFrom

func (replica *ChiReplica) InheritTemplatesFrom(cluster *Cluster)

InheritTemplatesFrom inherits templates from specified cluster

func (*ChiReplica) WalkHosts

func (replica *ChiReplica) WalkHosts(f func(host *ChiHost) error) []error

WalkHosts walks over hosts

type ChiReplicaAddress

type ChiReplicaAddress struct {
	Namespace    string `json:"namespace,omitempty"    yaml:"namespace,omitempty"`
	CHIName      string `json:"chiName,omitempty"      yaml:"chiName,omitempty"`
	ClusterName  string `json:"clusterName,omitempty"  yaml:"clusterName,omitempty"`
	ClusterIndex int    `json:"clusterIndex,omitempty" yaml:"clusterIndex,omitempty"`
	ReplicaName  string `json:"replicaName,omitempty"  yaml:"replicaName,omitempty"`
	ReplicaIndex int    `json:"replicaIndex,omitempty" yaml:"replicaIndex,omitempty"`
}

ChiReplicaAddress defines address of a replica within ClickHouseInstallation

func (*ChiReplicaAddress) DeepCopy

func (in *ChiReplicaAddress) DeepCopy() *ChiReplicaAddress

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

func (*ChiReplicaAddress) DeepCopyInto

func (in *ChiReplicaAddress) DeepCopyInto(out *ChiReplicaAddress)

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

type ChiReplicaRuntime

type ChiReplicaRuntime struct {
	Address ChiReplicaAddress       `json:"-" yaml:"-"`
	CHI     *ClickHouseInstallation `json:"-" yaml:"-" testdiff:"ignore"`
}

func (*ChiReplicaRuntime) DeepCopy

func (in *ChiReplicaRuntime) DeepCopy() *ChiReplicaRuntime

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

func (*ChiReplicaRuntime) DeepCopyInto

func (in *ChiReplicaRuntime) DeepCopyInto(out *ChiReplicaRuntime)

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

type ChiShard

type ChiShard struct {
	Name                string            `json:"name,omitempty"                yaml:"name,omitempty"`
	Weight              *int              `json:"weight,omitempty"              yaml:"weight,omitempty"`
	InternalReplication *StringBool       `json:"internalReplication,omitempty" yaml:"internalReplication,omitempty"`
	Settings            *Settings         `json:"settings,omitempty"            yaml:"settings,omitempty"`
	Files               *Settings         `json:"files,omitempty"               yaml:"files,omitempty"`
	Templates           *ChiTemplateNames `json:"templates,omitempty"           yaml:"templates,omitempty"`
	ReplicasCount       int               `json:"replicasCount,omitempty"       yaml:"replicasCount,omitempty"`
	// TODO refactor into map[string]ChiHost
	Hosts []*ChiHost `json:"replicas,omitempty" yaml:"replicas,omitempty"`

	Runtime ChiShardRuntime `json:"-" yaml:"-"`

	// DefinitionType is DEPRECATED - to be removed soon
	DefinitionType string `json:"definitionType,omitempty" yaml:"definitionType,omitempty"`
}

ChiShard defines item of a shard section of .spec.configuration.clusters[n].shards TODO unify with ChiReplica based on HostsSet

func (*ChiShard) DeepCopy

func (in *ChiShard) DeepCopy() *ChiShard

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

func (*ChiShard) DeepCopyInto

func (in *ChiShard) DeepCopyInto(out *ChiShard)

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

func (*ChiShard) FindHost

func (shard *ChiShard) FindHost(needle interface{}) (res *ChiHost)

FindHost finds host by name or index. Expectations: name is expected to be a string, index is expected to be an int.

func (*ChiShard) FirstHost

func (shard *ChiShard) FirstHost() *ChiHost

FirstHost finds first host in the shard

func (*ChiShard) GetCHI

func (shard *ChiShard) GetCHI() *ClickHouseInstallation

GetCHI gets CHI of the shard

func (*ChiShard) GetCluster

func (shard *ChiShard) GetCluster() *Cluster

GetCluster gets cluster of the shard

func (*ChiShard) GetServiceTemplate

func (shard *ChiShard) GetServiceTemplate() (*ServiceTemplate, bool)

GetServiceTemplate gets service template

func (*ChiShard) GetWeight

func (shard *ChiShard) GetWeight() int

GetWeight gets weight

func (*ChiShard) HasReplicasCount

func (shard *ChiShard) HasReplicasCount() bool

HasReplicasCount checks whether shard has replicas count specified

func (*ChiShard) HasWeight

func (shard *ChiShard) HasWeight() bool

HasWeight checks whether shard has applicable weight value specified

func (*ChiShard) HostsCount

func (shard *ChiShard) HostsCount() int

HostsCount returns count of hosts in the shard

func (*ChiShard) InheritFilesFrom

func (shard *ChiShard) InheritFilesFrom(cluster *Cluster)

InheritFilesFrom inherits files from specified cluster

func (*ChiShard) InheritSettingsFrom

func (shard *ChiShard) InheritSettingsFrom(cluster *Cluster)

InheritSettingsFrom inherits settings from specified cluster

func (*ChiShard) InheritTemplatesFrom

func (shard *ChiShard) InheritTemplatesFrom(cluster *Cluster)

InheritTemplatesFrom inherits templates from specified cluster

func (*ChiShard) WalkHosts

func (shard *ChiShard) WalkHosts(f func(host *ChiHost) error) []error

WalkHosts runs specified function on each host

type ChiShardAddress

type ChiShardAddress struct {
	Namespace    string `json:"namespace,omitempty"    yaml:"namespace,omitempty"`
	CHIName      string `json:"chiName,omitempty"      yaml:"chiName,omitempty"`
	ClusterName  string `json:"clusterName,omitempty"  yaml:"clusterName,omitempty"`
	ClusterIndex int    `json:"clusterIndex,omitempty" yaml:"clusterIndex,omitempty"`
	ShardName    string `json:"shardName,omitempty"    yaml:"shardName,omitempty"`
	ShardIndex   int    `json:"shardIndex,omitempty"   yaml:"shardIndex,omitempty"`
}

ChiShardAddress defines address of a shard within ClickHouseInstallation

func (*ChiShardAddress) DeepCopy

func (in *ChiShardAddress) DeepCopy() *ChiShardAddress

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

func (*ChiShardAddress) DeepCopyInto

func (in *ChiShardAddress) DeepCopyInto(out *ChiShardAddress)

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

type ChiShardRuntime

type ChiShardRuntime struct {
	Address ChiShardAddress         `json:"-" yaml:"-"`
	CHI     *ClickHouseInstallation `json:"-" yaml:"-" testdiff:"ignore"`
}

func (*ChiShardRuntime) DeepCopy

func (in *ChiShardRuntime) DeepCopy() *ChiShardRuntime

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

func (*ChiShardRuntime) DeepCopyInto

func (in *ChiShardRuntime) DeepCopyInto(out *ChiShardRuntime)

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

type ChiSpec

type ChiSpec struct {
	TaskID                 *string         `json:"taskID,omitempty"                 yaml:"taskID,omitempty"`
	Stop                   *StringBool     `json:"stop,omitempty"                   yaml:"stop,omitempty"`
	Restart                string          `json:"restart,omitempty"                yaml:"restart,omitempty"`
	Troubleshoot           *StringBool     `json:"troubleshoot,omitempty"           yaml:"troubleshoot,omitempty"`
	NamespaceDomainPattern string          `json:"namespaceDomainPattern,omitempty" yaml:"namespaceDomainPattern,omitempty"`
	Templating             *ChiTemplating  `json:"templating,omitempty"             yaml:"templating,omitempty"`
	Reconciling            *ChiReconciling `json:"reconciling,omitempty"            yaml:"reconciling,omitempty"`
	Defaults               *ChiDefaults    `json:"defaults,omitempty"               yaml:"defaults,omitempty"`
	Configuration          *Configuration  `json:"configuration,omitempty"          yaml:"configuration,omitempty"`
	Templates              *Templates      `json:"templates,omitempty"              yaml:"templates,omitempty"`
	UseTemplates           []*TemplateRef  `json:"useTemplates,omitempty"           yaml:"useTemplates,omitempty"`
}

ChiSpec defines spec section of ClickHouseInstallation resource

func (*ChiSpec) DeepCopy

func (in *ChiSpec) DeepCopy() *ChiSpec

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

func (*ChiSpec) DeepCopyInto

func (in *ChiSpec) DeepCopyInto(out *ChiSpec)

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

func (*ChiSpec) GetTaskID

func (spec *ChiSpec) GetTaskID() string

GetTaskID gets task id as a string

func (*ChiSpec) HasTaskID

func (spec *ChiSpec) HasTaskID() bool

HasTaskID checks whether task id is specified

func (*ChiSpec) MergeFrom

func (spec *ChiSpec) MergeFrom(from *ChiSpec, _type MergeType)

MergeFrom merges from spec

type ChiStatus

type ChiStatus struct {
	CHOpVersion            string                  `json:"chop-version,omitempty"           yaml:"chop-version,omitempty"`
	CHOpCommit             string                  `json:"chop-commit,omitempty"            yaml:"chop-commit,omitempty"`
	CHOpDate               string                  `json:"chop-date,omitempty"              yaml:"chop-date,omitempty"`
	CHOpIP                 string                  `json:"chop-ip,omitempty"                yaml:"chop-ip,omitempty"`
	ClustersCount          int                     `json:"clusters,omitempty"               yaml:"clusters,omitempty"`
	ShardsCount            int                     `json:"shards,omitempty"                 yaml:"shards,omitempty"`
	ReplicasCount          int                     `json:"replicas,omitempty"               yaml:"replicas,omitempty"`
	HostsCount             int                     `json:"hosts,omitempty"                  yaml:"hosts,omitempty"`
	Status                 string                  `json:"status,omitempty"                 yaml:"status,omitempty"`
	TaskID                 string                  `json:"taskID,omitempty"                 yaml:"taskID,omitempty"`
	TaskIDsStarted         []string                `json:"taskIDsStarted,omitempty"         yaml:"taskIDsStarted,omitempty"`
	TaskIDsCompleted       []string                `json:"taskIDsCompleted,omitempty"       yaml:"taskIDsCompleted,omitempty"`
	Action                 string                  `json:"action,omitempty"                 yaml:"action,omitempty"`
	Actions                []string                `json:"actions,omitempty"                yaml:"actions,omitempty"`
	Error                  string                  `json:"error,omitempty"                  yaml:"error,omitempty"`
	Errors                 []string                `json:"errors,omitempty"                 yaml:"errors,omitempty"`
	HostsUpdatedCount      int                     `json:"hostsUpdated,omitempty"           yaml:"hostsUpdated,omitempty"`
	HostsAddedCount        int                     `json:"hostsAdded,omitempty"             yaml:"hostsAdded,omitempty"`
	HostsUnchangedCount    int                     `json:"hostsUnchanged,omitempty"         yaml:"hostsUnchanged,omitempty"`
	HostsFailedCount       int                     `json:"hostsFailed,omitempty"            yaml:"hostsFailed,omitempty"`
	HostsCompletedCount    int                     `json:"hostsCompleted,omitempty"         yaml:"hostsCompleted,omitempty"`
	HostsDeletedCount      int                     `json:"hostsDeleted,omitempty"           yaml:"hostsDeleted,omitempty"`
	HostsDeleteCount       int                     `json:"hostsDelete,omitempty"            yaml:"hostsDelete,omitempty"`
	Pods                   []string                `json:"pods,omitempty"                   yaml:"pods,omitempty"`
	PodIPs                 []string                `json:"pod-ips,omitempty"                yaml:"pod-ips,omitempty"`
	FQDNs                  []string                `json:"fqdns,omitempty"                  yaml:"fqdns,omitempty"`
	Endpoint               string                  `json:"endpoint,omitempty"               yaml:"endpoint,omitempty"`
	NormalizedCHI          *ClickHouseInstallation `json:"normalized,omitempty"             yaml:"normalized,omitempty"`
	NormalizedCHICompleted *ClickHouseInstallation `json:"normalizedCompleted,omitempty"    yaml:"normalizedCompleted,omitempty"`
	HostsWithTablesCreated []string                `json:"hostsWithTablesCreated,omitempty" yaml:"hostsWithTablesCreated,omitempty"`
	UsedTemplates          []*TemplateRef          `json:"usedTemplates,omitempty"          yaml:"usedTemplates,omitempty"`
	// contains filtered or unexported fields
}

ChiStatus defines status section of ClickHouseInstallation resource.

Note: application level reads and writes to ChiStatus fields should be done through synchronized getter/setter functions. While all of these fields need to be exported for JSON and YAML serialization/deserialization, we can at least audit that application logic sticks to the synchronized getter/setters by auditing whether all explicit Go field-level accesses are strictly within _this_ source file OR the generated deep copy source file.

func (*ChiStatus) ClearNormalizedCHI

func (s *ChiStatus) ClearNormalizedCHI()

ClearNormalizedCHI clears normalized CHI in status

func (*ChiStatus) CopyFrom

func (s *ChiStatus) CopyFrom(f *ChiStatus, opts CopyCHIStatusOptions)

CopyFrom copies the state of a given ChiStatus f into the receiver ChiStatus of the call.

func (*ChiStatus) DeepCopy

func (in *ChiStatus) DeepCopy() *ChiStatus

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

func (*ChiStatus) DeepCopyInto

func (in *ChiStatus) DeepCopyInto(out *ChiStatus)

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

func (*ChiStatus) DeleteStart

func (s *ChiStatus) DeleteStart()

DeleteStart marks deletion start

func (*ChiStatus) Fill

func (s *ChiStatus) Fill(params *FillStatusParams)

Fill is a synchronized setter for a fairly large number of fields. We take a struct type "params" argument to avoid confusion of similarly typed positional arguments, and to avoid defining a lot of separate synchronized setters for these fields that are typically all set together at once (during "fills").

func (*ChiStatus) GetAction

func (s *ChiStatus) GetAction() string

GetAction gets last action

func (*ChiStatus) GetActions

func (s *ChiStatus) GetActions() []string

GetActions gets all actions

func (*ChiStatus) GetCHOpCommit

func (s *ChiStatus) GetCHOpCommit() string

GetCHOpCommit gets operator build commit

func (*ChiStatus) GetCHOpDate

func (s *ChiStatus) GetCHOpDate() string

GetCHOpDate gets operator build date

func (*ChiStatus) GetCHOpIP

func (s *ChiStatus) GetCHOpIP() string

GetCHOpIP gets operator pod's IP

func (*ChiStatus) GetCHOpVersion

func (s *ChiStatus) GetCHOpVersion() string

GetCHOpVersion gets operator version

func (*ChiStatus) GetClustersCount

func (s *ChiStatus) GetClustersCount() int

GetClustersCount gets clusters count

func (*ChiStatus) GetEndpoint

func (s *ChiStatus) GetEndpoint() string

GetEndpoint gets API endpoint

func (*ChiStatus) GetError

func (s *ChiStatus) GetError() string

GetError gets last error

func (*ChiStatus) GetErrors

func (s *ChiStatus) GetErrors() []string

GetErrors gets all errors

func (*ChiStatus) GetFQDNs

func (s *ChiStatus) GetFQDNs() []string

GetFQDNs gets list of all FQDNs of hosts

func (*ChiStatus) GetHostsAddedCount

func (s *ChiStatus) GetHostsAddedCount() int

GetHostsAddedCount gets added hosts counter

func (*ChiStatus) GetHostsCompletedCount

func (s *ChiStatus) GetHostsCompletedCount() int

GetHostsCompletedCount gets completed hosts counter

func (*ChiStatus) GetHostsCount

func (s *ChiStatus) GetHostsCount() int

GetHostsCount gets hosts count

func (*ChiStatus) GetHostsDeleteCount

func (s *ChiStatus) GetHostsDeleteCount() int

GetHostsDeleteCount gets hosts to be deleted counter

func (*ChiStatus) GetHostsDeletedCount

func (s *ChiStatus) GetHostsDeletedCount() int

GetHostsDeletedCount gets deleted hosts counter

func (*ChiStatus) GetHostsFailedCount

func (s *ChiStatus) GetHostsFailedCount() int

GetHostsFailedCount gets failed hosts counter

func (*ChiStatus) GetHostsUnchangedCount

func (s *ChiStatus) GetHostsUnchangedCount() int

GetHostsUnchangedCount gets unchanged hosts counter

func (*ChiStatus) GetHostsUpdatedCount

func (s *ChiStatus) GetHostsUpdatedCount() int

GetHostsUpdatedCount gets updated hosts counter

func (*ChiStatus) GetHostsWithTablesCreated

func (s *ChiStatus) GetHostsWithTablesCreated() []string

GetHostsWithTablesCreated gets hosts with created tables

func (*ChiStatus) GetNormalizedCHI

func (s *ChiStatus) GetNormalizedCHI() *ClickHouseInstallation

GetNormalizedCHI gets target CHI

func (*ChiStatus) GetNormalizedCHICompleted

func (s *ChiStatus) GetNormalizedCHICompleted() *ClickHouseInstallation

GetNormalizedCHICompleted gets completed CHI

func (*ChiStatus) GetPodIPs

func (s *ChiStatus) GetPodIPs() []string

GetPodIPs gets list of pod ips

func (*ChiStatus) GetPods

func (s *ChiStatus) GetPods() []string

GetPods gets list of pods

func (*ChiStatus) GetReplicasCount

func (s *ChiStatus) GetReplicasCount() int

GetReplicasCount gets replicas count

func (*ChiStatus) GetShardsCount

func (s *ChiStatus) GetShardsCount() int

GetShardsCount gets shards count

func (*ChiStatus) GetStatus

func (s *ChiStatus) GetStatus() string

GetStatus gets status

func (*ChiStatus) GetTaskID

func (s *ChiStatus) GetTaskID() string

GetTaskID gets task ipd

func (*ChiStatus) GetTaskIDsCompleted

func (s *ChiStatus) GetTaskIDsCompleted() []string

GetTaskIDsCompleted gets completed task id

func (*ChiStatus) GetTaskIDsStarted

func (s *ChiStatus) GetTaskIDsStarted() []string

GetTaskIDsStarted gets started task id

func (*ChiStatus) GetUsedTemplatesCount

func (s *ChiStatus) GetUsedTemplatesCount() int

GetUsedTemplatesCount gets used templates count

func (*ChiStatus) HasNormalizedCHI

func (s *ChiStatus) HasNormalizedCHI() bool

HasNormalizedCHI is a checker

func (*ChiStatus) HasNormalizedCHICompleted

func (s *ChiStatus) HasNormalizedCHICompleted() bool

HasNormalizedCHICompleted is a checker

func (*ChiStatus) HostAdded

func (s *ChiStatus) HostAdded()

HostAdded increments added hosts counter

func (*ChiStatus) HostCompleted

func (s *ChiStatus) HostCompleted()

HostCompleted increments completed hosts counter

func (*ChiStatus) HostDeleted

func (s *ChiStatus) HostDeleted()

HostDeleted increments deleted hosts counter

func (*ChiStatus) HostFailed

func (s *ChiStatus) HostFailed()

HostFailed increments failed hosts counter

func (*ChiStatus) HostUnchanged

func (s *ChiStatus) HostUnchanged()

HostUnchanged increments unchanged hosts counter

func (*ChiStatus) HostUpdated

func (s *ChiStatus) HostUpdated()

HostUpdated increments updated hosts counter

func (*ChiStatus) PushAction

func (s *ChiStatus) PushAction(action string)

PushAction pushes action into status

func (*ChiStatus) PushError

func (s *ChiStatus) PushError(error string)

PushError sets and pushes error into status

func (*ChiStatus) PushHostTablesCreated

func (s *ChiStatus) PushHostTablesCreated(host string)

PushHostTablesCreated pushes host to the list of hosts with created tables

func (*ChiStatus) PushUsedTemplate

func (s *ChiStatus) PushUsedTemplate(templateRef *TemplateRef)

PushUsedTemplate pushes used template to the list of used templates

func (*ChiStatus) ReconcileAbort

func (s *ChiStatus) ReconcileAbort()

ReconcileAbort marks reconcile abortion

func (*ChiStatus) ReconcileComplete

func (s *ChiStatus) ReconcileComplete()

ReconcileComplete marks reconcile completion

func (*ChiStatus) ReconcileStart

func (s *ChiStatus) ReconcileStart(deleteHostsCount int)

ReconcileStart marks reconcile start

func (*ChiStatus) SetAction

func (s *ChiStatus) SetAction(action string)

SetAction action setter

func (*ChiStatus) SetAndPushError

func (s *ChiStatus) SetAndPushError(err string)

SetAndPushError sets and pushes error into status

func (*ChiStatus) SetError

func (s *ChiStatus) SetError(err string)

SetError sets status error

func (*ChiStatus) SetNormalizedCompletedFromCurrentNormalized

func (s *ChiStatus) SetNormalizedCompletedFromCurrentNormalized()

SetNormalizedCompletedFromCurrentNormalized sets completed CHI from current CHI

func (*ChiStatus) SetPodIPs

func (s *ChiStatus) SetPodIPs(podIPs []string)

SetPodIPs sets pod IPs

func (*ChiStatus) SyncHostTablesCreated

func (s *ChiStatus) SyncHostTablesCreated()

SyncHostTablesCreated syncs list of hosts with tables created with actual list of hosts

type ChiTemplateNames

type ChiTemplateNames struct {
	HostTemplate            string `json:"hostTemplate,omitempty"            yaml:"hostTemplate,omitempty"`
	PodTemplate             string `json:"podTemplate,omitempty"             yaml:"podTemplate,omitempty"`
	DataVolumeClaimTemplate string `json:"dataVolumeClaimTemplate,omitempty" yaml:"dataVolumeClaimTemplate,omitempty"`
	LogVolumeClaimTemplate  string `json:"logVolumeClaimTemplate,omitempty"  yaml:"logVolumeClaimTemplate,omitempty"`
	ServiceTemplate         string `json:"serviceTemplate,omitempty"         yaml:"serviceTemplate,omitempty"`
	ClusterServiceTemplate  string `json:"clusterServiceTemplate,omitempty"  yaml:"clusterServiceTemplate,omitempty"`
	ShardServiceTemplate    string `json:"shardServiceTemplate,omitempty"    yaml:"shardServiceTemplate,omitempty"`
	ReplicaServiceTemplate  string `json:"replicaServiceTemplate,omitempty"  yaml:"replicaServiceTemplate,omitempty"`

	// VolumeClaimTemplate is deprecated in favor of DataVolumeClaimTemplate and LogVolumeClaimTemplate
	// !!! DEPRECATED !!!
	VolumeClaimTemplate string `json:"volumeClaimTemplate,omitempty"     yaml:"volumeClaimTemplate,omitempty"`
}

ChiTemplateNames defines references to .spec.templates to be used on current level of cluster

func NewChiTemplateNames

func NewChiTemplateNames() *ChiTemplateNames

NewChiTemplateNames creates new ChiTemplateNames object

func (*ChiTemplateNames) DeepCopy

func (in *ChiTemplateNames) DeepCopy() *ChiTemplateNames

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

func (*ChiTemplateNames) DeepCopyInto

func (in *ChiTemplateNames) DeepCopyInto(out *ChiTemplateNames)

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

func (*ChiTemplateNames) GetClusterServiceTemplate

func (templateNames *ChiTemplateNames) GetClusterServiceTemplate() string

GetClusterServiceTemplate gets cluster service template

func (*ChiTemplateNames) GetDataVolumeClaimTemplate

func (templateNames *ChiTemplateNames) GetDataVolumeClaimTemplate() string

GetDataVolumeClaimTemplate gets data volume claim template

func (*ChiTemplateNames) GetHostTemplate

func (templateNames *ChiTemplateNames) GetHostTemplate() string

GetHostTemplate gets host template

func (*ChiTemplateNames) GetLogVolumeClaimTemplate

func (templateNames *ChiTemplateNames) GetLogVolumeClaimTemplate() string

GetLogVolumeClaimTemplate gets log volume claim template

func (*ChiTemplateNames) GetPodTemplate

func (templateNames *ChiTemplateNames) GetPodTemplate() string

GetPodTemplate gets pod template

func (*ChiTemplateNames) GetReplicaServiceTemplate

func (templateNames *ChiTemplateNames) GetReplicaServiceTemplate() string

GetReplicaServiceTemplate gets replica service template

func (*ChiTemplateNames) GetServiceTemplate

func (templateNames *ChiTemplateNames) GetServiceTemplate() string

GetServiceTemplate gets service template

func (*ChiTemplateNames) GetShardServiceTemplate

func (templateNames *ChiTemplateNames) GetShardServiceTemplate() string

GetShardServiceTemplate gets shard service template

func (*ChiTemplateNames) HandleDeprecatedFields

func (templateNames *ChiTemplateNames) HandleDeprecatedFields()

HandleDeprecatedFields helps to deal with deprecated fields

func (*ChiTemplateNames) HasClusterServiceTemplate

func (templateNames *ChiTemplateNames) HasClusterServiceTemplate() bool

HasClusterServiceTemplate checks whether cluster service template is specified

func (*ChiTemplateNames) HasDataVolumeClaimTemplate

func (templateNames *ChiTemplateNames) HasDataVolumeClaimTemplate() bool

HasDataVolumeClaimTemplate checks whether data volume claim template is specified

func (*ChiTemplateNames) HasHostTemplate

func (templateNames *ChiTemplateNames) HasHostTemplate() bool

HasHostTemplate checks whether host template is specified

func (*ChiTemplateNames) HasLogVolumeClaimTemplate

func (templateNames *ChiTemplateNames) HasLogVolumeClaimTemplate() bool

HasLogVolumeClaimTemplate checks whether log volume claim template is specified

func (*ChiTemplateNames) HasPodTemplate

func (templateNames *ChiTemplateNames) HasPodTemplate() bool

HasPodTemplate checks whether pod template is specified

func (*ChiTemplateNames) HasReplicaServiceTemplate

func (templateNames *ChiTemplateNames) HasReplicaServiceTemplate() bool

HasReplicaServiceTemplate checks whether replica service template is specified

func (*ChiTemplateNames) HasServiceTemplate

func (templateNames *ChiTemplateNames) HasServiceTemplate() bool

HasServiceTemplate checks whether service template is specified

func (*ChiTemplateNames) HasShardServiceTemplate

func (templateNames *ChiTemplateNames) HasShardServiceTemplate() bool

HasShardServiceTemplate checks whether shard service template is specified

func (*ChiTemplateNames) MergeFrom

func (templateNames *ChiTemplateNames) MergeFrom(from *ChiTemplateNames, _type MergeType) *ChiTemplateNames

MergeFrom merges from specified object

type ChiTemplating

type ChiTemplating struct {
	Policy      string      `json:"policy,omitempty"      yaml:"policy,omitempty"`
	CHISelector CHISelector `json:"chiSelector,omitempty" yaml:"chiSelector,omitempty"`
}

ChiTemplating defines templating policy struct

func NewChiTemplating

func NewChiTemplating() *ChiTemplating

NewChiTemplating creates new templating

func (*ChiTemplating) DeepCopy

func (in *ChiTemplating) DeepCopy() *ChiTemplating

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

func (*ChiTemplating) DeepCopyInto

func (in *ChiTemplating) DeepCopyInto(out *ChiTemplating)

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

func (*ChiTemplating) GetPolicy

func (t *ChiTemplating) GetPolicy() string

GetPolicy gets policy

func (*ChiTemplating) GetSelector

func (t *ChiTemplating) GetSelector() CHISelector

GetSelector gets CHI selector

func (*ChiTemplating) MergeFrom

func (t *ChiTemplating) MergeFrom(from *ChiTemplating, _type MergeType) *ChiTemplating

MergeFrom merges from specified templating

func (*ChiTemplating) SetPolicy

func (t *ChiTemplating) SetPolicy(p string)

SetPolicy sets policy

type ChiZookeeperConfig

type ChiZookeeperConfig struct {
	Nodes              []ChiZookeeperNode `json:"nodes,omitempty"                yaml:"nodes,omitempty"`
	SessionTimeoutMs   int                `json:"session_timeout_ms,omitempty"   yaml:"session_timeout_ms,omitempty"`
	OperationTimeoutMs int                `json:"operation_timeout_ms,omitempty" yaml:"operation_timeout_ms,omitempty"`
	Root               string             `json:"root,omitempty"                 yaml:"root,omitempty"`
	Identity           string             `json:"identity,omitempty"             yaml:"identity,omitempty"`
}

ChiZookeeperConfig defines zookeeper section of .spec.configuration Refers to https://clickhouse.yandex/docs/en/single/index.html?#server-settings_zookeeper

func NewChiZookeeperConfig

func NewChiZookeeperConfig() *ChiZookeeperConfig

NewChiZookeeperConfig creates new ChiZookeeperConfig object

func (*ChiZookeeperConfig) DeepCopy

func (in *ChiZookeeperConfig) DeepCopy() *ChiZookeeperConfig

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

func (*ChiZookeeperConfig) DeepCopyInto

func (in *ChiZookeeperConfig) DeepCopyInto(out *ChiZookeeperConfig)

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

func (*ChiZookeeperConfig) Equals

func (zkc *ChiZookeeperConfig) Equals(b *ChiZookeeperConfig) bool

Equals checks whether config is equal to another one

func (*ChiZookeeperConfig) IsEmpty

func (zkc *ChiZookeeperConfig) IsEmpty() bool

IsEmpty checks whether config is empty

func (*ChiZookeeperConfig) MergeFrom

func (zkc *ChiZookeeperConfig) MergeFrom(from *ChiZookeeperConfig, _type MergeType) *ChiZookeeperConfig

MergeFrom merges from provided object

type ChiZookeeperNode

type ChiZookeeperNode struct {
	Host   string      `json:"host,omitempty" yaml:"host,omitempty"`
	Port   int32       `json:"port,omitempty" yaml:"port,omitempty"`
	Secure *StringBool `json:"secure,omitempty" yaml:"secure,omitempty"`
}

ChiZookeeperNode defines item of nodes section of .spec.configuration.zookeeper

func (*ChiZookeeperNode) DeepCopy

func (in *ChiZookeeperNode) DeepCopy() *ChiZookeeperNode

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

func (*ChiZookeeperNode) DeepCopyInto

func (in *ChiZookeeperNode) DeepCopyInto(out *ChiZookeeperNode)

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

func (*ChiZookeeperNode) Equal

func (zkNode *ChiZookeeperNode) Equal(to *ChiZookeeperNode) bool

Equal checks whether zookeeper node is equal to another

func (*ChiZookeeperNode) IsSecure

func (zkNode *ChiZookeeperNode) IsSecure() bool

IsSecure checks whether zookeeper node is secure

type ClickHouseInstallation

type ClickHouseInstallation struct {
	meta.TypeMeta   `json:",inline"            yaml:",inline"`
	meta.ObjectMeta `json:"metadata,omitempty" yaml:"metadata,omitempty"`

	Spec   ChiSpec    `json:"spec"               yaml:"spec"`
	Status *ChiStatus `json:"status,omitempty"   yaml:"status,omitempty"`
	// contains filtered or unexported fields
}

ClickHouseInstallation defines the Installation of a ClickHouse Database Cluster

func (*ClickHouseInstallation) ClustersCount

func (chi *ClickHouseInstallation) ClustersCount() int

ClustersCount counts clusters

func (*ClickHouseInstallation) Copy

Copy makes copy of a CHI, filtering fields according to specified CopyOptions

func (*ClickHouseInstallation) DeepCopy

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

func (*ClickHouseInstallation) DeepCopyInto

func (in *ClickHouseInstallation) DeepCopyInto(out *ClickHouseInstallation)

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

func (*ClickHouseInstallation) DeepCopyObject

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

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

func (*ClickHouseInstallation) EnsureRuntime

func (*ClickHouseInstallation) EnsureStatus

func (chi *ClickHouseInstallation) EnsureStatus() *ChiStatus

EnsureStatus ensures status

func (*ClickHouseInstallation) FillCHIPointer

func (chi *ClickHouseInstallation) FillCHIPointer()

FillCHIPointer fills CHI pointer

func (*ClickHouseInstallation) FillSelfCalculatedAddressInfo

func (chi *ClickHouseInstallation) FillSelfCalculatedAddressInfo()

FillSelfCalculatedAddressInfo calculates and fills address info

func (*ClickHouseInstallation) FillStatus

func (chi *ClickHouseInstallation) FillStatus(endpoint string, pods, fqdns []string, ip string)

FillStatus fills .Status

func (*ClickHouseInstallation) FindCluster

func (chi *ClickHouseInstallation) FindCluster(needle interface{}) *Cluster

FindCluster finds cluster by name or index. Expectations: name is expected to be a string, index is expected to be an int.

func (*ClickHouseInstallation) FindHost

func (chi *ClickHouseInstallation) FindHost(needleCluster interface{}, needleShard interface{}, needleHost interface{}) *ChiHost

FindHost finds shard by name or index Expectations: name is expected to be a string, index is expected to be an int.

func (*ClickHouseInstallation) FindShard

func (chi *ClickHouseInstallation) FindShard(needleCluster interface{}, needleShard interface{}) *ChiShard

FindShard finds shard by name or index Expectations: name is expected to be a string, index is expected to be an int.

func (*ClickHouseInstallation) FirstHost

func (chi *ClickHouseInstallation) FirstHost() *ChiHost

FirstHost returns first host of the CHI

func (*ClickHouseInstallation) FoundIn

func (chi *ClickHouseInstallation) FoundIn(haystack []*ClickHouseInstallation) bool

FoundIn checks whether CHI can be found in haystack

func (*ClickHouseInstallation) GetAncestor

func (chi *ClickHouseInstallation) GetAncestor() *ClickHouseInstallation

GetAncestor gets ancestor of a CHI

func (*ClickHouseInstallation) GetAnnotations

func (chi *ClickHouseInstallation) GetAnnotations() map[string]string

func (*ClickHouseInstallation) GetCHIServiceTemplate

func (chi *ClickHouseInstallation) GetCHIServiceTemplate() (*ServiceTemplate, bool)

GetCHIServiceTemplate gets ServiceTemplate of a CHI

func (*ClickHouseInstallation) GetHostTemplate

func (chi *ClickHouseInstallation) GetHostTemplate(name string) (*HostTemplate, bool)

GetHostTemplate gets HostTemplate by name

func (*ClickHouseInstallation) GetLabels

func (chi *ClickHouseInstallation) GetLabels() map[string]string

func (*ClickHouseInstallation) GetName

func (chi *ClickHouseInstallation) GetName() string

func (*ClickHouseInstallation) GetNamespace

func (chi *ClickHouseInstallation) GetNamespace() string

func (*ClickHouseInstallation) GetPodTemplate

func (chi *ClickHouseInstallation) GetPodTemplate(name string) (*PodTemplate, bool)

GetPodTemplate gets PodTemplate by name

func (*ClickHouseInstallation) GetReconciling

func (chi *ClickHouseInstallation) GetReconciling() *ChiReconciling

GetReconciling gets reconciling spec

func (*ClickHouseInstallation) GetServiceTemplate

func (chi *ClickHouseInstallation) GetServiceTemplate(name string) (*ServiceTemplate, bool)

GetServiceTemplate gets ServiceTemplate by name

func (*ClickHouseInstallation) GetStatus

func (chi *ClickHouseInstallation) GetStatus() *ChiStatus

GetStatus gets Status

func (*ClickHouseInstallation) GetTarget

GetTarget gets target of a CHI

func (*ClickHouseInstallation) GetVolumeClaimTemplate

func (chi *ClickHouseInstallation) GetVolumeClaimTemplate(name string) (*VolumeClaimTemplate, bool)

GetVolumeClaimTemplate gets VolumeClaimTemplate by name

func (*ClickHouseInstallation) HasAncestor

func (chi *ClickHouseInstallation) HasAncestor() bool

HasAncestor checks whether CHI has an ancestor

func (*ClickHouseInstallation) HasStatus

func (chi *ClickHouseInstallation) HasStatus() bool

HasStatus checks whether CHI has Status

func (*ClickHouseInstallation) HasTarget

func (chi *ClickHouseInstallation) HasTarget() bool

HasTarget checks whether CHI has a target

func (*ClickHouseInstallation) HostsCount

func (chi *ClickHouseInstallation) HostsCount() int

HostsCount counts hosts

func (*ClickHouseInstallation) HostsCountAttributes

func (chi *ClickHouseInstallation) HostsCountAttributes(a *HostReconcileAttributes) int

HostsCountAttributes counts hosts by attributes

func (*ClickHouseInstallation) IsAuto

func (chi *ClickHouseInstallation) IsAuto() bool

IsAuto checks whether templating policy is auto

func (*ClickHouseInstallation) IsRollingUpdate

func (chi *ClickHouseInstallation) IsRollingUpdate() bool

IsRollingUpdate checks whether CHI should perform rolling update

func (*ClickHouseInstallation) IsStopped

func (chi *ClickHouseInstallation) IsStopped() bool

IsStopped checks whether CHI is stopped

func (*ClickHouseInstallation) IsTroubleshoot

func (chi *ClickHouseInstallation) IsTroubleshoot() bool

IsTroubleshoot checks whether CHI is in troubleshoot mode

func (*ClickHouseInstallation) JSON

JSON returns JSON string

func (*ClickHouseInstallation) MatchFullName

func (chi *ClickHouseInstallation) MatchFullName(namespace, name string) bool

MatchFullName matches full name

func (*ClickHouseInstallation) MatchNamespace

func (chi *ClickHouseInstallation) MatchNamespace(namespace string) bool

MatchNamespace matches namespace

func (*ClickHouseInstallation) MergeFrom

func (chi *ClickHouseInstallation) MergeFrom(from *ClickHouseInstallation, _type MergeType)

MergeFrom merges from CHI

func (*ClickHouseInstallation) SetAncestor

func (chi *ClickHouseInstallation) SetAncestor(a *ClickHouseInstallation)

SetAncestor sets ancestor of a CHI

func (*ClickHouseInstallation) SetTarget

SetTarget sets target of a CHI

func (*ClickHouseInstallation) ShardsCount

func (chi *ClickHouseInstallation) ShardsCount() int

ShardsCount counts shards

func (*ClickHouseInstallation) WalkClusters

func (chi *ClickHouseInstallation) WalkClusters(f func(cluster *Cluster) error) []error

WalkClusters walks clusters

func (*ClickHouseInstallation) WalkClustersFullPath

func (chi *ClickHouseInstallation) WalkClustersFullPath(
	f func(chi *ClickHouseInstallation, clusterIndex int, cluster *Cluster) error,
) []error

WalkClustersFullPath walks clusters with full path

func (*ClickHouseInstallation) WalkHosts

func (chi *ClickHouseInstallation) WalkHosts(f func(host *ChiHost) error) []error

WalkHosts walks hosts with a function

func (*ClickHouseInstallation) WalkHostsFullPath

func (chi *ClickHouseInstallation) WalkHostsFullPath(f WalkHostsAddressFn) []error

WalkHostsFullPath walks hosts with a function

func (*ClickHouseInstallation) WalkHostsFullPathAndScope

func (chi *ClickHouseInstallation) WalkHostsFullPathAndScope(
	chiScopeCycleSize int,
	clusterScopeCycleSize int,
	f WalkHostsAddressFn,
) (res []error)

WalkHostsFullPathAndScope walks hosts with full path

func (*ClickHouseInstallation) WalkPodTemplates

func (chi *ClickHouseInstallation) WalkPodTemplates(f func(template *PodTemplate))

WalkPodTemplates walks over all PodTemplates

func (*ClickHouseInstallation) WalkShards

func (chi *ClickHouseInstallation) WalkShards(
	f func(
		shard *ChiShard,
	) error,
) []error

WalkShards walks shards

func (*ClickHouseInstallation) WalkTillError

func (chi *ClickHouseInstallation) WalkTillError(
	ctx context.Context,
	fCHIPreliminary func(ctx context.Context, chi *ClickHouseInstallation) error,
	fCluster func(ctx context.Context, cluster *Cluster) error,
	fShards func(ctx context.Context, shards []*ChiShard) error,
	fCHIFinal func(ctx context.Context, chi *ClickHouseInstallation) error,
) error

WalkTillError walks hosts with a function until an error met

func (*ClickHouseInstallation) WalkVolumeClaimTemplates

func (chi *ClickHouseInstallation) WalkVolumeClaimTemplates(f func(template *VolumeClaimTemplate))

WalkVolumeClaimTemplates walks over all VolumeClaimTemplates

func (*ClickHouseInstallation) YAML

YAML return YAML string

type ClickHouseInstallationList

type ClickHouseInstallationList struct {
	meta.TypeMeta `json:",inline"  yaml:",inline"`
	meta.ListMeta `json:"metadata" yaml:"metadata"`
	Items         []ClickHouseInstallation `json:"items" yaml:"items"`
}

ClickHouseInstallationList defines a list of ClickHouseInstallation resources

func (*ClickHouseInstallationList) DeepCopy

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

func (*ClickHouseInstallationList) DeepCopyInto

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

func (*ClickHouseInstallationList) DeepCopyObject

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

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

type ClickHouseInstallationRuntime

type ClickHouseInstallationRuntime struct {
	// contains filtered or unexported fields
}

func (*ClickHouseInstallationRuntime) DeepCopy

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

func (*ClickHouseInstallationRuntime) DeepCopyInto

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

func (*ClickHouseInstallationRuntime) GetAttributes

func (runtime *ClickHouseInstallationRuntime) GetAttributes() *ComparableAttributes

func (*ClickHouseInstallationRuntime) LockCommonConfig

func (runtime *ClickHouseInstallationRuntime) LockCommonConfig()

func (*ClickHouseInstallationRuntime) UnlockCommonConfig

func (runtime *ClickHouseInstallationRuntime) UnlockCommonConfig()

type ClickHouseInstallationTemplate

type ClickHouseInstallationTemplate ClickHouseInstallation

ClickHouseInstallationTemplate defines ClickHouseInstallation template

func (*ClickHouseInstallationTemplate) DeepCopy

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

func (*ClickHouseInstallationTemplate) DeepCopyInto

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

func (*ClickHouseInstallationTemplate) DeepCopyObject

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

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

type ClickHouseInstallationTemplateList

type ClickHouseInstallationTemplateList struct {
	meta.TypeMeta `json:",inline"  yaml:",inline"`
	meta.ListMeta `json:"metadata" yaml:"metadata"`
	Items         []ClickHouseInstallationTemplate `json:"items" yaml:"items"`
}

ClickHouseInstallationTemplateList defines CHI template list

func (*ClickHouseInstallationTemplateList) DeepCopy

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

func (*ClickHouseInstallationTemplateList) DeepCopyInto

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

func (*ClickHouseInstallationTemplateList) DeepCopyObject

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

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

type ClickHouseOperatorConfiguration

type ClickHouseOperatorConfiguration struct {
	meta.TypeMeta   `json:",inline"               yaml:",inline"`
	meta.ObjectMeta `json:"metadata,omitempty"    yaml:"metadata,omitempty"`
	Spec            OperatorConfig `json:"spec"   yaml:"spec"`
	Status          string         `json:"status" yaml:"status"`
}

ClickHouseOperatorConfiguration defines CHOp config

func (*ClickHouseOperatorConfiguration) DeepCopy

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

func (*ClickHouseOperatorConfiguration) DeepCopyInto

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

func (*ClickHouseOperatorConfiguration) DeepCopyObject

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

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

type ClickHouseOperatorConfigurationList

type ClickHouseOperatorConfigurationList struct {
	meta.TypeMeta `json:",inline"  yaml:",inline"`
	meta.ListMeta `json:"metadata" yaml:"metadata"`
	Items         []ClickHouseOperatorConfiguration `json:"items" yaml:"items"`
}

ClickHouseOperatorConfigurationList defines CHI operator config list

func (*ClickHouseOperatorConfigurationList) DeepCopy

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

func (*ClickHouseOperatorConfigurationList) DeepCopyInto

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

func (*ClickHouseOperatorConfigurationList) DeepCopyObject

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

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

type Cluster

type Cluster struct {
	Name         string              `json:"name,omitempty"         yaml:"name,omitempty"`
	Zookeeper    *ChiZookeeperConfig `json:"zookeeper,omitempty"    yaml:"zookeeper,omitempty"`
	Settings     *Settings           `json:"settings,omitempty"     yaml:"settings,omitempty"`
	Files        *Settings           `json:"files,omitempty"        yaml:"files,omitempty"`
	Templates    *ChiTemplateNames   `json:"templates,omitempty"    yaml:"templates,omitempty"`
	SchemaPolicy *SchemaPolicy       `json:"schemaPolicy,omitempty" yaml:"schemaPolicy,omitempty"`
	Insecure     *StringBool         `json:"insecure,omitempty"     yaml:"insecure,omitempty"`
	Secure       *StringBool         `json:"secure,omitempty"       yaml:"secure,omitempty"`
	Secret       *ClusterSecret      `json:"secret,omitempty"       yaml:"secret,omitempty"`
	Layout       *ChiClusterLayout   `json:"layout,omitempty"       yaml:"layout,omitempty"`

	Runtime ClusterRuntime `json:"-" yaml:"-"`
}

Cluster defines item of a clusters section of .configuration

func (*Cluster) DeepCopy

func (in *Cluster) DeepCopy() *Cluster

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

func (*Cluster) DeepCopyInto

func (in *Cluster) DeepCopyInto(out *Cluster)

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

func (*Cluster) FillShardReplicaSpecified

func (cluster *Cluster) FillShardReplicaSpecified()

FillShardReplicaSpecified fills whether shard or replicas are explicitly specified

func (*Cluster) FindHost

func (cluster *Cluster) FindHost(needleShard interface{}, needleHost interface{}) *ChiHost

FindHost finds host by name or index. Expectations: name is expected to be a string, index is expected to be an int.

func (*Cluster) FindShard

func (cluster *Cluster) FindShard(needle interface{}) *ChiShard

FindShard finds shard by name or index. Expectations: name is expected to be a string, index is expected to be an int.

func (*Cluster) FirstHost

func (cluster *Cluster) FirstHost() *ChiHost

FirstHost finds first host in the cluster

func (*Cluster) GetCHI

func (cluster *Cluster) GetCHI() *ClickHouseInstallation

GetCHI gets parent CHI

func (*Cluster) GetInsecure

func (cluster *Cluster) GetInsecure() *StringBool

GetInsecure is a getter

func (*Cluster) GetOrCreateHost

func (cluster *Cluster) GetOrCreateHost(shard, replica int) *ChiHost

GetOrCreateHost gets or creates host on specified coordinates

func (*Cluster) GetReplica

func (cluster *Cluster) GetReplica(replica int) *ChiReplica

GetReplica gets replica with specified index

func (*Cluster) GetSecure

func (cluster *Cluster) GetSecure() *StringBool

GetSecure is a getter

func (*Cluster) GetServiceTemplate

func (cluster *Cluster) GetServiceTemplate() (*ServiceTemplate, bool)

GetServiceTemplate returns service template, if exists

func (*Cluster) GetShard

func (cluster *Cluster) GetShard(shard int) *ChiShard

GetShard gets shard with specified index

func (*Cluster) HostsCount

func (cluster *Cluster) HostsCount() int

HostsCount counts hosts

func (*Cluster) InheritFilesFrom

func (cluster *Cluster) InheritFilesFrom(chi *ClickHouseInstallation)

InheritFilesFrom inherits files from CHI

func (*Cluster) InheritTemplatesFrom

func (cluster *Cluster) InheritTemplatesFrom(chi *ClickHouseInstallation)

InheritTemplatesFrom inherits templates from CHI

func (*Cluster) InheritZookeeperFrom

func (cluster *Cluster) InheritZookeeperFrom(chi *ClickHouseInstallation)

InheritZookeeperFrom inherits zookeeper config from CHI

func (*Cluster) IsShardSpecified

func (cluster *Cluster) IsShardSpecified() bool

IsShardSpecified checks whether shard is explicitly specified

func (*Cluster) WalkHosts

func (cluster *Cluster) WalkHosts(f func(host *ChiHost) error) []error

WalkHosts walks hosts

func (*Cluster) WalkHostsByReplicas

func (cluster *Cluster) WalkHostsByReplicas(f func(shard, replica int, host *ChiHost) error) []error

WalkHostsByReplicas walks hosts by replicas

func (*Cluster) WalkHostsByShards

func (cluster *Cluster) WalkHostsByShards(f func(shard, replica int, host *ChiHost) error) []error

WalkHostsByShards walks hosts by shards

func (*Cluster) WalkReplicas

func (cluster *Cluster) WalkReplicas(f func(index int, replica *ChiReplica) error) []error

WalkReplicas walks replicas

func (*Cluster) WalkShards

func (cluster *Cluster) WalkShards(
	f func(index int, shard *ChiShard) error,
) []error

WalkShards walks shards

type ClusterRuntime

type ClusterRuntime struct {
	Address ChiClusterAddress       `json:"-" yaml:"-"`
	CHI     *ClickHouseInstallation `json:"-" yaml:"-" testdiff:"ignore"`
}

func (*ClusterRuntime) DeepCopy

func (in *ClusterRuntime) DeepCopy() *ClusterRuntime

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

func (*ClusterRuntime) DeepCopyInto

func (in *ClusterRuntime) DeepCopyInto(out *ClusterRuntime)

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

type ClusterSecret

type ClusterSecret struct {
	Auto      *StringBool `json:"auto,omitempty"      yaml:"auto,omitempty"`
	Value     string      `json:"value,omitempty"     yaml:"value,omitempty"`
	ValueFrom *DataSource `json:"valueFrom,omitempty" yaml:"valueFrom,omitempty"`
}

ClusterSecret defines the shared secret for nodes to authenticate each other with

func (*ClusterSecret) DeepCopy

func (in *ClusterSecret) DeepCopy() *ClusterSecret

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

func (*ClusterSecret) DeepCopyInto

func (in *ClusterSecret) DeepCopyInto(out *ClusterSecret)

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

func (*ClusterSecret) GetAutoSecretKeyRef

func (s *ClusterSecret) GetAutoSecretKeyRef(name string) *core.SecretKeySelector

GetAutoSecretKeyRef gets SecretKeySelector (typically named as SecretKeyRef) of an auto-generated secret or nil

func (*ClusterSecret) GetSecretKeyRef

func (s *ClusterSecret) GetSecretKeyRef() *core.SecretKeySelector

GetSecretKeyRef gets SecretKeySelector (typically named as SecretKeyRef) or nil

func (*ClusterSecret) HasSecretKeyRef

func (s *ClusterSecret) HasSecretKeyRef() bool

HasSecretKeyRef checks whether SecretKeySelector (typically named as SecretKeyRef) is available

func (*ClusterSecret) HasValue

func (s *ClusterSecret) HasValue() bool

HasValue checks whether explicit plaintext value is specified

func (*ClusterSecret) Source

Source returns name of the source where secret is provided

type ClusterSecretSourceName

type ClusterSecretSourceName string

ClusterSecretSourceName specifies name of the source where secret is provided

const (
	ClusterSecretSourcePlaintext   ClusterSecretSourceName = "plaintext"
	ClusterSecretSourceSecretRef   ClusterSecretSourceName = "secret_ref"
	ClusterSecretSourceAuto        ClusterSecretSourceName = "auto"
	ClusterSecretSourceUnspecified ClusterSecretSourceName = ""
)

Possible values for ClusterSecretSourceName secret sources

type ComparableAttributes

type ComparableAttributes struct {
	AdditionalEnvVars      []core.EnvVar      `json:"-" yaml:"-"`
	AdditionalVolumes      []core.Volume      `json:"-" yaml:"-"`
	AdditionalVolumeMounts []core.VolumeMount `json:"-" yaml:"-"`
	SkipOwnerRef           bool               `json:"-" yaml:"-"`
}

ComparableAttributes specifies CHI attributes that are comparable

func (*ComparableAttributes) DeepCopy

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

func (*ComparableAttributes) DeepCopyInto

func (in *ComparableAttributes) DeepCopyInto(out *ComparableAttributes)

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

type ConfigCRSource

type ConfigCRSource struct {
	Namespace string
	Name      string
}

func (*ConfigCRSource) DeepCopy

func (in *ConfigCRSource) DeepCopy() *ConfigCRSource

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

func (*ConfigCRSource) DeepCopyInto

func (in *ConfigCRSource) DeepCopyInto(out *ConfigCRSource)

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

type Configuration

type Configuration struct {
	Zookeeper *ChiZookeeperConfig `json:"zookeeper,omitempty" yaml:"zookeeper,omitempty"`
	Users     *Settings           `json:"users,omitempty"     yaml:"users,omitempty"`
	Profiles  *Settings           `json:"profiles,omitempty"  yaml:"profiles,omitempty"`
	Quotas    *Settings           `json:"quotas,omitempty"    yaml:"quotas,omitempty"`
	Settings  *Settings           `json:"settings,omitempty"  yaml:"settings,omitempty"`
	Files     *Settings           `json:"files,omitempty"     yaml:"files,omitempty"`
	// TODO refactor into map[string]ChiCluster
	Clusters []*Cluster `json:"clusters,omitempty"  yaml:"clusters,omitempty"`
}

Configuration defines configuration section of .spec

func NewConfiguration

func NewConfiguration() *Configuration

NewConfiguration creates new Configuration objects

func (*Configuration) DeepCopy

func (in *Configuration) DeepCopy() *Configuration

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

func (*Configuration) DeepCopyInto

func (in *Configuration) DeepCopyInto(out *Configuration)

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

func (*Configuration) MergeFrom

func (configuration *Configuration) MergeFrom(from *Configuration, _type MergeType) *Configuration

MergeFrom merges from specified source

type CopyCHIOptions

type CopyCHIOptions struct {
	// SkipStatus specifies whether to copy status
	SkipStatus bool
	// SkipManagedFields specifies whether to copy managed fields
	SkipManagedFields bool
}

CopyCHIOptions specifies options for CHI copier

func (*CopyCHIOptions) DeepCopy

func (in *CopyCHIOptions) DeepCopy() *CopyCHIOptions

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

func (*CopyCHIOptions) DeepCopyInto

func (in *CopyCHIOptions) DeepCopyInto(out *CopyCHIOptions)

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

type CopyCHIStatusOptions

type CopyCHIStatusOptions struct {
	Actions           bool
	Errors            bool
	Normalized        bool
	MainFields        bool
	WholeStatus       bool
	InheritableFields bool
}

CopyCHIStatusOptions specifies what to copy in CHI status options

func (*CopyCHIStatusOptions) DeepCopy

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

func (*CopyCHIStatusOptions) DeepCopyInto

func (in *CopyCHIStatusOptions) DeepCopyInto(out *CopyCHIStatusOptions)

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

type CycleAddress

type CycleAddress struct {
	// CycleIndex specifies index of the cycle within something bigger
	CycleIndex int
	// Index specifies index within the cycle
	Index int
}

CycleAddress defines cycle address of an entity

func NewCycleAddress

func NewCycleAddress() *CycleAddress

NewCycleAddress creates new CycleAddress

func (*CycleAddress) DeepCopy

func (in *CycleAddress) DeepCopy() *CycleAddress

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

func (*CycleAddress) DeepCopyInto

func (in *CycleAddress) DeepCopyInto(out *CycleAddress)

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

func (*CycleAddress) Inc

func (s *CycleAddress) Inc(spec *CycleSpec)

Inc increases the CycleAddress

func (*CycleAddress) Init

func (s *CycleAddress) Init()

Init initializes the CycleAddress

type CycleSpec

type CycleSpec struct {
	// Size specifies size of a cycle
	Size int
}

CycleSpec defines spec of a cycle, such as size

func NewCycleSpec

func NewCycleSpec(size int) *CycleSpec

NewCycleSpec creates new CycleSpec

func (*CycleSpec) DeepCopy

func (in *CycleSpec) DeepCopy() *CycleSpec

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

func (*CycleSpec) DeepCopyInto

func (in *CycleSpec) DeepCopyInto(out *CycleSpec)

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

func (*CycleSpec) IsValid

func (s *CycleSpec) IsValid() bool

IsValid specifies whether spec is a valid one

type DataSource

type DataSource struct {
	// SecretKeyRef points to a secret and mirrors k8s SecretSource type
	SecretKeyRef *core.SecretKeySelector `json:"secretKeyRef,omitempty" yaml:"secretKeyRef,omitempty"`
}

DataSource is a set of possible data sources

func (*DataSource) DeepCopy

func (in *DataSource) DeepCopy() *DataSource

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

func (*DataSource) DeepCopyInto

func (in *DataSource) DeepCopyInto(out *DataSource)

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

type FillStatusParams

type FillStatusParams struct {
	CHOpIP              string
	ClustersCount       int
	ShardsCount         int
	HostsCount          int
	TaskID              string
	HostsUpdatedCount   int
	HostsAddedCount     int
	HostsUnchangedCount int
	HostsCompletedCount int
	HostsDeleteCount    int
	HostsDeletedCount   int
	Pods                []string
	FQDNs               []string
	Endpoint            string
	NormalizedCHI       *ClickHouseInstallation
}

FillStatusParams is a struct used to fill status params

func (*FillStatusParams) DeepCopy

func (in *FillStatusParams) DeepCopy() *FillStatusParams

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

func (*FillStatusParams) DeepCopyInto

func (in *FillStatusParams) DeepCopyInto(out *FillStatusParams)

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

type HostAddress

type HostAddress struct {
	// CHIScopeAddress specifies address of a host within CHI scope
	CHIScopeAddress *ScopeAddress
	// ClusterScopeAddress specifies address of a host within cluster scope
	ClusterScopeAddress *ScopeAddress
	// ClusterIndex specifies index of a cluster within CHI
	ClusterIndex int
	// ShardIndex specifies index of a shard within cluster
	ShardIndex int
	// ReplicaIndex specifies index of a replica within cluster
	ReplicaIndex int
}

HostAddress specifies address of a host

func NewHostAddress

func NewHostAddress(chiScopeCycleSize, clusterScopeCycleSize int) (a *HostAddress)

NewHostAddress creates new HostAddress

func (*HostAddress) DeepCopy

func (in *HostAddress) DeepCopy() *HostAddress

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

func (*HostAddress) DeepCopyInto

func (in *HostAddress) DeepCopyInto(out *HostAddress)

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

type HostReconcileAttributes

type HostReconcileAttributes struct {
	// contains filtered or unexported fields
}

HostReconcileAttributes defines host reconcile status and attributes

func NewChiHostReconcileAttributes

func NewChiHostReconcileAttributes() *HostReconcileAttributes

NewChiHostReconcileAttributes creates new reconcile attributes

func (*HostReconcileAttributes) Any

Any checks whether any of the attributes is set

func (*HostReconcileAttributes) DeepCopy

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

func (*HostReconcileAttributes) DeepCopyInto

func (in *HostReconcileAttributes) DeepCopyInto(out *HostReconcileAttributes)

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

func (*HostReconcileAttributes) Equal

Equal checks whether reconcile attributes are equal

func (*HostReconcileAttributes) GetStatus

func (s *HostReconcileAttributes) GetStatus() ObjectStatus

GetStatus gets status

func (*HostReconcileAttributes) IsAdd

func (s *HostReconcileAttributes) IsAdd() bool

IsAdd checks whether 'add' attribute is set

func (*HostReconcileAttributes) IsExclude

func (s *HostReconcileAttributes) IsExclude() bool

IsExclude checks whether 'exclude' attribute is set

func (*HostReconcileAttributes) IsFound

func (s *HostReconcileAttributes) IsFound() bool

IsFound checks whether 'found' attribute is set

func (*HostReconcileAttributes) IsModify

func (s *HostReconcileAttributes) IsModify() bool

IsModify checks whether 'modify' attribute is set

func (*HostReconcileAttributes) IsRemove

func (s *HostReconcileAttributes) IsRemove() bool

IsRemove checks whether 'remove' attribute is set

func (*HostReconcileAttributes) SetAdd

SetAdd sets 'add' attribute

func (*HostReconcileAttributes) SetExclude

SetExclude sets 'exclude' attribute

func (*HostReconcileAttributes) SetFound

SetFound sets 'found' attribute

func (*HostReconcileAttributes) SetModify

SetModify sets 'modify' attribute

func (*HostReconcileAttributes) SetRemove

SetRemove sets 'remove' attribute

func (*HostReconcileAttributes) SetStatus

SetStatus sets status

func (*HostReconcileAttributes) String

func (s *HostReconcileAttributes) String() string

String returns string form

func (*HostReconcileAttributes) UnsetAdd

UnsetAdd unsets 'add' attribute

func (*HostReconcileAttributes) UnsetExclude

UnsetExclude unsets 'exclude' attribute

type HostTemplate

type HostTemplate struct {
	Name             string             `json:"name,omitempty"             yaml:"name,omitempty"`
	PortDistribution []PortDistribution `json:"portDistribution,omitempty" yaml:"portDistribution,omitempty"`
	Spec             ChiHost            `json:"spec,omitempty"             yaml:"spec,omitempty"`
}

HostTemplate defines full Host Template

func (*HostTemplate) DeepCopy

func (in *HostTemplate) DeepCopy() *HostTemplate

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

func (*HostTemplate) DeepCopyInto

func (in *HostTemplate) DeepCopyInto(out *HostTemplate)

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

type HostTemplatesIndex

type HostTemplatesIndex struct {
	// contains filtered or unexported fields
}

HostTemplatesIndex describes index of host templates

func NewHostTemplatesIndex

func NewHostTemplatesIndex() *HostTemplatesIndex

NewHostTemplatesIndex creates new HostTemplatesIndex object

func (*HostTemplatesIndex) DeepCopy

func (in *HostTemplatesIndex) DeepCopy() *HostTemplatesIndex

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

func (*HostTemplatesIndex) DeepCopyInto

func (in *HostTemplatesIndex) DeepCopyInto(out *HostTemplatesIndex)

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

func (*HostTemplatesIndex) Get

func (i *HostTemplatesIndex) Get(name string) *HostTemplate

Get returns entity `name` from the index

func (*HostTemplatesIndex) Has

func (i *HostTemplatesIndex) Has(name string) bool

Has checks whether index has entity `name`

func (*HostTemplatesIndex) Set

func (i *HostTemplatesIndex) Set(name string, entry *HostTemplate)

Set sets named template into index

func (*HostTemplatesIndex) Walk

func (i *HostTemplatesIndex) Walk(f func(template *HostTemplate))

Walk calls specified function over each entry in the index

type HostsField

type HostsField struct {
	ShardsCount   int
	ReplicasCount int
	Field         [][]*ChiHost
}

HostsField specifies field of hosts

func NewHostsField

func NewHostsField(shards, replicas int) *HostsField

NewHostsField creates new field of hosts

func (*HostsField) DeepCopy

func (in *HostsField) DeepCopy() *HostsField

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

func (*HostsField) DeepCopyInto

func (in *HostsField) DeepCopyInto(out *HostsField)

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

func (*HostsField) Get

func (hf *HostsField) Get(shard, replica int) *ChiHost

Get gets host from specified coordinates

func (*HostsField) GetOrCreate

func (hf *HostsField) GetOrCreate(shard, replica int) *ChiHost

GetOrCreate gets and creates if necessary

func (*HostsField) HostsCount

func (hf *HostsField) HostsCount() int

HostsCount returns hosts number

func (*HostsField) Set

func (hf *HostsField) Set(shard, replica int, host *ChiHost)

Set sets host on specified coordinates

func (*HostsField) WalkHosts

func (hf *HostsField) WalkHosts(f func(shard, replica int, host *ChiHost) error) []error

WalkHosts walks hosts with a function

type Matchable

type Matchable string

Matchable defines string that can be matched against another string

func (*Matchable) Match

func (m *Matchable) Match(str string) bool

Match checks whether provided string matches this matchable

type MergeType

type MergeType string

MergeType specifies merge types type

const (
	MergeTypeFillEmptyValues          MergeType = "fillempty"
	MergeTypeOverrideByNonEmptyValues MergeType = "override"
)

Possible merge types

type ObjectAddress

type ObjectAddress struct {
	Namespace string
	Name      string
	Key       string
}

func (ObjectAddress) AnyEmpty

func (a ObjectAddress) AnyEmpty() bool

func (*ObjectAddress) DeepCopy

func (in *ObjectAddress) DeepCopy() *ObjectAddress

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

func (*ObjectAddress) DeepCopyInto

func (in *ObjectAddress) DeepCopyInto(out *ObjectAddress)

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

func (ObjectAddress) Render

func (a ObjectAddress) Render(sep string) string

func (ObjectAddress) String

func (a ObjectAddress) String() string

type ObjectStatus

type ObjectStatus string

ObjectStatus specifies object status

const (
	ObjectStatusModified ObjectStatus = "modified"
	ObjectStatusNew      ObjectStatus = "new"
	ObjectStatusSame     ObjectStatus = "same"
	ObjectStatusUnknown  ObjectStatus = "unknown"
)

Possible values for object status

type OperatorConfig

type OperatorConfig struct {
	Runtime     OperatorConfigRuntime    `json:"runtime"    yaml:"runtime"`
	Watch       OperatorConfigWatch      `json:"watch"      yaml:"watch"`
	ClickHouse  OperatorConfigClickHouse `json:"clickhouse" yaml:"clickhouse"`
	Template    OperatorConfigTemplate   `json:"template"   yaml:"template"`
	Reconcile   OperatorConfigReconcile  `json:"reconcile"  yaml:"reconcile"`
	Annotation  OperatorConfigAnnotation `json:"annotation" yaml:"annotation"`
	Label       OperatorConfigLabel      `json:"label"      yaml:"label"`
	StatefulSet struct {
		// Revision history limit
		RevisionHistoryLimit int `json:"revisionHistoryLimit" yaml:"revisionHistoryLimit"`
	} `json:"statefulSet" yaml:"statefulSet"`
	Pod struct {
		// Grace period for Pod termination.
		TerminationGracePeriod int `json:"terminationGracePeriod" yaml:"terminationGracePeriod"`
	} `json:"pod" yaml:"pod"`
	Logger struct {
		// Logger section
		LogToStderr     string `json:"logtostderr"      yaml:"logtostderr"`
		AlsoLogToStderr string `json:"alsologtostderr"  yaml:"alsologtostderr"`
		V               string `json:"v"                yaml:"v"`
		StderrThreshold string `json:"stderrthreshold"  yaml:"stderrthreshold"`
		VModule         string `json:"vmodule"          yaml:"vmodule"`
		LogBacktraceAt  string `json:"log_backtrace_at" yaml:"log_backtrace_at"`
	} `json:"logger" yaml:"logger"`

	// WatchNamespaces where operator watches for events
	WatchNamespaces []string `json:"watchNamespaces" yaml:"watchNamespaces"`
	// Paths where to look for additional ClickHouse config .xml files to be mounted into Pod
	CHCommonConfigsPath string `json:"chCommonConfigsPath" yaml:"chCommonConfigsPath"`
	CHHostConfigsPath   string `json:"chHostConfigsPath"   yaml:"chHostConfigsPath"`
	CHUsersConfigsPath  string `json:"chUsersConfigsPath"  yaml:"chUsersConfigsPath"`

	// Path where to look for ClickHouseInstallation templates .yaml files
	CHITemplatesPath string `json:"chiTemplatesPath" yaml:"chiTemplatesPath"`
	// Create/Update StatefulSet behavior - for how long to wait for StatefulSet to reach new Generation
	StatefulSetUpdateTimeout uint64 `json:"statefulSetUpdateTimeout" yaml:"statefulSetUpdateTimeout"`
	// Create/Update StatefulSet behavior - for how long to sleep while polling StatefulSet to reach new Generation
	StatefulSetUpdatePollPeriod uint64 `json:"statefulSetUpdatePollPeriod" yaml:"statefulSetUpdatePollPeriod"`

	// Rolling Create/Update behavior
	// StatefulSet create behavior - what to do in case StatefulSet can't reach new Generation
	OnStatefulSetCreateFailureAction string `json:"onStatefulSetCreateFailureAction" yaml:"onStatefulSetCreateFailureAction"`
	// StatefulSet update behavior - what to do in case StatefulSet can't reach new Generation
	OnStatefulSetUpdateFailureAction string `json:"onStatefulSetUpdateFailureAction" yaml:"onStatefulSetUpdateFailureAction"`

	// Default values for ClickHouse user configuration
	// 1. user/profile - string
	// 2. user/quota - string
	// 3. user/networks/ip - multiple strings
	// 4. user/password - string
	CHConfigUserDefaultProfile    string   `json:"chConfigUserDefaultProfile"    yaml:"chConfigUserDefaultProfile"`
	CHConfigUserDefaultQuota      string   `json:"chConfigUserDefaultQuota"      yaml:"chConfigUserDefaultQuota"`
	CHConfigUserDefaultNetworksIP []string `json:"chConfigUserDefaultNetworksIP" yaml:"chConfigUserDefaultNetworksIP"`
	CHConfigUserDefaultPassword   string   `json:"chConfigUserDefaultPassword"   yaml:"chConfigUserDefaultPassword"`

	CHConfigNetworksHostRegexpTemplate string `json:"chConfigNetworksHostRegexpTemplate" yaml:"chConfigNetworksHostRegexpTemplate"`

	// Username and Password to be used by operator to connect to ClickHouse instances
	// for
	// 1. Metrics requests
	// 2. Schema maintenance
	// User credentials can be specified in additional ClickHouse config files located in `chUsersConfigsPath` folder
	CHScheme   string `json:"chScheme" yaml:"chScheme"`
	CHUsername string `json:"chUsername" yaml:"chUsername"`
	CHPassword string `json:"chPassword" yaml:"chPassword"`
	// Location of k8s Secret with username and password to be used by operator to connect to ClickHouse instances
	// Can be used instead of explicitly specified username and password
	CHCredentialsSecretNamespace string `json:"chCredentialsSecretNamespace" yaml:"chCredentialsSecretNamespace"`
	CHCredentialsSecretName      string `json:"chCredentialsSecretName"      yaml:"chCredentialsSecretName"`

	// Port where to connect to ClickHouse instances to
	CHPort int `json:"chPort"     yaml:"chPort"`

	// Logger section
	LogToStderr     string `json:"logtostderr"      yaml:"logtostderr"`
	AlsoLogToStderr string `json:"alsologtostderr"  yaml:"alsologtostderr"`
	V               string `json:"v"                yaml:"v"`
	StderrThreshold string `json:"stderrthreshold"  yaml:"stderrthreshold"`
	VModule         string `json:"vmodule"          yaml:"vmodule"`
	LogBacktraceAt  string `json:"log_backtrace_at" yaml:"log_backtrace_at"`
	// Max number of concurrent reconciles in progress
	ReconcileThreadsNumber int  `json:"reconcileThreadsNumber" yaml:"reconcileThreadsNumber"`
	ReconcileWaitExclude   bool `json:"reconcileWaitExclude"   yaml:"reconcileWaitExclude"`
	ReconcileWaitInclude   bool `json:"reconcileWaitInclude"   yaml:"reconcileWaitInclude"`

	// When transferring annotations from the chi/chit.metadata to CHI objects, use these filters.
	IncludeIntoPropagationAnnotations []string `json:"includeIntoPropagationAnnotations" yaml:"includeIntoPropagationAnnotations"`
	ExcludeFromPropagationAnnotations []string `json:"excludeFromPropagationAnnotations" yaml:"excludeFromPropagationAnnotations"`

	// When transferring labels from the chi/chit.metadata to child objects, use these filters.
	IncludeIntoPropagationLabels []string `json:"includeIntoPropagationLabels" yaml:"includeIntoPropagationLabels"`
	ExcludeFromPropagationLabels []string `json:"excludeFromPropagationLabels" yaml:"excludeFromPropagationLabels"`

	// Whether to append *Scope* labels to StatefulSet and Pod.
	AppendScopeLabelsString StringBool `json:"appendScopeLabels" yaml:"appendScopeLabels"`

	// Grace period for Pod termination.
	TerminationGracePeriod int `json:"terminationGracePeriod" yaml:"terminationGracePeriod"`
	// Revision history limit
	RevisionHistoryLimit int `json:"revisionHistoryLimit" yaml:"revisionHistoryLimit"`
}

OperatorConfig specifies operator config

func (*OperatorConfig) AddCHITemplate

func (c *OperatorConfig) AddCHITemplate(template *ClickHouseInstallation)

AddCHITemplate adds CHI template

func (*OperatorConfig) DeepCopy

func (in *OperatorConfig) DeepCopy() *OperatorConfig

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

func (*OperatorConfig) DeepCopyInto

func (in *OperatorConfig) DeepCopyInto(out *OperatorConfig)

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

func (*OperatorConfig) DeleteCHITemplate

func (c *OperatorConfig) DeleteCHITemplate(template *ClickHouseInstallation)

DeleteCHITemplate deletes CHI template

func (*OperatorConfig) FindTemplate

func (c *OperatorConfig) FindTemplate(templateRef *TemplateRef, fallbackNamespace string) *ClickHouseInstallation

FindTemplate finds specified template within possibly specified namespace

func (*OperatorConfig) GetAutoTemplates

func (c *OperatorConfig) GetAutoTemplates() []*ClickHouseInstallation

GetAutoTemplates gets all auto templates. Auto templates are sorted alphabetically by tuple: namespace, name

func (*OperatorConfig) GetInformerNamespace

func (c *OperatorConfig) GetInformerNamespace() string

GetInformerNamespace is a TODO stub Namespace where informers would watch notifications from The thing is that InformerFactory can accept only one parameter as watched namespace, be it explicitly specified namespace or empty line for "all namespaces". That's what conflicts with CHOp's approach to 'specify list of namespaces to watch in', having slice of namespaces (CHOp's approach) incompatible with "one namespace name" approach TODO unify with IsWatchedNamespace TODO unify approaches to multiple namespaces support

func (*OperatorConfig) GetLogLevel

func (c *OperatorConfig) GetLogLevel() (log.Level, error)

GetLogLevel gets logger level

func (*OperatorConfig) GetRevisionHistoryLimit

func (c *OperatorConfig) GetRevisionHistoryLimit() *int32

GetRevisionHistoryLimit gets pointer to revisionHistoryLimit, as expected by statefulSet.Spec.Template.Spec.RevisionHistoryLimit

func (*OperatorConfig) GetTerminationGracePeriod

func (c *OperatorConfig) GetTerminationGracePeriod() *int64

GetTerminationGracePeriod gets pointer to terminationGracePeriod, as expected by statefulSet.Spec.Template.Spec.TerminationGracePeriodSeconds

func (*OperatorConfig) IsWatchedNamespace

func (c *OperatorConfig) IsWatchedNamespace(namespace string) bool

IsWatchedNamespace returns whether specified namespace is in a list of watched TODO unify with GetInformerNamespace

func (*OperatorConfig) MergeFrom

func (c *OperatorConfig) MergeFrom(from *OperatorConfig, _type MergeType) error

MergeFrom merges

func (*OperatorConfig) Postprocess

func (c *OperatorConfig) Postprocess()

Postprocess runs all postprocessors

func (*OperatorConfig) String

func (c *OperatorConfig) String(hideCredentials bool) string

String returns string representation of a OperatorConfig

func (*OperatorConfig) UpdateCHITemplate

func (c *OperatorConfig) UpdateCHITemplate(template *ClickHouseInstallation)

UpdateCHITemplate updates CHI template

type OperatorConfigAnnotation

type OperatorConfigAnnotation struct {
	// When transferring annotations from the chi/chit.metadata to CHI objects, use these filters.
	Include []string `json:"include" yaml:"include"`
	Exclude []string `json:"exclude" yaml:"exclude"`
}

OperatorConfigAnnotation specifies annotation section

func (*OperatorConfigAnnotation) DeepCopy

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

func (*OperatorConfigAnnotation) DeepCopyInto

func (in *OperatorConfigAnnotation) DeepCopyInto(out *OperatorConfigAnnotation)

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

type OperatorConfigCHI

type OperatorConfigCHI struct {
	// Policy specifies how to handle CHITs
	Policy OperatorConfigCHIPolicy `json:"policy" yaml:"policy"`
	// Path where to look for ClickHouseInstallation templates .yaml files
	Path string `json:"path" yaml:"path"`

	Runtime OperatorConfigCHIRuntime `json:"runtime,omitempty" yaml:"runtime,omitempty"`
}

OperatorConfigCHI specifies template CHI section

func (*OperatorConfigCHI) DeepCopy

func (in *OperatorConfigCHI) DeepCopy() *OperatorConfigCHI

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

func (*OperatorConfigCHI) DeepCopyInto

func (in *OperatorConfigCHI) DeepCopyInto(out *OperatorConfigCHI)

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

type OperatorConfigCHIPolicy

type OperatorConfigCHIPolicy string

OperatorConfigCHIPolicy specifies string value of .template.chi.policy

const (
	OperatorConfigCHIPolicyReadOnStart          OperatorConfigCHIPolicy = "ReadOnStart"
	OperatorConfigCHIPolicyApplyOnNextReconcile OperatorConfigCHIPolicy = "ApplyOnNextReconcile"
)

Possible values for OperatorConfigCHIPolicy

func (OperatorConfigCHIPolicy) Equals

Equals checks whether OperatorConfigCHIPolicy is equal to another one

func (OperatorConfigCHIPolicy) String

func (p OperatorConfigCHIPolicy) String() string

String is a stringifier

func (OperatorConfigCHIPolicy) ToLower

func (p OperatorConfigCHIPolicy) ToLower() string

ToLower provides the same functionality as strings.ToLower()

type OperatorConfigCHIRuntime

type OperatorConfigCHIRuntime struct {
	// CHI template files fetched from the path specified above. Maps "file name->file content"
	TemplateFiles map[string]string `json:"templateFiles,omitempty" yaml:"templateFiles,omitempty"`
	// CHI template objects unmarshalled from CHITemplateFiles. Maps "metadata.name->object"
	Templates []*ClickHouseInstallation `json:"-" yaml:"-"`

	// ClickHouseInstallation template
	Template *ClickHouseInstallation `json:"-" yaml:"-"`
	// contains filtered or unexported fields
}

OperatorConfigCHIRuntime specifies chi runtime section

func (*OperatorConfigCHIRuntime) DeepCopy

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

func (*OperatorConfigCHIRuntime) DeepCopyInto

func (in *OperatorConfigCHIRuntime) DeepCopyInto(out *OperatorConfigCHIRuntime)

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

type OperatorConfigClickHouse

type OperatorConfigClickHouse struct {
	Config              OperatorConfigConfig        `json:"configuration" yaml:"configuration"`
	ConfigRestartPolicy OperatorConfigRestartPolicy `json:"configurationRestartPolicy" yaml:"configurationRestartPolicy"`

	Access struct {
		// Username and Password to be used by operator to connect to ClickHouse instances
		// for
		// 1. Metrics requests
		// 2. Schema maintenance
		// User credentials can be specified in additional ClickHouse config files located in `chUsersConfigsPath` folder
		Scheme   string `json:"scheme,omitempty"   yaml:"scheme,omitempty"`
		Username string `json:"username,omitempty" yaml:"username,omitempty"`
		Password string `json:"password,omitempty" yaml:"password,omitempty"`
		RootCA   string `json:"rootCA,omitempty"   yaml:"rootCA,omitempty"`

		// Location of k8s Secret with username and password to be used by the operator to connect to ClickHouse instances
		// Can be used instead of explicitly specified (above) username and password
		Secret struct {
			Namespace string `json:"namespace,omitempty" yaml:"namespace,omitempty"`
			Name      string `json:"name,omitempty"      yaml:"name,omitempty"`

			Runtime struct {
				// Username and Password to be used by operator to connect to ClickHouse instances
				// extracted from k8s secret specified above.
				Username string
				Password string
				Fetched  bool
				Error    string
			}
		} `json:"secret" yaml:"secret"`

		// Port where to connect to ClickHouse instances to
		Port int `json:"port" yaml:"port"`

		// Timeouts used to limit connection and queries from the operator to ClickHouse instances
		Timeouts struct {
			Connect time.Duration `json:"connect" yaml:"connect"`
			Query   time.Duration `json:"query"   yaml:"query"`
		} `json:"timeouts" yaml:"timeouts"`
	} `json:"access" yaml:"access"`

	// Metrics used to specify how the operator fetches metrics from ClickHouse instances
	Metrics struct {
		Timeouts struct {
			Collect time.Duration `json:"collect" yaml:"collect"`
		} `json:"timeouts" yaml:"timeouts"`
	} `json:"metrics" yaml:"metrics"`
}

OperatorConfigClickHouse specifies ClickHouse section

func (*OperatorConfigClickHouse) DeepCopy

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

func (*OperatorConfigClickHouse) DeepCopyInto

func (in *OperatorConfigClickHouse) DeepCopyInto(out *OperatorConfigClickHouse)

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

type OperatorConfigConfig

type OperatorConfigConfig struct {
	File OperatorConfigFile `json:"file" yaml:"file"`

	User OperatorConfigUser `json:"user" yaml:"user"`

	Network struct {
		HostRegexpTemplate string `json:"hostRegexpTemplate" yaml:"hostRegexpTemplate"`
	} `json:"network" yaml:"network"`
}

OperatorConfigConfig specifies Config section

func (*OperatorConfigConfig) DeepCopy

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

func (*OperatorConfigConfig) DeepCopyInto

func (in *OperatorConfigConfig) DeepCopyInto(out *OperatorConfigConfig)

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

type OperatorConfigDefault

type OperatorConfigDefault struct {
	// Default values for ClickHouse user configuration
	// 1. user/profile - string
	// 2. user/quota - string
	// 3. user/networks/ip - multiple strings
	// 4. user/password - string
	Profile    string   `json:"profile"    yaml:"profile"`
	Quota      string   `json:"quota"      yaml:"quota"`
	NetworksIP []string `json:"networksIP" yaml:"networksIP"`
	Password   string   `json:"password"   yaml:"password"`
}

OperatorConfigDefault specifies user-default section

func (*OperatorConfigDefault) DeepCopy

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

func (*OperatorConfigDefault) DeepCopyInto

func (in *OperatorConfigDefault) DeepCopyInto(out *OperatorConfigDefault)

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

type OperatorConfigFile

type OperatorConfigFile struct {
	Path struct {
		// Paths where to look for additional ClickHouse config .xml files to be mounted into Pod
		Common string `json:"common" yaml:"common"`
		Host   string `json:"host"   yaml:"host"`
		User   string `json:"user"   yaml:"user"`
	} `json:"path" yaml:"path"`

	Runtime OperatorConfigFileRuntime `json:"runtime,omitempty" yaml:"runtime,omitempty"`
}

OperatorConfigFile specifies File section

func (*OperatorConfigFile) DeepCopy

func (in *OperatorConfigFile) DeepCopy() *OperatorConfigFile

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

func (*OperatorConfigFile) DeepCopyInto

func (in *OperatorConfigFile) DeepCopyInto(out *OperatorConfigFile)

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

type OperatorConfigFileRuntime

type OperatorConfigFileRuntime struct {
	// OperatorConfig files fetched from paths specified above. Maps "file name->file content"
	CommonConfigFiles map[string]string `json:"commonConfigFiles,omitempty" yaml:"commonConfigFiles,omitempty"`
	HostConfigFiles   map[string]string `json:"hostConfigFiles,omitempty"   yaml:"hostConfigFiles,omitempty"`
	UsersConfigFiles  map[string]string `json:"usersConfigFiles,omitempty"  yaml:"usersConfigFiles,omitempty"`
}

OperatorConfigFileRuntime specifies runtime section

func (*OperatorConfigFileRuntime) DeepCopy

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

func (*OperatorConfigFileRuntime) DeepCopyInto

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

type OperatorConfigLabel

type OperatorConfigLabel struct {
	// When transferring labels from the chi/chit.metadata to child objects, use these filters.
	Include []string `json:"include" yaml:"include"`
	Exclude []string `json:"exclude" yaml:"exclude"`

	// Whether to append *Scope* labels to StatefulSet and Pod.
	AppendScopeString StringBool `json:"appendScope" yaml:"appendScope"`

	Runtime struct {
		AppendScope bool `json:"appendScope" yaml:"appendScope"`
	} `json:"runtime" yaml:"runtime"`
}

OperatorConfigLabel specifies label section

func (*OperatorConfigLabel) DeepCopy

func (in *OperatorConfigLabel) DeepCopy() *OperatorConfigLabel

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

func (*OperatorConfigLabel) DeepCopyInto

func (in *OperatorConfigLabel) DeepCopyInto(out *OperatorConfigLabel)

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

type OperatorConfigReconcile

type OperatorConfigReconcile struct {
	Runtime struct {
		ReconcileCHIsThreadsNumber           int `json:"reconcileCHIsThreadsNumber"           yaml:"reconcileCHIsThreadsNumber"`
		ReconcileShardsThreadsNumber         int `json:"reconcileShardsThreadsNumber"         yaml:"reconcileShardsThreadsNumber"`
		ReconcileShardsMaxConcurrencyPercent int `json:"reconcileShardsMaxConcurrencyPercent" yaml:"reconcileShardsMaxConcurrencyPercent"`

		// DEPRECATED, is replaced with reconcileCHIsThreadsNumber
		ThreadsNumber int `json:"threadsNumber" yaml:"threadsNumber"`
	} `json:"runtime" yaml:"runtime"`

	StatefulSet struct {
		Create struct {
			OnFailure string `json:"onFailure" yaml:"onFailure"`
		} `json:"create" yaml:"create"`

		Update struct {
			Timeout      uint64 `json:"timeout" yaml:"timeout"`
			PollInterval uint64 `json:"pollInterval" yaml:"pollInterval"`
			OnFailure    string `json:"onFailure" yaml:"onFailure"`
		} `json:"update" yaml:"update"`
	} `json:"statefulSet" yaml:"statefulSet"`

	Host OperatorConfigReconcileHost `json:"host" yaml:"host"`
}

OperatorConfigReconcile specifies reconcile section

func (*OperatorConfigReconcile) DeepCopy

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

func (*OperatorConfigReconcile) DeepCopyInto

func (in *OperatorConfigReconcile) DeepCopyInto(out *OperatorConfigReconcile)

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

type OperatorConfigReconcileHost

type OperatorConfigReconcileHost struct {
	Wait OperatorConfigReconcileHostWait `json:"wait" yaml:"wait"`
}

OperatorConfigReconcileHost defines reconcile host config

func (*OperatorConfigReconcileHost) DeepCopy

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

func (*OperatorConfigReconcileHost) DeepCopyInto

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

type OperatorConfigReconcileHostWait

type OperatorConfigReconcileHostWait struct {
	Exclude *StringBool `json:"exclude,omitempty" yaml:"exclude,omitempty"`
	Queries *StringBool `json:"queries,omitempty" yaml:"queries,omitempty"`
	Include *StringBool `json:"include,omitempty" yaml:"include,omitempty"`
}

OperatorConfigReconcileHostWait defines reconcile host wait config

func (*OperatorConfigReconcileHostWait) DeepCopy

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

func (*OperatorConfigReconcileHostWait) DeepCopyInto

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

type OperatorConfigRestartPolicy

type OperatorConfigRestartPolicy struct {
	Rules []OperatorConfigRestartPolicyRule
}

OperatorConfigRestartPolicy specifies operator's configuration changes restart policy

func (*OperatorConfigRestartPolicy) DeepCopy

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

func (*OperatorConfigRestartPolicy) DeepCopyInto

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

type OperatorConfigRestartPolicyRule

type OperatorConfigRestartPolicyRule struct {
	Version string
	Rules   []OperatorConfigRestartPolicyRuleSet
}

OperatorConfigRestartPolicyRule specifies ClickHouse version and rules for this version

func (*OperatorConfigRestartPolicyRule) DeepCopy

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

func (*OperatorConfigRestartPolicyRule) DeepCopyInto

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

type OperatorConfigRestartPolicyRuleSet

type OperatorConfigRestartPolicyRuleSet map[Matchable]StringBool

OperatorConfigRestartPolicyRuleSet specifies set of rules

func (OperatorConfigRestartPolicyRuleSet) DeepCopy

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

func (OperatorConfigRestartPolicyRuleSet) DeepCopyInto

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

type OperatorConfigRuntime

type OperatorConfigRuntime struct {
	// Full path to the config file and folder where file part of this OperatorConfig originates from
	ConfigFilePath   string `json:"configFilePath"   yaml:"configFilePath"`
	ConfigFolderPath string `json:"configFolderPath" yaml:"configFolderPath"`
	// Namespace and Name of the config Custom Resource
	ConfigCRNamespace string `json:"configCRNamespace" yaml:"configCRNamespace"`
	ConfigCRName      string `json:"configCRName"      yaml:"configCRName"`

	// ConfigCRSources specifies list of Custom Resource-based configuration sources
	ConfigCRSources []ConfigCRSource `json:"configCRSources" yaml:"configCRSources"`

	// Namespace specifies namespace where the operator runs
	Namespace string `json:"namespace" yaml:"namespace"`
}

OperatorConfigRuntime specifies runtime config

func (*OperatorConfigRuntime) DeepCopy

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

func (*OperatorConfigRuntime) DeepCopyInto

func (in *OperatorConfigRuntime) DeepCopyInto(out *OperatorConfigRuntime)

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

type OperatorConfigTemplate

type OperatorConfigTemplate struct {
	CHI OperatorConfigCHI `json:"chi" yaml:"chi"`
}

OperatorConfigTemplate specifies template section

func (*OperatorConfigTemplate) DeepCopy

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

func (*OperatorConfigTemplate) DeepCopyInto

func (in *OperatorConfigTemplate) DeepCopyInto(out *OperatorConfigTemplate)

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

type OperatorConfigUser

type OperatorConfigUser struct {
	Default OperatorConfigDefault `json:"default" yaml:"default"`
}

OperatorConfigUser specifies User section

func (*OperatorConfigUser) DeepCopy

func (in *OperatorConfigUser) DeepCopy() *OperatorConfigUser

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

func (*OperatorConfigUser) DeepCopyInto

func (in *OperatorConfigUser) DeepCopyInto(out *OperatorConfigUser)

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

type OperatorConfigWatch

type OperatorConfigWatch struct {
	// Namespaces where operator watches for events
	Namespaces []string `json:"namespaces" yaml:"namespaces"`
}

OperatorConfigWatch specifies watch section

func (*OperatorConfigWatch) DeepCopy

func (in *OperatorConfigWatch) DeepCopy() *OperatorConfigWatch

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

func (*OperatorConfigWatch) DeepCopyInto

func (in *OperatorConfigWatch) DeepCopyInto(out *OperatorConfigWatch)

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

type PVCProvisioner

type PVCProvisioner string

PVCProvisioner defines PVC provisioner

const (
	PVCProvisionerUnspecified PVCProvisioner = ""
	PVCProvisionerStatefulSet PVCProvisioner = "StatefulSet"
	PVCProvisionerOperator    PVCProvisioner = "Operator"
)

Possible values of PVC provisioner

func NewPVCProvisionerFromString

func NewPVCProvisionerFromString(s string) PVCProvisioner

NewPVCProvisionerFromString creates new PVCProvisioner from string

func (PVCProvisioner) IsValid

func (v PVCProvisioner) IsValid() bool

IsValid checks whether PVCProvisioner is valid

func (PVCProvisioner) String

func (v PVCProvisioner) String() string

String returns string value for PVCProvisioner

type PVCReclaimPolicy

type PVCReclaimPolicy string

PVCReclaimPolicy defines PVC reclaim policy

const (
	PVCReclaimPolicyUnspecified PVCReclaimPolicy = ""
	PVCReclaimPolicyRetain      PVCReclaimPolicy = "Retain"
	PVCReclaimPolicyDelete      PVCReclaimPolicy = "Delete"
)

Possible values of PVC reclaim policy

func NewPVCReclaimPolicyFromString

func NewPVCReclaimPolicyFromString(s string) PVCReclaimPolicy

NewPVCReclaimPolicyFromString creates new PVCReclaimPolicy from string

func (PVCReclaimPolicy) IsValid

func (v PVCReclaimPolicy) IsValid() bool

IsValid checks whether PVCReclaimPolicy is valid

func (PVCReclaimPolicy) String

func (v PVCReclaimPolicy) String() string

String returns string value for PVCReclaimPolicy

type PodDistribution

type PodDistribution struct {
	Type        string `json:"type,omitempty"        yaml:"type,omitempty"`
	Scope       string `json:"scope,omitempty"       yaml:"scope,omitempty"`
	Number      int    `json:"number,omitempty"      yaml:"number,omitempty"`
	TopologyKey string `json:"topologyKey,omitempty" yaml:"topologyKey,omitempty"`
}

PodDistribution defines pod distribution

func (*PodDistribution) DeepCopy

func (in *PodDistribution) DeepCopy() *PodDistribution

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

func (*PodDistribution) DeepCopyInto

func (in *PodDistribution) DeepCopyInto(out *PodDistribution)

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

type PodTemplate

type PodTemplate struct {
	Name            string            `json:"name"                      yaml:"name"`
	GenerateName    string            `json:"generateName,omitempty"    yaml:"generateName,omitempty"`
	Zone            PodTemplateZone   `json:"zone,omitempty"            yaml:"zone,omitempty"`
	PodDistribution []PodDistribution `json:"podDistribution,omitempty" yaml:"podDistribution,omitempty"`
	ObjectMeta      meta.ObjectMeta   `json:"metadata,omitempty"        yaml:"metadata,omitempty"`
	Spec            core.PodSpec      `json:"spec,omitempty"            yaml:"spec,omitempty"`
}

PodTemplate defines full Pod Template, directly used by StatefulSet

func (*PodTemplate) DeepCopy

func (in *PodTemplate) DeepCopy() *PodTemplate

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

func (*PodTemplate) DeepCopyInto

func (in *PodTemplate) DeepCopyInto(out *PodTemplate)

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

type PodTemplateZone

type PodTemplateZone struct {
	Key    string   `json:"key,omitempty"    yaml:"key,omitempty"`
	Values []string `json:"values,omitempty" yaml:"values,omitempty"`
}

PodTemplateZone defines pod template zone

func (*PodTemplateZone) DeepCopy

func (in *PodTemplateZone) DeepCopy() *PodTemplateZone

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

func (*PodTemplateZone) DeepCopyInto

func (in *PodTemplateZone) DeepCopyInto(out *PodTemplateZone)

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

type PodTemplatesIndex

type PodTemplatesIndex struct {
	// contains filtered or unexported fields
}

PodTemplatesIndex describes index of pod templates

func NewPodTemplatesIndex

func NewPodTemplatesIndex() *PodTemplatesIndex

NewPodTemplatesIndex creates new PodTemplatesIndex object

func (*PodTemplatesIndex) DeepCopy

func (in *PodTemplatesIndex) DeepCopy() *PodTemplatesIndex

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

func (*PodTemplatesIndex) DeepCopyInto

func (in *PodTemplatesIndex) DeepCopyInto(out *PodTemplatesIndex)

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

func (*PodTemplatesIndex) Get

func (i *PodTemplatesIndex) Get(name string) *PodTemplate

Get returns entity `name` from the index

func (*PodTemplatesIndex) Has

func (i *PodTemplatesIndex) Has(name string) bool

Has checks whether index has entity `name`

func (*PodTemplatesIndex) Set

func (i *PodTemplatesIndex) Set(name string, entry *PodTemplate)

Set sets named template into index

func (*PodTemplatesIndex) Walk

func (i *PodTemplatesIndex) Walk(f func(template *PodTemplate))

Walk calls specified function over each entry in the index

type PortDistribution

type PortDistribution struct {
	Type string `json:"type,omitempty"   yaml:"type,omitempty"`
}

PortDistribution defines port distribution

func (*PortDistribution) DeepCopy

func (in *PortDistribution) DeepCopy() *PortDistribution

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

func (*PortDistribution) DeepCopyInto

func (in *PortDistribution) DeepCopyInto(out *PortDistribution)

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

type SchemaPolicy

type SchemaPolicy struct {
	Replica string `json:"replica" yaml:"replica"`
	Shard   string `json:"shard"   yaml:"shard"`
}

SchemaPolicy defines schema management policy - replica or shard-based

func NewClusterSchemaPolicy

func NewClusterSchemaPolicy() *SchemaPolicy

NewClusterSchemaPolicy creates new cluster layout

func (*SchemaPolicy) DeepCopy

func (in *SchemaPolicy) DeepCopy() *SchemaPolicy

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

func (*SchemaPolicy) DeepCopyInto

func (in *SchemaPolicy) DeepCopyInto(out *SchemaPolicy)

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

type ScopeAddress

type ScopeAddress struct {
	// CycleSpec specifies cycle which to be used to specify CycleAddress
	CycleSpec *CycleSpec
	// CycleAddress specifies CycleAddress within the scope
	CycleAddress *CycleAddress
	// Index specifies index within the scope
	Index int
}

ScopeAddress defines scope address of an entity

func NewScopeAddress

func NewScopeAddress(cycleSize int) *ScopeAddress

NewScopeAddress creates new ScopeAddress

func (*ScopeAddress) DeepCopy

func (in *ScopeAddress) DeepCopy() *ScopeAddress

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

func (*ScopeAddress) DeepCopyInto

func (in *ScopeAddress) DeepCopyInto(out *ScopeAddress)

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

func (*ScopeAddress) Inc

func (s *ScopeAddress) Inc()

Inc increases the ScopeAddress

func (*ScopeAddress) Init

func (s *ScopeAddress) Init()

Init initializes the ScopeAddress

type Secured

type Secured interface {
	IsSecure() bool
}

Secured interface for nodes and hosts

type ServiceTemplate

type ServiceTemplate struct {
	Name         string           `json:"name"                   yaml:"name"`
	GenerateName string           `json:"generateName,omitempty" yaml:"generateName,omitempty"`
	ObjectMeta   meta.ObjectMeta  `json:"metadata,omitempty"     yaml:"metadata,omitempty"`
	Spec         core.ServiceSpec `json:"spec,omitempty"         yaml:"spec,omitempty"`
}

ServiceTemplate defines CHI service template

func (*ServiceTemplate) DeepCopy

func (in *ServiceTemplate) DeepCopy() *ServiceTemplate

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

func (*ServiceTemplate) DeepCopyInto

func (in *ServiceTemplate) DeepCopyInto(out *ServiceTemplate)

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

type ServiceTemplatesIndex

type ServiceTemplatesIndex struct {
	// contains filtered or unexported fields
}

ServiceTemplatesIndex describes index of service templates

func NewServiceTemplatesIndex

func NewServiceTemplatesIndex() *ServiceTemplatesIndex

NewServiceTemplatesIndex creates new ServiceTemplatesIndex object

func (*ServiceTemplatesIndex) DeepCopy

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

func (*ServiceTemplatesIndex) DeepCopyInto

func (in *ServiceTemplatesIndex) DeepCopyInto(out *ServiceTemplatesIndex)

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

func (*ServiceTemplatesIndex) Get

Get returns entity `name` from the index

func (*ServiceTemplatesIndex) Has

func (i *ServiceTemplatesIndex) Has(name string) bool

Has checks whether index has entity `name`

func (*ServiceTemplatesIndex) Set

func (i *ServiceTemplatesIndex) Set(name string, entry *ServiceTemplate)

Set sets named template into index

func (*ServiceTemplatesIndex) Walk

func (i *ServiceTemplatesIndex) Walk(f func(template *ServiceTemplate))

Walk calls specified function over each entry in the index

type Setting

type Setting struct {
	// contains filtered or unexported fields
}

Setting represents one settings, which can be either a sting or a vector of strings

func NewSettingScalar

func NewSettingScalar(scalar string) *Setting

NewSettingScalar makes new scalar Setting

func NewSettingScalarFromAny

func NewSettingScalarFromAny(untyped any) (*Setting, bool)

NewSettingScalarFromAny makes new scalar Setting from untyped

func NewSettingSource

func NewSettingSource(src *SettingSource) *Setting

NewSettingSource makes new source Setting

func NewSettingSourceFromAny

func NewSettingSourceFromAny(untyped any) (*Setting, bool)

NewSettingSourceFromAny makes new source Setting from untyped

func NewSettingVector

func NewSettingVector(vector []string) *Setting

NewSettingVector makes new vector Setting

func NewSettingVectorFromAny

func NewSettingVectorFromAny(untyped any) (*Setting, bool)

NewSettingVectorFromAny makes new vector Setting from untyped

func (*Setting) AsAny

func (s *Setting) AsAny() any

AsAny gets value of a setting as vector. ScalarString value is casted to vector

func (*Setting) AsVectorOfStrings

func (s *Setting) AsVectorOfStrings() []string

AsVectorOfStrings gets value of a setting as vector. ScalarString value is casted to vector

func (*Setting) Attributes

func (s *Setting) Attributes() string

Attributes returns string form of attributes - used to config tag creation

func (*Setting) CastToVector

func (s *Setting) CastToVector() *Setting

CastToVector returns either Setting in case it is vector or newly created Setting with value casted to VectorOfStrings

func (*Setting) DeepCopy

func (in *Setting) DeepCopy() *Setting

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

func (*Setting) DeepCopyInto

func (in *Setting) DeepCopyInto(out *Setting)

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

func (*Setting) FetchDataSourceAddress

func (s *Setting) FetchDataSourceAddress(defaultNamespace string, parseScalarString bool) (ObjectAddress, error)

FetchDataSourceAddress fetches data source address from the setting. defaultNamespace specifies default namespace to be used in case there is no namespace specified in data source address.

func (*Setting) GetNameKey

func (s *Setting) GetNameKey() (string, string)

GetNameKey gets name and key of source setting

func (*Setting) GetSecretKeyRef

func (s *Setting) GetSecretKeyRef() *core.SecretKeySelector

GetSecretKeyRef gets SecretKeySelector (typically named as SecretKeyRef) or nil

func (*Setting) HasAttribute

func (s *Setting) HasAttribute(name string) bool

HasAttribute checks whether setting has specified attribute

func (*Setting) HasAttributes

func (s *Setting) HasAttributes() bool

HasAttributes checks whether setting has attributes

func (*Setting) HasSecretKeyRef

func (s *Setting) HasSecretKeyRef() bool

HasSecretKeyRef checks whether SecretKeySelector (typically named as SecretKeyRef) is available

func (*Setting) HasValue

func (s *Setting) HasValue() bool

HasValue checks whether setting has a zero-value (no value)

func (*Setting) IsScalar

func (s *Setting) IsScalar() bool

IsScalar checks whether setting is a scalar value

func (*Setting) IsSource

func (s *Setting) IsSource() bool

IsSource checks whether setting is a source value

func (*Setting) IsVector

func (s *Setting) IsVector() bool

IsVector checks whether setting is a vector value

func (*Setting) Len

func (s *Setting) Len() int

Len returns number of entries in the Setting (be it scalar or vector)

func (*Setting) MarshalYAML

func (s *Setting) MarshalYAML() (interface{}, error)

MarshalYAML implements yaml.Marshaler interface

func (*Setting) MergeFrom

func (s *Setting) MergeFrom(from *Setting) *Setting

MergeFrom merges from specified source

func (*Setting) ScalarInt

func (s *Setting) ScalarInt() int

ScalarInt gets int scalar value of a setting

func (*Setting) ScalarString

func (s *Setting) ScalarString() string

ScalarString gets string scalar value of a setting

func (*Setting) SetAttribute

func (s *Setting) SetAttribute(name, value string) *Setting

SetAttribute sets attribute of the setting

func (*Setting) String

func (s *Setting) String() string

String gets string value of a setting. Vector is combined into one string

func (*Setting) StringFull

func (s *Setting) StringFull() string

String gets string value of a setting. Vector is combined into one string

func (*Setting) Type

func (s *Setting) Type() SettingType

Type gets type odf the setting

func (*Setting) VectorOfStrings

func (s *Setting) VectorOfStrings() []string

VectorOfStrings gets vector values of a setting

type SettingSource

type SettingSource struct {
	ValueFrom *DataSource `json:"valueFrom,omitempty" yaml:"valueFrom,omitempty"`
}

SettingSource defines setting as a ref to some data source

func (*SettingSource) DeepCopy

func (in *SettingSource) DeepCopy() *SettingSource

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

func (*SettingSource) DeepCopyInto

func (in *SettingSource) DeepCopyInto(out *SettingSource)

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

func (*SettingSource) GetNameKey

func (s *SettingSource) GetNameKey() (string, string)

GetNameKey gets name and key from the secret ref

func (*SettingSource) GetSecretKeyRef

func (s *SettingSource) GetSecretKeyRef() *core.SecretKeySelector

GetSecretKeyRef gets SecretKeySelector (typically named as SecretKeyRef) or nil

func (*SettingSource) HasSecretKeyRef

func (s *SettingSource) HasSecretKeyRef() bool

HasSecretKeyRef checks whether SecretKeySelector (typically named as SecretKeyRef) is available

func (*SettingSource) HasValue

func (s *SettingSource) HasValue() bool

HasValue checks whether SettingSource has no value

type SettingType

type SettingType string
const (
	SettingTypeUnknown SettingType = "unknown"
	SettingTypeScalar  SettingType = "scalar"
	SettingTypeVector  SettingType = "vector"
	SettingTypeSource  SettingType = "source"
)

type Settings

type Settings struct {
	// contains filtered or unexported fields
}

Settings specifies settings

func NewSettings

func NewSettings() *Settings

NewSettings creates new settings

func (*Settings) AsSortedSliceOfStrings

func (s *Settings) AsSortedSliceOfStrings() []string

AsSortedSliceOfStrings return settings as sorted strings

func (*Settings) DeepCopy

func (in *Settings) DeepCopy() *Settings

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

func (*Settings) DeepCopyInto

func (in *Settings) DeepCopyInto(out *Settings)

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

func (*Settings) Delete

func (s *Settings) Delete(name string)

Delete deletes named setting

func (*Settings) DeleteKey

func (s *Settings) DeleteKey(key string)

DeleteKey deletes key setting

func (*Settings) Ensure

func (s *Settings) Ensure() *Settings

Ensure ensures settings are in place

func (*Settings) Filter

func (s *Settings) Filter(
	includeSections []SettingsSection,
	excludeSections []SettingsSection,
	includeSettingWithNoSectionSpecified bool,
) (res *Settings)

Filter filters settings according to include and exclude lists

func (*Settings) Get

func (s *Settings) Get(name string) *Setting

Get gets named setting. Storage key is used internally.

func (*Settings) GetHTTPPort

func (s *Settings) GetHTTPPort() int32

GetHTTPPort gets HTTP port from settings

func (*Settings) GetHTTPSPort

func (s *Settings) GetHTTPSPort() int32

GetHTTPSPort gets HTTPS port from settings

func (*Settings) GetInterserverHTTPPort

func (s *Settings) GetInterserverHTTPPort() int32

GetInterserverHTTPPort gets interserver HTTP port from settings

func (*Settings) GetKey

func (s *Settings) GetKey(key string) *Setting

GetKey gets key setting.

func (*Settings) GetSection

func (s *Settings) GetSection(section SettingsSection, includeSettingWithNoSectionSpecified bool) (values map[string]string)

GetSection returns map of the specified settings section

func (*Settings) GetTCPPort

func (s *Settings) GetTCPPort() int32

GetTCPPort gets TCP port from settings

func (*Settings) GetTCPPortSecure

func (s *Settings) GetTCPPortSecure() int32

GetTCPPortSecure gets TCP port secure from settings

func (*Settings) Groups

func (s *Settings) Groups() []string

Groups gets groups of the settings

func (*Settings) Has

func (s *Settings) Has(name string) bool

Has checks whether named setting exists. Storage key is used internally.

func (*Settings) HasKey

func (s *Settings) HasKey(key string) bool

HasKey checks whether key setting exists.

func (*Settings) IsZero

func (s *Settings) IsZero() bool

IsZero checks whether settings is zero

func (*Settings) Key2Name

func (s *Settings) Key2Name(key string) string

Key2Name converts storage key to name. This is the opposite to Name2Key

func (*Settings) Keys

func (s *Settings) Keys() (keys []string)

Keys gets keys of the settings

func (*Settings) Len

func (s *Settings) Len() int

Len gets length of the settings

func (*Settings) MarshalJSON

func (s *Settings) MarshalJSON() ([]byte, error)

MarshalJSON marshals JSON

func (*Settings) MergeFrom

func (s *Settings) MergeFrom(src *Settings) *Settings

MergeFrom merges into `dst` non-empty new-key-values from `src` in case no such `key` already in `src`

func (*Settings) MergeFromCB

func (s *Settings) MergeFromCB(src *Settings, filter func(name string, setting *Setting) bool) *Settings

MergeFromCB merges settings from src approved by filtering callback function

func (*Settings) Name2Key

func (s *Settings) Name2Key(name string) string

Name2Key converts name to storage key. This is the opposite to Key2Name

func (*Settings) Names

func (s *Settings) Names() (names []string)

Names gets names of the settings

func (*Settings) Normalize

func (s *Settings) Normalize() *Settings

Normalize normalizes settings

func (*Settings) Prefixes

func (s *Settings) Prefixes(unique bool) (prefixes []string)

Prefixes gets prefixes of the settings

func (*Settings) Set

func (s *Settings) Set(name string, setting *Setting) *Settings

Set sets named setting. Storage key is used internally.

func (*Settings) SetIfNotExists

func (s *Settings) SetIfNotExists(name string, setting *Setting) *Settings

SetIfNotExists sets named setting

func (*Settings) SetKey

func (s *Settings) SetKey(key string, setting *Setting) *Settings

SetKey sets key setting.

func (*Settings) SetScalarsFromMap

func (s *Settings) SetScalarsFromMap(m map[string]string) *Settings

SetScalarsFromMap sets multiple scalars from map

func (*Settings) UnmarshalJSON

func (s *Settings) UnmarshalJSON(data []byte) error

UnmarshalJSON unmarshal JSON

func (*Settings) Walk

func (s *Settings) Walk(f func(name string, setting *Setting))

Walk walks over settings with a function. Function receives name and setting. Storage key is used internally.

func (*Settings) WalkKeys

func (s *Settings) WalkKeys(f func(key string, setting *Setting))

WalkKeys walks over settings with a function. Function receives key and setting.

func (*Settings) WalkKeysSafe

func (s *Settings) WalkKeysSafe(f func(key string, setting *Setting))

WalkKeysSafe walks over settings with a function. Function receives key and setting.

func (*Settings) WalkSafe

func (s *Settings) WalkSafe(f func(name string, setting *Setting))

WalkSafe walks over settings with a function. Function receives name and setting. Storage key is used internally.

type SettingsName2KeyConverter

type SettingsName2KeyConverter interface {
	// Name2Key converts name to storage key. This is the opposite to Key2Name
	Name2Key(name string) string
	// Key2Name converts storage key to name. This is the opposite to Name2Key
	Key2Name(key string) string
	// DeepCopySettingsName2KeyConverter is required for code auto-generator
	DeepCopySettingsName2KeyConverter() SettingsName2KeyConverter
}

SettingsName2KeyConverter is an interface to describe different converters. Implements 'Strategy' pattern.

type SettingsName2KeyConverterPlain

type SettingsName2KeyConverterPlain struct{}

SettingsName2KeyConverterPlain implements plain name to key conversion

func NewSettingsName2KeyConverterPlain

func NewSettingsName2KeyConverterPlain() SettingsName2KeyConverterPlain

NewSettingsName2KeyConverterPlain is a constructor

func (*SettingsName2KeyConverterPlain) DeepCopy

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

func (*SettingsName2KeyConverterPlain) DeepCopyInto

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

func (SettingsName2KeyConverterPlain) DeepCopySettingsName2KeyConverter

func (s SettingsName2KeyConverterPlain) DeepCopySettingsName2KeyConverter() SettingsName2KeyConverter

DeepCopySettingsName2KeyConverter is required for code auto-generator

func (SettingsName2KeyConverterPlain) Key2Name

Key2Name converts storage key to name. This is the opposite to Name2Key

func (SettingsName2KeyConverterPlain) Name2Key

func (s SettingsName2KeyConverterPlain) Name2Key(name string) string

Name2Key converts name to storage key. This is the opposite to Key2Name

type SettingsName2KeyConverterPrefix

type SettingsName2KeyConverterPrefix struct {
	// contains filtered or unexported fields
}

SettingsName2KeyConverterPrefix implements prefix name to key conversion

func NewSettingsName2KeyConverterPrefix

func NewSettingsName2KeyConverterPrefix(prefix string, separators ...string) SettingsName2KeyConverterPrefix

NewSettingsName2KeyConverterPrefix is a constructor

func (*SettingsName2KeyConverterPrefix) DeepCopy

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

func (*SettingsName2KeyConverterPrefix) DeepCopyInto

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

func (SettingsName2KeyConverterPrefix) DeepCopySettingsName2KeyConverter

func (s SettingsName2KeyConverterPrefix) DeepCopySettingsName2KeyConverter() SettingsName2KeyConverter

DeepCopySettingsName2KeyConverter is required for code auto-generator

func (SettingsName2KeyConverterPrefix) Key2Name

Key2Name converts storage key to name. This is the opposite to Name2Key

func (SettingsName2KeyConverterPrefix) Name2Key

Name2Key converts name to storage key. This is the opposite to Key2Name

func (SettingsName2KeyConverterPrefix) Prefix

Prefix gets full prefix

type SettingsSection

type SettingsSection string

SettingsSection specifies settings section

var (
	SectionEmpty  SettingsSection = ""
	SectionCommon SettingsSection = "COMMON"
	SectionUsers  SettingsSection = "USERS"
	SectionHost   SettingsSection = "HOST"
)

Configuration sections Each section renders into separate ConfigMap mapped into Pod as ClickHouse configuration file

func NewSettingsSectionFromString

func NewSettingsSectionFromString(section string) SettingsSection

NewSettingsSectionFromString creates SettingsSection from a string

func (SettingsSection) Equal

func (s SettingsSection) Equal(another SettingsSection) bool

Equal checks two SettingsSection for equality

func (SettingsSection) In

func (s SettingsSection) In(haystack []SettingsSection) bool

In checks whether needle is in haystack

func (SettingsSection) String

func (s SettingsSection) String() string

String implements stringer

type SettingsUser

type SettingsUser struct {
	Settings
	// contains filtered or unexported fields
}

SettingsUser specifies settings of a user

func NewSettingsUser

func NewSettingsUser(settings *Settings, username string) *SettingsUser

NewSettingsUser creates new user settings

func (*SettingsUser) DeepCopy

func (in *SettingsUser) DeepCopy() *SettingsUser

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

func (*SettingsUser) DeepCopyInto

func (in *SettingsUser) DeepCopyInto(out *SettingsUser)

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

func (*SettingsUser) Username

func (s *SettingsUser) Username() string

Username gets username

type StorageManagement

type StorageManagement struct {
	PVCProvisioner   PVCProvisioner   `json:"provisioner,omitempty"   yaml:"provisioner,omitempty"`
	PVCReclaimPolicy PVCReclaimPolicy `json:"reclaimPolicy,omitempty" yaml:"reclaimPolicy,omitempty"`
}

StorageManagement defines storage management config

func NewStorageManagement

func NewStorageManagement() *StorageManagement

NewStorageManagement creates new StorageManagement

func (*StorageManagement) DeepCopy

func (in *StorageManagement) DeepCopy() *StorageManagement

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

func (*StorageManagement) DeepCopyInto

func (in *StorageManagement) DeepCopyInto(out *StorageManagement)

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

func (*StorageManagement) MergeFrom

func (storageManagement *StorageManagement) MergeFrom(from *StorageManagement, _type MergeType) *StorageManagement

MergeFrom merges from specified object

type StringBool

type StringBool string

StringBool defines string representation of a bool type

func NewStringBool

func NewStringBool(value ...bool) *StringBool

NewStringBool creates new StringBool variable with optional value

func (*StringBool) CastTo01

func (s *StringBool) CastTo01(defaultValue bool) string

CastTo01 casts string-bool into string "0"/"1"

func (*StringBool) CastToStringTrueFalse

func (s *StringBool) CastToStringTrueFalse(defaultValue bool) string

CastToStringTrueFalse casts string-bool into string "true"/"false"

func (*StringBool) From

func (s *StringBool) From(value bool) *StringBool

From casts bool to a StringBool

func (*StringBool) HasValue

func (s *StringBool) HasValue() bool

HasValue checks whether value is specified

func (*StringBool) IsFalse

func (s *StringBool) IsFalse() bool

IsFalse checks whether str is a string as bool "false" value

func (*StringBool) IsTrue

func (s *StringBool) IsTrue() bool

IsTrue checks whether str is a string as bool "true" value

func (*StringBool) IsValid

func (s *StringBool) IsValid() bool

IsValid checks whether StringBool has a proper value

func (*StringBool) MergeFrom

func (s *StringBool) MergeFrom(from *StringBool) *StringBool

MergeFrom merges value from another variable

func (*StringBool) Normalize

func (s *StringBool) Normalize(defaultValue bool) *StringBool

Normalize normalizes StringBool value with fallback to defaultValue in case initial value is incorrect

func (*StringBool) String

func (s *StringBool) String() string

String casts StringBool to a string

func (*StringBool) Value

func (s *StringBool) Value() bool

Value returns bool value

type TemplateRef

type TemplateRef struct {
	Name      string `json:"name,omitempty"      yaml:"name,omitempty"`
	Namespace string `json:"namespace,omitempty" yaml:"namespace,omitempty"`
	UseType   string `json:"useType,omitempty"   yaml:"useType,omitempty"`
}

TemplateRef defines UseTemplate section of ClickHouseInstallation resource

func (*TemplateRef) DeepCopy

func (in *TemplateRef) DeepCopy() *TemplateRef

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

func (*TemplateRef) DeepCopyInto

func (in *TemplateRef) DeepCopyInto(out *TemplateRef)

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

type Templates

type Templates struct {
	// Templates
	HostTemplates        []HostTemplate        `json:"hostTemplates,omitempty"        yaml:"hostTemplates,omitempty"`
	PodTemplates         []PodTemplate         `json:"podTemplates,omitempty"         yaml:"podTemplates,omitempty"`
	VolumeClaimTemplates []VolumeClaimTemplate `json:"volumeClaimTemplates,omitempty" yaml:"volumeClaimTemplates,omitempty"`
	ServiceTemplates     []ServiceTemplate     `json:"serviceTemplates,omitempty"     yaml:"serviceTemplates,omitempty"`

	// Index maps template name to template itself
	HostTemplatesIndex        *HostTemplatesIndex        `json:",omitempty" yaml:",omitempty" testdiff:"ignore"`
	PodTemplatesIndex         *PodTemplatesIndex         `json:",omitempty" yaml:",omitempty" testdiff:"ignore"`
	VolumeClaimTemplatesIndex *VolumeClaimTemplatesIndex `json:",omitempty" yaml:",omitempty" testdiff:"ignore"`
	ServiceTemplatesIndex     *ServiceTemplatesIndex     `json:",omitempty" yaml:",omitempty" testdiff:"ignore"`
}

Templates defines templates section of .spec

func NewChiTemplates

func NewChiTemplates() *Templates

NewChiTemplates creates new Templates object

func (*Templates) DeepCopy

func (in *Templates) DeepCopy() *Templates

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

func (*Templates) DeepCopyInto

func (in *Templates) DeepCopyInto(out *Templates)

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

func (*Templates) EnsureHostTemplatesIndex

func (templates *Templates) EnsureHostTemplatesIndex() *HostTemplatesIndex

EnsureHostTemplatesIndex ensures index exists

func (*Templates) EnsurePodTemplatesIndex

func (templates *Templates) EnsurePodTemplatesIndex() *PodTemplatesIndex

EnsurePodTemplatesIndex ensures index exists

func (*Templates) EnsureServiceTemplatesIndex

func (templates *Templates) EnsureServiceTemplatesIndex() *ServiceTemplatesIndex

EnsureServiceTemplatesIndex ensures index exists

func (*Templates) EnsureVolumeClaimTemplatesIndex

func (templates *Templates) EnsureVolumeClaimTemplatesIndex() *VolumeClaimTemplatesIndex

EnsureVolumeClaimTemplatesIndex ensures index exists

func (*Templates) GetHostTemplates

func (templates *Templates) GetHostTemplates() []HostTemplate

func (*Templates) GetHostTemplatesIndex

func (templates *Templates) GetHostTemplatesIndex() *HostTemplatesIndex

GetHostTemplatesIndex returns index of host templates

func (*Templates) GetPodTemplates

func (templates *Templates) GetPodTemplates() []PodTemplate

func (*Templates) GetPodTemplatesIndex

func (templates *Templates) GetPodTemplatesIndex() *PodTemplatesIndex

GetPodTemplatesIndex returns index of pod templates

func (*Templates) GetServiceTemplates

func (templates *Templates) GetServiceTemplates() []ServiceTemplate

func (*Templates) GetServiceTemplatesIndex

func (templates *Templates) GetServiceTemplatesIndex() *ServiceTemplatesIndex

GetServiceTemplatesIndex returns index of Service templates

func (*Templates) GetVolumeClaimTemplates

func (templates *Templates) GetVolumeClaimTemplates() []VolumeClaimTemplate

func (*Templates) GetVolumeClaimTemplatesIndex

func (templates *Templates) GetVolumeClaimTemplatesIndex() *VolumeClaimTemplatesIndex

GetVolumeClaimTemplatesIndex returns index of VolumeClaim templates

func (*Templates) Len

func (templates *Templates) Len() int

Len returns accumulated len of all templates

func (*Templates) MergeFrom

func (templates *Templates) MergeFrom(_from any, _type MergeType) *Templates

MergeFrom merges from specified object

type VolumeClaimTemplate

type VolumeClaimTemplate struct {
	Name string `json:"name"                    yaml:"name"`
	StorageManagement
	ObjectMeta meta.ObjectMeta                `json:"metadata,omitempty"      yaml:"metadata,omitempty"`
	Spec       core.PersistentVolumeClaimSpec `json:"spec,omitempty"          yaml:"spec,omitempty"`
}

VolumeClaimTemplate defines PersistentVolumeClaim Template

func (*VolumeClaimTemplate) DeepCopy

func (in *VolumeClaimTemplate) DeepCopy() *VolumeClaimTemplate

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

func (*VolumeClaimTemplate) DeepCopyInto

func (in *VolumeClaimTemplate) DeepCopyInto(out *VolumeClaimTemplate)

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

type VolumeClaimTemplatesIndex

type VolumeClaimTemplatesIndex struct {
	// contains filtered or unexported fields
}

VolumeClaimTemplatesIndex describes index of volume claim templates

func NewVolumeClaimTemplatesIndex

func NewVolumeClaimTemplatesIndex() *VolumeClaimTemplatesIndex

NewVolumeClaimTemplatesIndex creates new VolumeClaimTemplatesIndex object

func (*VolumeClaimTemplatesIndex) DeepCopy

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

func (*VolumeClaimTemplatesIndex) DeepCopyInto

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

func (*VolumeClaimTemplatesIndex) Get

Get returns entity `name` from the index

func (*VolumeClaimTemplatesIndex) Has

func (i *VolumeClaimTemplatesIndex) Has(name string) bool

Has checks whether index has entity `name`

func (*VolumeClaimTemplatesIndex) Set

Set sets named template into index

func (*VolumeClaimTemplatesIndex) Walk

func (i *VolumeClaimTemplatesIndex) Walk(f func(template *VolumeClaimTemplate))

Walk calls specified function over each entry in the index

type WalkHostsAddressFn

type WalkHostsAddressFn func(
	chi *ClickHouseInstallation,
	cluster *Cluster,
	shard *ChiShard,
	replica *ChiReplica,
	host *ChiHost,
	address *HostAddress,
) error

WalkHostsAddressFn specifies function to walk over hosts

type WhichStatefulSet

type WhichStatefulSet string

WhichStatefulSet specifies which StatefulSet we are going to process in host functions

const (
	// CurStatefulSet specifies current StatefulSet to be processed
	CurStatefulSet WhichStatefulSet = "cur"
	// DesiredStatefulSet specifies desired StatefulSet to be processed
	DesiredStatefulSet WhichStatefulSet = "desired"
)

func (WhichStatefulSet) CurStatefulSet

func (w WhichStatefulSet) CurStatefulSet() bool

CurStatefulSet checks whether WhichStatefulSet is a current one

func (WhichStatefulSet) DesiredStatefulSet

func (w WhichStatefulSet) DesiredStatefulSet() bool

DesiredStatefulSet checks whether WhichStatefulSet is a desired one

Jump to

Keyboard shortcuts

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