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 ClickHouseKeeper custom resource.
Index ¶
- Constants
- Variables
- type ChkClusterAddress
- func (in *ChkClusterAddress) DeepCopy() *ChkClusterAddress
- func (in *ChkClusterAddress) DeepCopyInto(out *ChkClusterAddress)
- func (a *ChkClusterAddress) GetCRName() string
- func (a *ChkClusterAddress) GetClusterIndex() int
- func (a *ChkClusterAddress) GetClusterName() string
- func (a *ChkClusterAddress) GetNamespace() string
- func (a *ChkClusterAddress) SetCRName(name string)
- func (a *ChkClusterAddress) SetClusterIndex(index int)
- func (a *ChkClusterAddress) SetClusterName(name string)
- func (a *ChkClusterAddress) SetNamespace(namespace string)
- type ChkClusterLayout
- type ChkClusterRuntime
- func (in *ChkClusterRuntime) DeepCopy() *ChkClusterRuntime
- func (in *ChkClusterRuntime) DeepCopyInto(out *ChkClusterRuntime)
- func (r *ChkClusterRuntime) GetAddress() apiChi.IClusterAddress
- func (r ChkClusterRuntime) GetCR() apiChi.ICustomResource
- func (r *ChkClusterRuntime) SetCR(cr apiChi.ICustomResource)
- type ChkReplica
- func (in *ChkReplica) DeepCopy() *ChkReplica
- func (in *ChkReplica) DeepCopyInto(out *ChkReplica)
- func (replica *ChkReplica) GetFiles() *apiChi.Settings
- func (replica *ChkReplica) GetName() string
- func (replica *ChkReplica) GetRuntime() apiChi.IReplicaRuntime
- func (replica *ChkReplica) GetServiceTemplate() (*apiChi.ServiceTemplate, bool)
- func (replica *ChkReplica) GetSettings() *apiChi.Settings
- func (replica *ChkReplica) GetTemplates() *apiChi.TemplatesList
- func (replica *ChkReplica) HasFiles() bool
- func (replica *ChkReplica) HasSettings() bool
- func (replica *ChkReplica) HasShardsCount() bool
- func (replica *ChkReplica) HasTemplates() bool
- func (replica *ChkReplica) HostsCount() int
- func (replica *ChkReplica) InheritFilesFrom(cluster *Cluster)
- func (replica *ChkReplica) InheritSettingsFrom(cluster *Cluster)
- func (replica *ChkReplica) InheritTemplatesFrom(cluster *Cluster)
- func (replica *ChkReplica) WalkHosts(f func(host *apiChi.Host) error) []error
- type ChkReplicaAddress
- func (in *ChkReplicaAddress) DeepCopy() *ChkReplicaAddress
- func (in *ChkReplicaAddress) DeepCopyInto(out *ChkReplicaAddress)
- func (a *ChkReplicaAddress) GetCRName() string
- func (a *ChkReplicaAddress) GetClusterIndex() int
- func (a *ChkReplicaAddress) GetClusterName() string
- func (a *ChkReplicaAddress) GetNamespace() string
- func (a *ChkReplicaAddress) GetReplicaIndex() int
- func (a *ChkReplicaAddress) GetReplicaName() string
- func (a *ChkReplicaAddress) SetCRName(name string)
- func (a *ChkReplicaAddress) SetClusterIndex(index int)
- func (a *ChkReplicaAddress) SetClusterName(name string)
- func (a *ChkReplicaAddress) SetNamespace(namespace string)
- func (a *ChkReplicaAddress) SetReplicaIndex(index int)
- func (a *ChkReplicaAddress) SetReplicaName(name string)
- type ChkReplicaRuntime
- type ChkShard
- func (in *ChkShard) DeepCopy() *ChkShard
- func (in *ChkShard) DeepCopyInto(out *ChkShard)
- func (shard *ChkShard) FindHost(needle interface{}) (res *apiChi.Host)
- func (shard *ChkShard) FirstHost() *apiChi.Host
- func (shard *ChkShard) GetCHK() *ClickHouseKeeperInstallation
- func (shard *ChkShard) GetCluster() *Cluster
- func (shard *ChkShard) GetFiles() *apiChi.Settings
- func (shard *ChkShard) GetInternalReplication() *types.StringBool
- func (shard *ChkShard) GetName() string
- func (shard *ChkShard) GetRuntime() apiChi.IShardRuntime
- func (shard *ChkShard) GetServiceTemplate() (*apiChi.ServiceTemplate, bool)
- func (shard *ChkShard) GetSettings() *apiChi.Settings
- func (shard *ChkShard) GetTemplates() *apiChi.TemplatesList
- func (shard *ChkShard) GetWeight() int
- func (shard *ChkShard) HasFiles() bool
- func (shard *ChkShard) HasReplicasCount() bool
- func (shard *ChkShard) HasSettings() bool
- func (shard *ChkShard) HasTemplates() bool
- func (shard *ChkShard) HasWeight() bool
- func (shard *ChkShard) HostsCount() int
- func (shard *ChkShard) InheritFilesFrom(cluster *Cluster)
- func (shard *ChkShard) InheritSettingsFrom(cluster *Cluster)
- func (shard *ChkShard) InheritTemplatesFrom(cluster *Cluster)
- func (shard *ChkShard) WalkHosts(f func(host *apiChi.Host) error) []error
- func (shard *ChkShard) WalkHostsAbortOnError(f func(host *apiChi.Host) error) error
- type ChkShardAddress
- func (in *ChkShardAddress) DeepCopy() *ChkShardAddress
- func (in *ChkShardAddress) DeepCopyInto(out *ChkShardAddress)
- func (a *ChkShardAddress) GetCRName() string
- func (a *ChkShardAddress) GetClusterIndex() int
- func (a *ChkShardAddress) GetClusterName() string
- func (a *ChkShardAddress) GetNamespace() string
- func (a *ChkShardAddress) GetShardIndex() int
- func (a *ChkShardAddress) GetShardName() string
- func (a *ChkShardAddress) SetCRName(name string)
- func (a *ChkShardAddress) SetClusterIndex(index int)
- func (a *ChkShardAddress) SetClusterName(name string)
- func (a *ChkShardAddress) SetNamespace(namespace string)
- func (a *ChkShardAddress) SetShardIndex(index int)
- func (a *ChkShardAddress) SetShardName(name string)
- type ChkShardRuntime
- type ChkSpec
- func (in *ChkSpec) DeepCopy() *ChkSpec
- func (in *ChkSpec) DeepCopyInto(out *ChkSpec)
- func (spec *ChkSpec) GetConfiguration() apiChi.IConfiguration
- func (spec *ChkSpec) GetDefaults() *apiChi.Defaults
- func (spec *ChkSpec) GetNamespaceDomainPattern() *types.String
- func (spec *ChkSpec) GetTaskID() string
- func (spec *ChkSpec) GetTemplates() *apiChi.Templates
- func (spec *ChkSpec) HasTaskID() bool
- func (spec *ChkSpec) MergeFrom(from *ChkSpec, _type apiChi.MergeType)
- type ClickHouseKeeperInstallation
- func (cr *ClickHouseKeeperInstallation) ClustersCount() int
- func (cr *ClickHouseKeeperInstallation) Copy(opts types.CopyCROptions) *ClickHouseKeeperInstallation
- func (in *ClickHouseKeeperInstallation) DeepCopy() *ClickHouseKeeperInstallation
- func (in *ClickHouseKeeperInstallation) DeepCopyInto(out *ClickHouseKeeperInstallation)
- func (in *ClickHouseKeeperInstallation) DeepCopyObject() runtime.Object
- func (cr *ClickHouseKeeperInstallation) EnsureStatus() *Status
- func (cr *ClickHouseKeeperInstallation) Fill()
- func (cr *ClickHouseKeeperInstallation) FillStatus(endpoint string, pods, fqdns []string, ip string)
- func (cr *ClickHouseKeeperInstallation) FindCluster(needle interface{}) apiChi.ICluster
- func (cr *ClickHouseKeeperInstallation) FindHost(needleCluster interface{}, needleShard interface{}, needleHost interface{}) *apiChi.Host
- func (cr *ClickHouseKeeperInstallation) FindShard(needleCluster interface{}, needleShard interface{}) apiChi.IShard
- func (cr *ClickHouseKeeperInstallation) FirstHost() *apiChi.Host
- func (cr *ClickHouseKeeperInstallation) FoundIn(haystack []*ClickHouseKeeperInstallation) bool
- func (cr *ClickHouseKeeperInstallation) GetAncestor() apiChi.ICustomResource
- func (cr *ClickHouseKeeperInstallation) GetAncestorT() *ClickHouseKeeperInstallation
- func (cr *ClickHouseKeeperInstallation) GetAnnotations() map[string]string
- func (cr *ClickHouseKeeperInstallation) GetHostTemplate(name string) (*apiChi.HostTemplate, bool)
- func (cr *ClickHouseKeeperInstallation) GetLabels() map[string]string
- func (cr *ClickHouseKeeperInstallation) GetName() string
- func (cr *ClickHouseKeeperInstallation) GetNamespace() string
- func (cr *ClickHouseKeeperInstallation) GetPodTemplate(name string) (*apiChi.PodTemplate, bool)
- func (cr *ClickHouseKeeperInstallation) GetReconciling() *apiChi.Reconciling
- func (cr *ClickHouseKeeperInstallation) GetRootServiceTemplate() (*apiChi.ServiceTemplate, bool)
- func (cr *ClickHouseKeeperInstallation) GetRuntime() apiChi.ICustomResourceRuntime
- func (cr *ClickHouseKeeperInstallation) GetServiceTemplate(name string) (*apiChi.ServiceTemplate, bool)
- func (cr *ClickHouseKeeperInstallation) GetSpec() apiChi.ICRSpec
- func (cr *ClickHouseKeeperInstallation) GetSpecA() any
- func (cr *ClickHouseKeeperInstallation) GetSpecT() *ChkSpec
- func (cr *ClickHouseKeeperInstallation) GetStatus() apiChi.IStatus
- func (cr *ClickHouseKeeperInstallation) GetTarget() *ClickHouseKeeperInstallation
- func (cr *ClickHouseKeeperInstallation) GetUsedTemplates() []*apiChi.TemplateRef
- func (cr *ClickHouseKeeperInstallation) GetVolumeClaimTemplate(name string) (*apiChi.VolumeClaimTemplate, bool)
- func (cr *ClickHouseKeeperInstallation) HasAncestor() bool
- func (cr *ClickHouseKeeperInstallation) HasStatus() bool
- func (cr *ClickHouseKeeperInstallation) HasTarget() bool
- func (cr *ClickHouseKeeperInstallation) HostsCount() int
- func (cr *ClickHouseKeeperInstallation) HostsCountAttributes(a *apiChi.HostReconcileAttributes) int
- func (cr *ClickHouseKeeperInstallation) IEnsureStatus() apiChi.IStatus
- func (cr *ClickHouseKeeperInstallation) IsAuto() bool
- func (cr *ClickHouseKeeperInstallation) IsNonZero() bool
- func (cr *ClickHouseKeeperInstallation) IsRollingUpdate() bool
- func (cr *ClickHouseKeeperInstallation) IsStopped() bool
- func (cr *ClickHouseKeeperInstallation) IsTroubleshoot() bool
- func (cr *ClickHouseKeeperInstallation) JSON(opts types.CopyCROptions) string
- func (cr *ClickHouseKeeperInstallation) MatchFullName(namespace, name string) bool
- func (cr *ClickHouseKeeperInstallation) MatchNamespace(namespace string) bool
- func (cr *ClickHouseKeeperInstallation) MergeFrom(from *ClickHouseKeeperInstallation, _type apiChi.MergeType)
- func (cr *ClickHouseKeeperInstallation) SetAncestor(a *ClickHouseKeeperInstallation)
- func (cr *ClickHouseKeeperInstallation) SetTarget(a *ClickHouseKeeperInstallation)
- func (cr *ClickHouseKeeperInstallation) ShardsCount() int
- func (cr *ClickHouseKeeperInstallation) WalkClusters(f func(i apiChi.ICluster) error) []error
- func (cr *ClickHouseKeeperInstallation) WalkClustersFullPath(...) []error
- func (cr *ClickHouseKeeperInstallation) WalkHosts(f func(host *apiChi.Host) error) []error
- func (cr *ClickHouseKeeperInstallation) WalkHostsFullPath(f apiChi.WalkHostsAddressFn) []error
- func (cr *ClickHouseKeeperInstallation) WalkHostsFullPathAndScope(crScopeCycleSize int, clusterScopeCycleSize int, f apiChi.WalkHostsAddressFn) (res []error)
- func (cr *ClickHouseKeeperInstallation) WalkPodTemplates(f func(template *apiChi.PodTemplate))
- func (cr *ClickHouseKeeperInstallation) WalkShards(f func(shard *ChkShard) error) []error
- func (cr *ClickHouseKeeperInstallation) WalkTillError(ctx context.Context, ...) error
- func (cr *ClickHouseKeeperInstallation) WalkVolumeClaimTemplates(f func(template *apiChi.VolumeClaimTemplate))
- func (cr *ClickHouseKeeperInstallation) YAML(opts types.CopyCROptions) string
- type ClickHouseKeeperInstallationList
- type ClickHouseKeeperInstallationRuntime
- func (in *ClickHouseKeeperInstallationRuntime) DeepCopy() *ClickHouseKeeperInstallationRuntime
- func (in *ClickHouseKeeperInstallationRuntime) DeepCopyInto(out *ClickHouseKeeperInstallationRuntime)
- func (runtime *ClickHouseKeeperInstallationRuntime) GetAttributes() *apiChi.ComparableAttributes
- func (runtime *ClickHouseKeeperInstallationRuntime) LockCommonConfig()
- func (runtime *ClickHouseKeeperInstallationRuntime) UnlockCommonConfig()
- type Cluster
- func (in *Cluster) DeepCopy() *Cluster
- func (in *Cluster) DeepCopyInto(out *Cluster)
- func (cluster *Cluster) FillShardReplicaSpecified()
- func (cluster *Cluster) FindHost(needleShard interface{}, needleHost interface{}) *apiChi.Host
- func (cluster *Cluster) FindShard(needle interface{}) apiChi.IShard
- func (cluster *Cluster) FirstHost() *apiChi.Host
- func (cluster *Cluster) GetInsecure() *types.StringBool
- func (cluster *Cluster) GetLayout() *ChkClusterLayout
- func (cluster *Cluster) GetName() string
- func (cluster *Cluster) GetOrCreateHost(shard, replica int) *apiChi.Host
- func (cluster *Cluster) GetPDBMaxUnavailable() *types.Int32
- func (cluster *Cluster) GetReplica(replica int) *ChkReplica
- func (cluster *Cluster) GetRuntime() apiChi.IClusterRuntime
- func (c *Cluster) GetSchemaPolicy() *apiChi.SchemaPolicy
- func (c *Cluster) GetSecret() *apiChi.ClusterSecret
- func (cluster *Cluster) GetSecure() *types.StringBool
- func (cluster *Cluster) GetServiceTemplate() (*apiChi.ServiceTemplate, bool)
- func (cluster *Cluster) GetShard(shard int) *ChkShard
- func (c *Cluster) GetZookeeper() *apiChi.ZookeeperConfig
- func (cluster *Cluster) HostsCount() int
- func (cluster *Cluster) InheritFilesFrom(chk *ClickHouseKeeperInstallation)
- func (cluster *Cluster) InheritTemplatesFrom(chk *ClickHouseKeeperInstallation)
- func (cluster *Cluster) IsShardSpecified() bool
- func (cluster *Cluster) WalkHosts(f func(host *apiChi.Host) error) []error
- func (cluster *Cluster) WalkHostsByReplicas(f func(shard, replica int, host *apiChi.Host) error) []error
- func (cluster *Cluster) WalkHostsByShards(f func(shard, replica int, host *apiChi.Host) error) []error
- func (cluster *Cluster) WalkReplicas(f func(index int, replica *ChkReplica) error) []error
- func (cluster *Cluster) WalkShards(f func(index int, shard apiChi.IShard) error) []error
- type Configuration
- func (in *Configuration) DeepCopy() *Configuration
- func (in *Configuration) DeepCopyInto(out *Configuration)
- func (c *Configuration) GetCluster(i int) *Cluster
- func (c *Configuration) GetClusters() []*Cluster
- func (c *Configuration) GetFiles() *apiChi.Settings
- func (c *Configuration) GetProfiles() *apiChi.Settings
- func (c *Configuration) GetQuotas() *apiChi.Settings
- func (c *Configuration) GetSettings() *apiChi.Settings
- func (c *Configuration) MergeFrom(from *Configuration, _type apiChi.MergeType) *Configuration
- type FillStatusParams
- type Status
- func (s *Status) ClearNormalizedCR()
- func (s *Status) CopyFrom(f *Status, opts types.CopyStatusOptions)
- func (in *Status) DeepCopy() *Status
- func (in *Status) DeepCopyInto(out *Status)
- func (s *Status) DeleteStart()
- func (s *Status) Fill(params *FillStatusParams)
- func (s *Status) GetAction() string
- func (s *Status) GetActions() []string
- func (s *Status) GetCHOpCommit() string
- func (s *Status) GetCHOpDate() string
- func (s *Status) GetCHOpIP() string
- func (s *Status) GetCHOpVersion() string
- func (s *Status) GetClustersCount() int
- func (s *Status) GetEndpoint() string
- func (s *Status) GetError() string
- func (s *Status) GetErrors() []string
- func (s *Status) GetFQDNs() []string
- func (s *Status) GetHostsAddedCount() int
- func (s *Status) GetHostsCompletedCount() int
- func (s *Status) GetHostsCount() int
- func (s *Status) GetHostsDeleteCount() int
- func (s *Status) GetHostsDeletedCount() int
- func (s *Status) GetHostsFailedCount() int
- func (s *Status) GetHostsUnchangedCount() int
- func (s *Status) GetHostsUpdatedCount() int
- func (s *Status) GetHostsWithTablesCreated() []string
- func (s *Status) GetNormalizedCR() *ClickHouseKeeperInstallation
- func (s *Status) GetNormalizedCRCompleted() *ClickHouseKeeperInstallation
- func (s *Status) GetPodIPs() []string
- func (s *Status) GetPods() []string
- func (s *Status) GetReplicasCount() int
- func (s *Status) GetShardsCount() int
- func (s *Status) GetStatus() string
- func (s *Status) GetTaskID() string
- func (s *Status) GetTaskIDsCompleted() []string
- func (s *Status) GetTaskIDsStarted() []string
- func (s *Status) GetUsedTemplatesCount() int
- func (s *Status) HasNormalizedCR() bool
- func (s *Status) HasNormalizedCRCompleted() bool
- func (s *Status) HostAdded()
- func (s *Status) HostCompleted()
- func (s *Status) HostDeleted()
- func (s *Status) HostFailed()
- func (s *Status) HostUnchanged()
- func (s *Status) HostUpdated()
- func (s *Status) PushAction(action string)
- func (s *Status) PushError(error string)
- func (s *Status) PushHostTablesCreated(host string)
- func (s *Status) PushUsedTemplate(templateRef *apiChi.TemplateRef)
- func (s *Status) ReconcileAbort()
- func (s *Status) ReconcileComplete()
- func (s *Status) ReconcileStart(deleteHostsCount int)
- func (s *Status) SetAction(action string)
- func (s *Status) SetAndPushError(err string)
- func (s *Status) SetError(err string)
- func (s *Status) SetNormalizedCompletedFromCurrentNormalized()
- func (s *Status) SetPodIPs(podIPs []string)
- func (s *Status) SyncHostTablesCreated()
Constants ¶
const ( StatusInProgress = "InProgress" StatusCompleted = "Completed" StatusAborted = "Aborted" StatusTerminating = "Terminating" )
Possible CR statuses
const (
// APIVersion is the version of the ClickHouse Keeper Operator API.
APIVersion = "v1"
)
const (
ClickHouseKeeperInstallationCRDResourceKind = "ClickHouseKeeperInstallation"
)
Possible kinds of CRDs
Variables ¶
var ( // SchemeGroupVersion is group version used to register these objects SchemeGroupVersion = schema.GroupVersion{ Group: clickhouse_keeper_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 )
Functions ¶
This section is empty.
Types ¶
type ChkClusterAddress ¶
type ChkClusterAddress 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"` }
ChkClusterAddress defines address of a cluster within ClickHouseInstallation
func (*ChkClusterAddress) DeepCopy ¶
func (in *ChkClusterAddress) DeepCopy() *ChkClusterAddress
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChkClusterAddress.
func (*ChkClusterAddress) DeepCopyInto ¶
func (in *ChkClusterAddress) DeepCopyInto(out *ChkClusterAddress)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ChkClusterAddress) GetCRName ¶
func (a *ChkClusterAddress) GetCRName() string
func (*ChkClusterAddress) GetClusterIndex ¶
func (a *ChkClusterAddress) GetClusterIndex() int
func (*ChkClusterAddress) GetClusterName ¶
func (a *ChkClusterAddress) GetClusterName() string
func (*ChkClusterAddress) GetNamespace ¶
func (a *ChkClusterAddress) GetNamespace() string
func (*ChkClusterAddress) SetCRName ¶
func (a *ChkClusterAddress) SetCRName(name string)
func (*ChkClusterAddress) SetClusterIndex ¶
func (a *ChkClusterAddress) SetClusterIndex(index int)
func (*ChkClusterAddress) SetClusterName ¶
func (a *ChkClusterAddress) SetClusterName(name string)
func (*ChkClusterAddress) SetNamespace ¶
func (a *ChkClusterAddress) SetNamespace(namespace string)
type ChkClusterLayout ¶
type ChkClusterLayout struct { ShardsCount int `json:"shardsCount,omitempty" yaml:"shardsCount,omitempty"` ReplicasCount int `json:"replicasCount,omitempty" yaml:"replicasCount,omitempty"` // TODO refactor into map[string]ChiShard Shards []*ChkShard `json:"shards,omitempty" yaml:"shards,omitempty"` Replicas []*ChkReplica `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 *apiChi.HostsField `json:"-" yaml:"-" testdiff:"ignore"` }
ChkClusterLayout defines layout section of .spec.configuration.clusters
func NewChkClusterLayout ¶
func NewChkClusterLayout() *ChkClusterLayout
NewChiClusterLayout creates new cluster layout
func (*ChkClusterLayout) DeepCopy ¶
func (in *ChkClusterLayout) DeepCopy() *ChkClusterLayout
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChkClusterLayout.
func (*ChkClusterLayout) DeepCopyInto ¶
func (in *ChkClusterLayout) DeepCopyInto(out *ChkClusterLayout)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ChkClusterLayout) GetReplicasCount ¶
func (l *ChkClusterLayout) GetReplicasCount() int
type ChkClusterRuntime ¶
type ChkClusterRuntime struct { Address ChkClusterAddress `json:"-" yaml:"-"` CHK *ClickHouseKeeperInstallation `json:"-" yaml:"-" testdiff:"ignore"` }
func (*ChkClusterRuntime) DeepCopy ¶
func (in *ChkClusterRuntime) DeepCopy() *ChkClusterRuntime
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChkClusterRuntime.
func (*ChkClusterRuntime) DeepCopyInto ¶
func (in *ChkClusterRuntime) DeepCopyInto(out *ChkClusterRuntime)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ChkClusterRuntime) GetAddress ¶
func (r *ChkClusterRuntime) GetAddress() apiChi.IClusterAddress
func (ChkClusterRuntime) GetCR ¶
func (r ChkClusterRuntime) GetCR() apiChi.ICustomResource
func (*ChkClusterRuntime) SetCR ¶
func (r *ChkClusterRuntime) SetCR(cr apiChi.ICustomResource)
type ChkReplica ¶
type ChkReplica struct { Name string `json:"name,omitempty" yaml:"name,omitempty"` Settings *apiChi.Settings `json:"settings,omitempty" yaml:"settings,omitempty"` Files *apiChi.Settings `json:"files,omitempty" yaml:"files,omitempty"` Templates *apiChi.TemplatesList `json:"templates,omitempty" yaml:"templates,omitempty"` ShardsCount int `json:"shardsCount,omitempty" yaml:"shardsCount,omitempty"` // TODO refactor into map[string]Host Hosts []*apiChi.Host `json:"shards,omitempty" yaml:"shards,omitempty"` Runtime ChkReplicaRuntime `json:"-" yaml:"-"` }
ChiReplica defines item of a replica section of .spec.configuration.clusters[n].replicas TODO unify with ChiShard based on HostsSet
func (*ChkReplica) DeepCopy ¶
func (in *ChkReplica) DeepCopy() *ChkReplica
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChkReplica.
func (*ChkReplica) DeepCopyInto ¶
func (in *ChkReplica) DeepCopyInto(out *ChkReplica)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ChkReplica) GetFiles ¶
func (replica *ChkReplica) GetFiles() *apiChi.Settings
func (*ChkReplica) GetName ¶
func (replica *ChkReplica) GetName() string
func (*ChkReplica) GetRuntime ¶
func (replica *ChkReplica) GetRuntime() apiChi.IReplicaRuntime
func (*ChkReplica) GetServiceTemplate ¶
func (replica *ChkReplica) GetServiceTemplate() (*apiChi.ServiceTemplate, bool)
GetServiceTemplate gets service template
func (*ChkReplica) GetSettings ¶
func (replica *ChkReplica) GetSettings() *apiChi.Settings
func (*ChkReplica) GetTemplates ¶
func (replica *ChkReplica) GetTemplates() *apiChi.TemplatesList
func (*ChkReplica) HasFiles ¶
func (replica *ChkReplica) HasFiles() bool
func (*ChkReplica) HasSettings ¶
func (replica *ChkReplica) HasSettings() bool
func (*ChkReplica) HasShardsCount ¶
func (replica *ChkReplica) HasShardsCount() bool
HasShardsCount checks whether replica has shards count specified
func (*ChkReplica) HasTemplates ¶
func (replica *ChkReplica) HasTemplates() bool
func (*ChkReplica) HostsCount ¶
func (replica *ChkReplica) HostsCount() int
HostsCount returns number of hosts
func (*ChkReplica) InheritFilesFrom ¶
func (replica *ChkReplica) InheritFilesFrom(cluster *Cluster)
InheritFilesFrom inherits files from specified cluster
func (*ChkReplica) InheritSettingsFrom ¶
func (replica *ChkReplica) InheritSettingsFrom(cluster *Cluster)
InheritSettingsFrom inherits settings from specified cluster
func (*ChkReplica) InheritTemplatesFrom ¶
func (replica *ChkReplica) InheritTemplatesFrom(cluster *Cluster)
InheritTemplatesFrom inherits templates from specified cluster
type ChkReplicaAddress ¶
type ChkReplicaAddress 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 (*ChkReplicaAddress) DeepCopy ¶
func (in *ChkReplicaAddress) DeepCopy() *ChkReplicaAddress
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChkReplicaAddress.
func (*ChkReplicaAddress) DeepCopyInto ¶
func (in *ChkReplicaAddress) DeepCopyInto(out *ChkReplicaAddress)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ChkReplicaAddress) GetCRName ¶
func (a *ChkReplicaAddress) GetCRName() string
func (*ChkReplicaAddress) GetClusterIndex ¶
func (a *ChkReplicaAddress) GetClusterIndex() int
func (*ChkReplicaAddress) GetClusterName ¶
func (a *ChkReplicaAddress) GetClusterName() string
func (*ChkReplicaAddress) GetNamespace ¶
func (a *ChkReplicaAddress) GetNamespace() string
func (*ChkReplicaAddress) GetReplicaIndex ¶
func (a *ChkReplicaAddress) GetReplicaIndex() int
func (*ChkReplicaAddress) GetReplicaName ¶
func (a *ChkReplicaAddress) GetReplicaName() string
func (*ChkReplicaAddress) SetCRName ¶
func (a *ChkReplicaAddress) SetCRName(name string)
func (*ChkReplicaAddress) SetClusterIndex ¶
func (a *ChkReplicaAddress) SetClusterIndex(index int)
func (*ChkReplicaAddress) SetClusterName ¶
func (a *ChkReplicaAddress) SetClusterName(name string)
func (*ChkReplicaAddress) SetNamespace ¶
func (a *ChkReplicaAddress) SetNamespace(namespace string)
func (*ChkReplicaAddress) SetReplicaIndex ¶
func (a *ChkReplicaAddress) SetReplicaIndex(index int)
func (*ChkReplicaAddress) SetReplicaName ¶
func (a *ChkReplicaAddress) SetReplicaName(name string)
type ChkReplicaRuntime ¶
type ChkReplicaRuntime struct { Address ChkReplicaAddress `json:"-" yaml:"-"` CHK *ClickHouseKeeperInstallation `json:"-" yaml:"-" testdiff:"ignore"` }
func (*ChkReplicaRuntime) DeepCopy ¶
func (in *ChkReplicaRuntime) DeepCopy() *ChkReplicaRuntime
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChkReplicaRuntime.
func (*ChkReplicaRuntime) DeepCopyInto ¶
func (in *ChkReplicaRuntime) DeepCopyInto(out *ChkReplicaRuntime)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (ChkReplicaRuntime) GetAddress ¶
func (r ChkReplicaRuntime) GetAddress() apiChi.IReplicaAddress
func (*ChkReplicaRuntime) SetCR ¶
func (r *ChkReplicaRuntime) SetCR(cr apiChi.ICustomResource)
type ChkShard ¶
type ChkShard struct { Name string `json:"name,omitempty" yaml:"name,omitempty"` Weight *int `json:"weight,omitempty" yaml:"weight,omitempty"` InternalReplication *types.StringBool `json:"internalReplication,omitempty" yaml:"internalReplication,omitempty"` Settings *apiChi.Settings `json:"settings,omitempty" yaml:"settings,omitempty"` Files *apiChi.Settings `json:"files,omitempty" yaml:"files,omitempty"` Templates *apiChi.TemplatesList `json:"templates,omitempty" yaml:"templates,omitempty"` ReplicasCount int `json:"replicasCount,omitempty" yaml:"replicasCount,omitempty"` // TODO refactor into map[string]Host Hosts []*apiChi.Host `json:"replicas,omitempty" yaml:"replicas,omitempty"` Runtime ChkShardRuntime `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 (*ChkShard) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChkShard.
func (*ChkShard) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ChkShard) FindHost ¶
FindHost finds host by name or index. Expectations: name is expected to be a string, index is expected to be an int.
func (*ChkShard) GetCHK ¶
func (shard *ChkShard) GetCHK() *ClickHouseKeeperInstallation
GetCHK gets Custom Resource of the shard
func (*ChkShard) GetCluster ¶
GetCluster gets cluster of the shard
func (*ChkShard) GetInternalReplication ¶
func (shard *ChkShard) GetInternalReplication() *types.StringBool
func (*ChkShard) GetRuntime ¶
func (shard *ChkShard) GetRuntime() apiChi.IShardRuntime
func (*ChkShard) GetServiceTemplate ¶
func (shard *ChkShard) GetServiceTemplate() (*apiChi.ServiceTemplate, bool)
GetServiceTemplate gets service template
func (*ChkShard) GetSettings ¶
func (*ChkShard) GetTemplates ¶
func (shard *ChkShard) GetTemplates() *apiChi.TemplatesList
func (*ChkShard) HasReplicasCount ¶
HasReplicasCount checks whether shard has replicas count specified
func (*ChkShard) HasSettings ¶
func (*ChkShard) HasTemplates ¶
func (*ChkShard) HostsCount ¶
HostsCount returns count of hosts in the shard
func (*ChkShard) InheritFilesFrom ¶
InheritFilesFrom inherits files from specified cluster
func (*ChkShard) InheritSettingsFrom ¶
InheritSettingsFrom inherits settings from specified cluster
func (*ChkShard) InheritTemplatesFrom ¶
InheritTemplatesFrom inherits templates from specified cluster
type ChkShardAddress ¶
type ChkShardAddress 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 (*ChkShardAddress) DeepCopy ¶
func (in *ChkShardAddress) DeepCopy() *ChkShardAddress
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChkShardAddress.
func (*ChkShardAddress) DeepCopyInto ¶
func (in *ChkShardAddress) DeepCopyInto(out *ChkShardAddress)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ChkShardAddress) GetCRName ¶
func (a *ChkShardAddress) GetCRName() string
func (*ChkShardAddress) GetClusterIndex ¶
func (a *ChkShardAddress) GetClusterIndex() int
func (*ChkShardAddress) GetClusterName ¶
func (a *ChkShardAddress) GetClusterName() string
func (*ChkShardAddress) GetNamespace ¶
func (a *ChkShardAddress) GetNamespace() string
func (*ChkShardAddress) GetShardIndex ¶
func (a *ChkShardAddress) GetShardIndex() int
func (*ChkShardAddress) GetShardName ¶
func (a *ChkShardAddress) GetShardName() string
func (*ChkShardAddress) SetCRName ¶
func (a *ChkShardAddress) SetCRName(name string)
func (*ChkShardAddress) SetClusterIndex ¶
func (a *ChkShardAddress) SetClusterIndex(index int)
func (*ChkShardAddress) SetClusterName ¶
func (a *ChkShardAddress) SetClusterName(name string)
func (*ChkShardAddress) SetNamespace ¶
func (a *ChkShardAddress) SetNamespace(namespace string)
func (*ChkShardAddress) SetShardIndex ¶
func (a *ChkShardAddress) SetShardIndex(index int)
func (*ChkShardAddress) SetShardName ¶
func (a *ChkShardAddress) SetShardName(name string)
type ChkShardRuntime ¶
type ChkShardRuntime struct { Address ChkShardAddress `json:"-" yaml:"-"` CHK *ClickHouseKeeperInstallation `json:"-" yaml:"-" testdiff:"ignore"` }
func (*ChkShardRuntime) DeepCopy ¶
func (in *ChkShardRuntime) DeepCopy() *ChkShardRuntime
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChkShardRuntime.
func (*ChkShardRuntime) DeepCopyInto ¶
func (in *ChkShardRuntime) DeepCopyInto(out *ChkShardRuntime)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (ChkShardRuntime) GetAddress ¶
func (r ChkShardRuntime) GetAddress() apiChi.IShardAddress
func (*ChkShardRuntime) GetCR ¶
func (r *ChkShardRuntime) GetCR() apiChi.ICustomResource
func (*ChkShardRuntime) SetCR ¶
func (r *ChkShardRuntime) SetCR(cr apiChi.ICustomResource)
type ChkSpec ¶
type ChkSpec struct { TaskID *types.String `json:"taskID,omitempty" yaml:"taskID,omitempty"` NamespaceDomainPattern *types.String `json:"namespaceDomainPattern,omitempty" yaml:"namespaceDomainPattern,omitempty"` Reconciling *apiChi.Reconciling `json:"reconciling,omitempty" yaml:"reconciling,omitempty"` Defaults *apiChi.Defaults `json:"defaults,omitempty" yaml:"defaults,omitempty"` Configuration *Configuration `json:"configuration,omitempty" yaml:"configuration,omitempty"` Templates *apiChi.Templates `json:"templates,omitempty" yaml:"templates,omitempty"` }
ChkSpec defines spec section of ClickHouseKeeper resource
func (*ChkSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChkSpec.
func (*ChkSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ChkSpec) GetConfiguration ¶
func (spec *ChkSpec) GetConfiguration() apiChi.IConfiguration
func (*ChkSpec) GetDefaults ¶
func (*ChkSpec) GetNamespaceDomainPattern ¶
func (*ChkSpec) GetTemplates ¶
type ClickHouseKeeperInstallation ¶
type ClickHouseKeeperInstallation struct { meta.TypeMeta `json:",inline" yaml:",inline"` meta.ObjectMeta `json:"metadata,omitempty" yaml:"metadata,omitempty"` Spec ChkSpec `json:"spec" yaml:"spec"` Status *Status `json:"status,omitempty" yaml:"status,omitempty"` // contains filtered or unexported fields }
ClickHouseKeeperInstallation defines a ClickHouse Keeper ChkCluster
func (*ClickHouseKeeperInstallation) ClustersCount ¶
func (cr *ClickHouseKeeperInstallation) ClustersCount() int
ClustersCount counts clusters
func (*ClickHouseKeeperInstallation) Copy ¶
func (cr *ClickHouseKeeperInstallation) Copy(opts types.CopyCROptions) *ClickHouseKeeperInstallation
Copy makes copy of a CHI, filtering fields according to specified CopyOptions
func (*ClickHouseKeeperInstallation) DeepCopy ¶
func (in *ClickHouseKeeperInstallation) DeepCopy() *ClickHouseKeeperInstallation
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClickHouseKeeperInstallation.
func (*ClickHouseKeeperInstallation) DeepCopyInto ¶
func (in *ClickHouseKeeperInstallation) DeepCopyInto(out *ClickHouseKeeperInstallation)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ClickHouseKeeperInstallation) DeepCopyObject ¶
func (in *ClickHouseKeeperInstallation) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*ClickHouseKeeperInstallation) EnsureStatus ¶
func (cr *ClickHouseKeeperInstallation) EnsureStatus() *Status
EnsureStatus ensures status
func (*ClickHouseKeeperInstallation) Fill ¶
func (cr *ClickHouseKeeperInstallation) Fill()
func (*ClickHouseKeeperInstallation) FillStatus ¶
func (cr *ClickHouseKeeperInstallation) FillStatus(endpoint string, pods, fqdns []string, ip string)
FillStatus fills .Status
func (*ClickHouseKeeperInstallation) FindCluster ¶
func (cr *ClickHouseKeeperInstallation) FindCluster(needle interface{}) apiChi.ICluster
FindCluster finds cluster by name or index. Expectations: name is expected to be a string, index is expected to be an int.
func (*ClickHouseKeeperInstallation) FindHost ¶
func (cr *ClickHouseKeeperInstallation) FindHost(needleCluster interface{}, needleShard interface{}, needleHost interface{}) *apiChi.Host
FindHost finds shard by name or index Expectations: name is expected to be a string, index is expected to be an int.
func (*ClickHouseKeeperInstallation) FindShard ¶
func (cr *ClickHouseKeeperInstallation) FindShard(needleCluster interface{}, needleShard interface{}) apiChi.IShard
FindShard finds shard by name or index Expectations: name is expected to be a string, index is expected to be an int.
func (*ClickHouseKeeperInstallation) FirstHost ¶
func (cr *ClickHouseKeeperInstallation) FirstHost() *apiChi.Host
FirstHost returns first host of the CHI
func (*ClickHouseKeeperInstallation) FoundIn ¶
func (cr *ClickHouseKeeperInstallation) FoundIn(haystack []*ClickHouseKeeperInstallation) bool
FoundIn checks whether CHI can be found in haystack
func (*ClickHouseKeeperInstallation) GetAncestor ¶
func (cr *ClickHouseKeeperInstallation) GetAncestor() apiChi.ICustomResource
GetAncestor gets ancestor of a CR
func (*ClickHouseKeeperInstallation) GetAncestorT ¶
func (cr *ClickHouseKeeperInstallation) GetAncestorT() *ClickHouseKeeperInstallation
GetAncestorT gets ancestor of a CR
func (*ClickHouseKeeperInstallation) GetAnnotations ¶
func (cr *ClickHouseKeeperInstallation) GetAnnotations() map[string]string
func (*ClickHouseKeeperInstallation) GetHostTemplate ¶
func (cr *ClickHouseKeeperInstallation) GetHostTemplate(name string) (*apiChi.HostTemplate, bool)
GetHostTemplate gets HostTemplate by name
func (*ClickHouseKeeperInstallation) GetLabels ¶
func (cr *ClickHouseKeeperInstallation) GetLabels() map[string]string
func (*ClickHouseKeeperInstallation) GetName ¶
func (cr *ClickHouseKeeperInstallation) GetName() string
func (*ClickHouseKeeperInstallation) GetNamespace ¶
func (cr *ClickHouseKeeperInstallation) GetNamespace() string
func (*ClickHouseKeeperInstallation) GetPodTemplate ¶
func (cr *ClickHouseKeeperInstallation) GetPodTemplate(name string) (*apiChi.PodTemplate, bool)
GetPodTemplate gets PodTemplate by name
func (*ClickHouseKeeperInstallation) GetReconciling ¶
func (cr *ClickHouseKeeperInstallation) GetReconciling() *apiChi.Reconciling
GetReconciling gets reconciling spec
func (*ClickHouseKeeperInstallation) GetRootServiceTemplate ¶
func (cr *ClickHouseKeeperInstallation) GetRootServiceTemplate() (*apiChi.ServiceTemplate, bool)
GetRootServiceTemplate gets ServiceTemplate of a CHI
func (*ClickHouseKeeperInstallation) GetRuntime ¶
func (cr *ClickHouseKeeperInstallation) GetRuntime() apiChi.ICustomResourceRuntime
func (*ClickHouseKeeperInstallation) GetServiceTemplate ¶
func (cr *ClickHouseKeeperInstallation) GetServiceTemplate(name string) (*apiChi.ServiceTemplate, bool)
GetServiceTemplate gets ServiceTemplate by name
func (*ClickHouseKeeperInstallation) GetSpec ¶
func (cr *ClickHouseKeeperInstallation) GetSpec() apiChi.ICRSpec
func (*ClickHouseKeeperInstallation) GetSpecA ¶
func (cr *ClickHouseKeeperInstallation) GetSpecA() any
func (*ClickHouseKeeperInstallation) GetSpecT ¶
func (cr *ClickHouseKeeperInstallation) GetSpecT() *ChkSpec
func (*ClickHouseKeeperInstallation) GetStatus ¶
func (cr *ClickHouseKeeperInstallation) GetStatus() apiChi.IStatus
GetStatus gets Status
func (*ClickHouseKeeperInstallation) GetTarget ¶
func (cr *ClickHouseKeeperInstallation) GetTarget() *ClickHouseKeeperInstallation
GetTarget gets target of a CR
func (*ClickHouseKeeperInstallation) GetUsedTemplates ¶
func (cr *ClickHouseKeeperInstallation) GetUsedTemplates() []*apiChi.TemplateRef
func (*ClickHouseKeeperInstallation) GetVolumeClaimTemplate ¶
func (cr *ClickHouseKeeperInstallation) GetVolumeClaimTemplate(name string) (*apiChi.VolumeClaimTemplate, bool)
GetVolumeClaimTemplate gets VolumeClaimTemplate by name
func (*ClickHouseKeeperInstallation) HasAncestor ¶
func (cr *ClickHouseKeeperInstallation) HasAncestor() bool
HasAncestor checks whether CR has an ancestor
func (*ClickHouseKeeperInstallation) HasStatus ¶
func (cr *ClickHouseKeeperInstallation) HasStatus() bool
HasStatus checks whether CHI has Status
func (*ClickHouseKeeperInstallation) HasTarget ¶
func (cr *ClickHouseKeeperInstallation) HasTarget() bool
HasTarget checks whether CR has a target
func (*ClickHouseKeeperInstallation) HostsCount ¶
func (cr *ClickHouseKeeperInstallation) HostsCount() int
HostsCount counts hosts
func (*ClickHouseKeeperInstallation) HostsCountAttributes ¶
func (cr *ClickHouseKeeperInstallation) HostsCountAttributes(a *apiChi.HostReconcileAttributes) int
HostsCountAttributes counts hosts by attributes
func (*ClickHouseKeeperInstallation) IEnsureStatus ¶
func (cr *ClickHouseKeeperInstallation) IEnsureStatus() apiChi.IStatus
func (*ClickHouseKeeperInstallation) IsAuto ¶
func (cr *ClickHouseKeeperInstallation) IsAuto() bool
IsAuto checks whether templating policy is auto
func (*ClickHouseKeeperInstallation) IsNonZero ¶
func (cr *ClickHouseKeeperInstallation) IsNonZero() bool
func (*ClickHouseKeeperInstallation) IsRollingUpdate ¶
func (cr *ClickHouseKeeperInstallation) IsRollingUpdate() bool
IsRollingUpdate checks whether CHI should perform rolling update
func (*ClickHouseKeeperInstallation) IsStopped ¶
func (cr *ClickHouseKeeperInstallation) IsStopped() bool
IsStopped checks whether CHI is stopped
func (*ClickHouseKeeperInstallation) IsTroubleshoot ¶
func (cr *ClickHouseKeeperInstallation) IsTroubleshoot() bool
IsTroubleshoot checks whether CHI is in troubleshoot mode
func (*ClickHouseKeeperInstallation) JSON ¶
func (cr *ClickHouseKeeperInstallation) JSON(opts types.CopyCROptions) string
JSON returns JSON string
func (*ClickHouseKeeperInstallation) MatchFullName ¶
func (cr *ClickHouseKeeperInstallation) MatchFullName(namespace, name string) bool
MatchFullName matches full name
func (*ClickHouseKeeperInstallation) MatchNamespace ¶
func (cr *ClickHouseKeeperInstallation) MatchNamespace(namespace string) bool
MatchNamespace matches namespace
func (*ClickHouseKeeperInstallation) MergeFrom ¶
func (cr *ClickHouseKeeperInstallation) MergeFrom(from *ClickHouseKeeperInstallation, _type apiChi.MergeType)
MergeFrom merges from CHI
func (*ClickHouseKeeperInstallation) SetAncestor ¶
func (cr *ClickHouseKeeperInstallation) SetAncestor(a *ClickHouseKeeperInstallation)
SetAncestor sets ancestor of a CR
func (*ClickHouseKeeperInstallation) SetTarget ¶
func (cr *ClickHouseKeeperInstallation) SetTarget(a *ClickHouseKeeperInstallation)
SetTarget sets target of a CR
func (*ClickHouseKeeperInstallation) ShardsCount ¶
func (cr *ClickHouseKeeperInstallation) ShardsCount() int
ShardsCount counts shards
func (*ClickHouseKeeperInstallation) WalkClusters ¶
func (cr *ClickHouseKeeperInstallation) WalkClusters(f func(i apiChi.ICluster) error) []error
WalkClusters walks clusters
func (*ClickHouseKeeperInstallation) WalkClustersFullPath ¶
func (cr *ClickHouseKeeperInstallation) WalkClustersFullPath( f func(chi *ClickHouseKeeperInstallation, clusterIndex int, cluster *Cluster) error, ) []error
WalkClustersFullPath walks clusters with full path
func (*ClickHouseKeeperInstallation) WalkHosts ¶
func (cr *ClickHouseKeeperInstallation) WalkHosts(f func(host *apiChi.Host) error) []error
WalkHosts walks hosts with a function
func (*ClickHouseKeeperInstallation) WalkHostsFullPath ¶
func (cr *ClickHouseKeeperInstallation) WalkHostsFullPath(f apiChi.WalkHostsAddressFn) []error
WalkHostsFullPath walks hosts with a function
func (*ClickHouseKeeperInstallation) WalkHostsFullPathAndScope ¶
func (cr *ClickHouseKeeperInstallation) WalkHostsFullPathAndScope( crScopeCycleSize int, clusterScopeCycleSize int, f apiChi.WalkHostsAddressFn, ) (res []error)
WalkHostsFullPathAndScope walks hosts with full path
func (*ClickHouseKeeperInstallation) WalkPodTemplates ¶
func (cr *ClickHouseKeeperInstallation) WalkPodTemplates(f func(template *apiChi.PodTemplate))
WalkPodTemplates walks over all PodTemplates
func (*ClickHouseKeeperInstallation) WalkShards ¶
func (cr *ClickHouseKeeperInstallation) WalkShards( f func( shard *ChkShard, ) error, ) []error
WalkShards walks shards
func (*ClickHouseKeeperInstallation) WalkTillError ¶
func (cr *ClickHouseKeeperInstallation) WalkTillError( ctx context.Context, fCRPreliminary func(ctx context.Context, chi *ClickHouseKeeperInstallation) error, fCluster func(ctx context.Context, cluster *Cluster) error, fShards func(ctx context.Context, shards []*ChkShard) error, fCRFinal func(ctx context.Context, chi *ClickHouseKeeperInstallation) error, ) error
WalkTillError walks hosts with a function until an error met
func (*ClickHouseKeeperInstallation) WalkVolumeClaimTemplates ¶
func (cr *ClickHouseKeeperInstallation) WalkVolumeClaimTemplates(f func(template *apiChi.VolumeClaimTemplate))
WalkVolumeClaimTemplates walks over all VolumeClaimTemplates
func (*ClickHouseKeeperInstallation) YAML ¶
func (cr *ClickHouseKeeperInstallation) YAML(opts types.CopyCROptions) string
YAML return YAML string
type ClickHouseKeeperInstallationList ¶
type ClickHouseKeeperInstallationList struct { meta.TypeMeta `json:",inline" yaml:",inline"` meta.ListMeta `json:"metadata" yaml:"metadata"` Items []ClickHouseKeeperInstallation `json:"items" yaml:"items"` }
ClickHouseKeeperList defines a list of ClickHouseKeeper resources
func (*ClickHouseKeeperInstallationList) DeepCopy ¶
func (in *ClickHouseKeeperInstallationList) DeepCopy() *ClickHouseKeeperInstallationList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClickHouseKeeperInstallationList.
func (*ClickHouseKeeperInstallationList) DeepCopyInto ¶
func (in *ClickHouseKeeperInstallationList) DeepCopyInto(out *ClickHouseKeeperInstallationList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ClickHouseKeeperInstallationList) DeepCopyObject ¶
func (in *ClickHouseKeeperInstallationList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ClickHouseKeeperInstallationRuntime ¶
type ClickHouseKeeperInstallationRuntime struct {
// contains filtered or unexported fields
}
func (*ClickHouseKeeperInstallationRuntime) DeepCopy ¶
func (in *ClickHouseKeeperInstallationRuntime) DeepCopy() *ClickHouseKeeperInstallationRuntime
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClickHouseKeeperInstallationRuntime.
func (*ClickHouseKeeperInstallationRuntime) DeepCopyInto ¶
func (in *ClickHouseKeeperInstallationRuntime) DeepCopyInto(out *ClickHouseKeeperInstallationRuntime)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ClickHouseKeeperInstallationRuntime) GetAttributes ¶
func (runtime *ClickHouseKeeperInstallationRuntime) GetAttributes() *apiChi.ComparableAttributes
func (*ClickHouseKeeperInstallationRuntime) LockCommonConfig ¶
func (runtime *ClickHouseKeeperInstallationRuntime) LockCommonConfig()
func (*ClickHouseKeeperInstallationRuntime) UnlockCommonConfig ¶
func (runtime *ClickHouseKeeperInstallationRuntime) UnlockCommonConfig()
type Cluster ¶
type Cluster struct { Name string `json:"name,omitempty" yaml:"name,omitempty"` Settings *apiChi.Settings `json:"settings,omitempty" yaml:"settings,omitempty"` Files *apiChi.Settings `json:"files,omitempty" yaml:"files,omitempty"` Templates *apiChi.TemplatesList `json:"templates,omitempty" yaml:"templates,omitempty"` Layout *ChkClusterLayout `json:"layout,omitempty" yaml:"layout,omitempty"` Runtime ChkClusterRuntime `json:"-" yaml:"-"` }
Cluster defines item of a clusters section of .configuration
func (*Cluster) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Cluster.
func (*Cluster) DeepCopyInto ¶
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 ¶
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 ¶
FindShard finds shard by name or index. Expectations: name is expected to be a string, index is expected to be an int.
func (*Cluster) GetInsecure ¶
func (cluster *Cluster) GetInsecure() *types.StringBool
GetInsecure is a getter
func (*Cluster) GetLayout ¶
func (cluster *Cluster) GetLayout() *ChkClusterLayout
func (*Cluster) GetOrCreateHost ¶
GetOrCreateHost gets or creates host on specified coordinates
func (*Cluster) GetPDBMaxUnavailable ¶
func (*Cluster) GetReplica ¶
func (cluster *Cluster) GetReplica(replica int) *ChkReplica
GetReplica gets replica with specified index
func (*Cluster) GetRuntime ¶
func (cluster *Cluster) GetRuntime() apiChi.IClusterRuntime
func (*Cluster) GetSchemaPolicy ¶
func (c *Cluster) GetSchemaPolicy() *apiChi.SchemaPolicy
func (*Cluster) GetSecret ¶
func (c *Cluster) GetSecret() *apiChi.ClusterSecret
func (*Cluster) GetSecure ¶
func (cluster *Cluster) GetSecure() *types.StringBool
GetSecure is a getter
func (*Cluster) GetServiceTemplate ¶
func (cluster *Cluster) GetServiceTemplate() (*apiChi.ServiceTemplate, bool)
GetServiceTemplate returns service template, if exists
func (*Cluster) GetZookeeper ¶
func (c *Cluster) GetZookeeper() *apiChi.ZookeeperConfig
func (*Cluster) InheritFilesFrom ¶
func (cluster *Cluster) InheritFilesFrom(chk *ClickHouseKeeperInstallation)
InheritFilesFrom inherits files from CHI
func (*Cluster) InheritTemplatesFrom ¶
func (cluster *Cluster) InheritTemplatesFrom(chk *ClickHouseKeeperInstallation)
InheritTemplatesFrom inherits templates from CHI
func (*Cluster) IsShardSpecified ¶
IsShardSpecified checks whether shard is explicitly specified
func (*Cluster) WalkHostsByReplicas ¶
func (cluster *Cluster) WalkHostsByReplicas(f func(shard, replica int, host *apiChi.Host) error) []error
WalkHostsByReplicas walks hosts by replicas
func (*Cluster) WalkHostsByShards ¶
func (cluster *Cluster) WalkHostsByShards(f func(shard, replica int, host *apiChi.Host) error) []error
WalkHostsByShards walks hosts by shards
func (*Cluster) WalkReplicas ¶
func (cluster *Cluster) WalkReplicas(f func(index int, replica *ChkReplica) error) []error
WalkReplicas walks replicas
type Configuration ¶
type Configuration struct { Settings *apiChi.Settings `json:"settings,omitempty" yaml:"settings,omitempty"` Files *apiChi.Settings `json:"files,omitempty" yaml:"files,omitempty"` Clusters []*Cluster `json:"clusters,omitempty" yaml:"clusters,omitempty"` }
Configuration defines configuration section of .spec
func NewConfiguration ¶
func NewConfiguration() *Configuration
NewConfiguration creates new ChkConfiguration 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) GetCluster ¶
func (c *Configuration) GetCluster(i int) *Cluster
func (*Configuration) GetClusters ¶
func (c *Configuration) GetClusters() []*Cluster
func (*Configuration) GetFiles ¶
func (c *Configuration) GetFiles() *apiChi.Settings
func (*Configuration) GetProfiles ¶
func (c *Configuration) GetProfiles() *apiChi.Settings
func (*Configuration) GetQuotas ¶
func (c *Configuration) GetQuotas() *apiChi.Settings
func (*Configuration) GetSettings ¶
func (c *Configuration) GetSettings() *apiChi.Settings
func (*Configuration) MergeFrom ¶
func (c *Configuration) MergeFrom(from *Configuration, _type apiChi.MergeType) *Configuration
MergeFrom merges from specified source
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 NormalizedCR *ClickHouseKeeperInstallation }
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 Status ¶
type Status 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"` NormalizedCR *ClickHouseKeeperInstallation `json:"normalized,omitempty" yaml:"normalized,omitempty"` NormalizedCRCompleted *ClickHouseKeeperInstallation `json:"normalizedCompleted,omitempty" yaml:"normalizedCompleted,omitempty"` HostsWithTablesCreated []string `json:"hostsWithTablesCreated,omitempty" yaml:"hostsWithTablesCreated,omitempty"` UsedTemplates []*apiChi.TemplateRef `json:"usedTemplates,omitempty" yaml:"usedTemplates,omitempty"` // contains filtered or unexported fields }
Status defines status section of the custom resource.
Note: application level reads and writes to Status 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 (*Status) ClearNormalizedCR ¶
func (s *Status) ClearNormalizedCR()
ClearNormalizedCR clears normalized CR in status
func (*Status) CopyFrom ¶
func (s *Status) CopyFrom(f *Status, opts types.CopyStatusOptions)
CopyFrom copies the state of a given Status f into the receiver Status of the call.
func (*Status) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Status.
func (*Status) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Status) Fill ¶
func (s *Status) 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 (*Status) GetCHOpCommit ¶
GetCHOpCommit gets operator build commit
func (*Status) GetCHOpDate ¶
GetCHOpDate gets operator build date
func (*Status) GetCHOpVersion ¶
GetCHOpVersion gets operator version
func (*Status) GetClustersCount ¶
GetClustersCount gets clusters count
func (*Status) GetHostsAddedCount ¶
GetHostsAddedCount gets added hosts counter
func (*Status) GetHostsCompletedCount ¶
GetHostsCompletedCount gets completed hosts counter
func (*Status) GetHostsDeleteCount ¶
GetHostsDeleteCount gets hosts to be deleted counter
func (*Status) GetHostsDeletedCount ¶
GetHostsDeletedCount gets deleted hosts counter
func (*Status) GetHostsFailedCount ¶
GetHostsFailedCount gets failed hosts counter
func (*Status) GetHostsUnchangedCount ¶
GetHostsUnchangedCount gets unchanged hosts counter
func (*Status) GetHostsUpdatedCount ¶
GetHostsUpdatedCount gets updated hosts counter
func (*Status) GetHostsWithTablesCreated ¶
GetHostsWithTablesCreated gets hosts with created tables
func (*Status) GetNormalizedCR ¶
func (s *Status) GetNormalizedCR() *ClickHouseKeeperInstallation
GetNormalizedCR gets target CR
func (*Status) GetNormalizedCRCompleted ¶
func (s *Status) GetNormalizedCRCompleted() *ClickHouseKeeperInstallation
GetNormalizedCRCompleted gets completed CR
func (*Status) GetReplicasCount ¶
GetReplicasCount gets replicas count
func (*Status) GetShardsCount ¶
GetShardsCount gets shards count
func (*Status) GetTaskIDsCompleted ¶
GetTaskIDsCompleted gets completed task id
func (*Status) GetTaskIDsStarted ¶
GetTaskIDsStarted gets started task id
func (*Status) GetUsedTemplatesCount ¶
GetUsedTemplatesCount gets used templates count
func (*Status) HasNormalizedCR ¶
HasNormalizedCR is a checker
func (*Status) HasNormalizedCRCompleted ¶
HasNormalizedCRCompleted is a checker
func (*Status) HostCompleted ¶
func (s *Status) HostCompleted()
HostCompleted increments completed hosts counter
func (*Status) HostDeleted ¶
func (s *Status) HostDeleted()
HostDeleted increments deleted hosts counter
func (*Status) HostFailed ¶
func (s *Status) HostFailed()
HostFailed increments failed hosts counter
func (*Status) HostUnchanged ¶
func (s *Status) HostUnchanged()
HostUnchanged increments unchanged hosts counter
func (*Status) HostUpdated ¶
func (s *Status) HostUpdated()
HostUpdated increments updated hosts counter
func (*Status) PushAction ¶
PushAction pushes action into status
func (*Status) PushHostTablesCreated ¶
PushHostTablesCreated pushes host to the list of hosts with created tables
func (*Status) PushUsedTemplate ¶
func (s *Status) PushUsedTemplate(templateRef *apiChi.TemplateRef)
PushUsedTemplate pushes used template to the list of used templates
func (*Status) ReconcileAbort ¶
func (s *Status) ReconcileAbort()
ReconcileAbort marks reconcile abortion
func (*Status) ReconcileComplete ¶
func (s *Status) ReconcileComplete()
ReconcileComplete marks reconcile completion
func (*Status) ReconcileStart ¶
ReconcileStart marks reconcile start
func (*Status) SetAndPushError ¶
SetAndPushError sets and pushes error into status
func (*Status) SetNormalizedCompletedFromCurrentNormalized ¶
func (s *Status) SetNormalizedCompletedFromCurrentNormalized()
SetNormalizedCompletedFromCurrentNormalized sets completed CR from current CR
func (*Status) SyncHostTablesCreated ¶
func (s *Status) SyncHostTablesCreated()
SyncHostTablesCreated syncs list of hosts with tables created with actual list of hosts