Skip to content

Commit

Permalink
Prepare for release v0.29.0-rc.0 (#684)
Browse files Browse the repository at this point in the history
ProductLine: KubeDB

Release: v2022.10.12-rc.0

Release-tracker: kubedb/CHANGELOG#57
Signed-off-by: 1gtm <[email protected]>

Signed-off-by: 1gtm <[email protected]>
  • Loading branch information
1gtm authored Oct 12, 2022
1 parent b021f76 commit 8033e31
Show file tree
Hide file tree
Showing 11 changed files with 37 additions and 92 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ require (
kmodules.xyz/client-go v0.25.6
kmodules.xyz/custom-resources v0.25.1
kmodules.xyz/monitoring-agent-api v0.25.0
kubedb.dev/apimachinery v0.28.4-0.20221007091615-35e1d5e5bcb6
kubedb.dev/apimachinery v0.29.0-rc.0
stash.appscode.dev/apimachinery v0.23.0
)

Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -997,8 +997,8 @@ kmodules.xyz/offshoot-api v0.25.0 h1:Svq9da/+sg5afOjpgo9vx2J/Lu90Mo0aFxkdQmgKnGI
kmodules.xyz/offshoot-api v0.25.0/go.mod h1:ysEBn7LJuT3+s8ynAQA/OG0BSsJugXa6KGtDLMRjlKo=
kmodules.xyz/prober v0.25.0 h1:R5uRLHJEvEtEoogj+vaTAob0Btph6+PX5IlS6hPh8PA=
kmodules.xyz/prober v0.25.0/go.mod h1:z4RTnjaajNQa/vPltsiOnO3xI716I/ziD2ac2Exm+1M=
kubedb.dev/apimachinery v0.28.4-0.20221007091615-35e1d5e5bcb6 h1:zrlfmcSezG2O94V8tc7E8GpWZvJEU9wMrjLauaD1Wfw=
kubedb.dev/apimachinery v0.28.4-0.20221007091615-35e1d5e5bcb6/go.mod h1:8/kV/429eH4DlQ24vwRaxkf1mMhN6FL/nvuPEJt2CYc=
kubedb.dev/apimachinery v0.29.0-rc.0 h1:mJek0RJaPkgBGue4h4BQjxQLX2wToX4RtxG5wnJSlnk=
kubedb.dev/apimachinery v0.29.0-rc.0/go.mod h1:8/kV/429eH4DlQ24vwRaxkf1mMhN6FL/nvuPEJt2CYc=
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -66,17 +66,12 @@ type RedisSentinelAutoscalerSpec struct {
OpsRequestOptions *RedisSentinelOpsRequestOptions `json:"opsRequestOptions,omitempty"`

Compute *RedisSentinelComputeAutoscalerSpec `json:"compute,omitempty"`
Storage *RedisSentinelStorageAutoscalerSpec `json:"storage,omitempty"`
}

type RedisSentinelComputeAutoscalerSpec struct {
Sentinel *ComputeAutoscalerSpec `json:"sentinel,omitempty"`
}

type RedisSentinelStorageAutoscalerSpec struct {
Sentinel *StorageAutoscalerSpec `json:"sentinel,omitempty"`
}

type RedisSentinelOpsRequestOptions struct {
// Timeout for each step of the ops request in second. If a step doesn't finish within the specified timeout, the ops request will result in failure.
Timeout *metav1.Duration `json:"timeout,omitempty"`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,6 @@ func (in *RedisSentinelAutoscaler) Default() {
func (in *RedisSentinelAutoscaler) setDefaults() {
in.setOpsReqOptsDefaults()

if in.Spec.Storage != nil {
setDefaultStorageValues(in.Spec.Storage.Sentinel)
}

if in.Spec.Compute != nil {
setDefaultComputeValues(in.Spec.Compute.Sentinel)
}
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,24 @@ func (p PerconaXtraDB) GetAuthSecretName() string {
return meta_util.NameWithSuffix(p.OffshootName(), "auth")
}

func (p PerconaXtraDB) GetReplicationSecretName() string {
if p.Spec.SystemUserSecrets != nil &&
p.Spec.SystemUserSecrets.ReplicationUserSecret != nil &&
p.Spec.SystemUserSecrets.ReplicationUserSecret.Name != "" {
return p.Spec.SystemUserSecrets.ReplicationUserSecret.Name
}
return meta_util.NameWithSuffix(p.OffshootName(), "replication")
}

func (p PerconaXtraDB) GetMonitorSecretName() string {
if p.Spec.SystemUserSecrets != nil &&
p.Spec.SystemUserSecrets.MonitorUserSecret != nil &&
p.Spec.SystemUserSecrets.MonitorUserSecret.Name != "" {
return p.Spec.SystemUserSecrets.MonitorUserSecret.Name
}
return meta_util.NameWithSuffix(p.OffshootName(), "monitor")
}

func (p PerconaXtraDB) ClusterName() string {
return p.OffshootName()
}
Expand Down Expand Up @@ -292,6 +310,12 @@ func (p *PerconaXtraDBSpec) GetPersistentSecrets() []string {
if p.AuthSecret != nil {
secrets = append(secrets, p.AuthSecret.Name)
}
if p.SystemUserSecrets != nil && p.SystemUserSecrets.ReplicationUserSecret != nil {
secrets = append(secrets, p.SystemUserSecrets.ReplicationUserSecret.Name)
}
if p.SystemUserSecrets != nil && p.SystemUserSecrets.MonitorUserSecret != nil {
secrets = append(secrets, p.SystemUserSecrets.MonitorUserSecret.Name)
}
return secrets
}

Expand All @@ -312,14 +336,6 @@ func (p *PerconaXtraDB) GetCertSecretName(alias PerconaXtraDBCertificateAlias) s
return p.CertificateName(alias)
}

func (p *PerconaXtraDB) ReplicationSecretName() string {
return meta_util.NameWithSuffix(p.Name, "replication")
}

func (p *PerconaXtraDB) MonitorSecretName() string {
return meta_util.NameWithSuffix(p.Name, "monitor")
}

func (p *PerconaXtraDB) ReplicasAreReady(lister appslister.StatefulSetLister) (bool, string, error) {
// Desire number of statefulSets
expectedItems := 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,10 @@ const (
PublisherMessageDBServerCritical PublisherMessage = "Database Server is critical"
PublisherMessageDBServerReady PublisherMessage = "Database Server is Ready"

PublisherConditionTypeDatabaseIsFound PublisherConditionType = "DatabaseIsFound"
PublisherMessageDatabaseIsFound PublisherMessage = "Database is found"
PublisherMessageDatabaseIsNotFound PublisherMessage = "Database is not found"

PublisherConditionTypeAllTablesFound PublisherConditionType = "AllTablesFound"
PublisherMessageAllTablesNotFound PublisherMessage = "All tables are not found"
PublisherMessageAllTablesFound PublisherMessage = "All tables are found"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,10 @@ const (
SubscriberMessageDBServerCritical SubscriberMessage = "Database Server is critical"
SubscriberMessageDBServerReady SubscriberMessage = "Database Server is Ready"

SubscriberConditionTypeDatabaseIsFound SubscriberConditionType = "DatabaseIsFound"
SubscriberMessageDatabaseIsFound SubscriberMessage = "Database is found"
SubscriberMessageDatabaseIsNotFound SubscriberMessage = "Database is not found"

SubscriberConditionTypeAllPublisherReady SubscriberConditionType = "AllPublisherReady"
SubscriberMessageAllPublisherAreReady SubscriberMessage = "All Publisher are ready"
SubscriberMessageAllPublisherAreNotReady SubscriberMessage = "All Publisher are not ready"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,25 +96,6 @@ spec:
timeout:
type: string
type: object
storage:
properties:
sentinel:
properties:
expansionMode:
enum:
- Offline
- Online
type: string
scalingThreshold:
format: int32
type: integer
trigger:
type: string
usageThreshold:
format: int32
type: integer
type: object
type: object
required:
- databaseRef
type: object
Expand Down
2 changes: 1 addition & 1 deletion vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -765,7 +765,7 @@ kmodules.xyz/offshoot-api/api/v1
# kmodules.xyz/prober v0.25.0
## explicit; go 1.18
kmodules.xyz/prober/api/v1
# kubedb.dev/apimachinery v0.28.4-0.20221007091615-35e1d5e5bcb6
# kubedb.dev/apimachinery v0.29.0-rc.0
## explicit; go 1.18
kubedb.dev/apimachinery/apis
kubedb.dev/apimachinery/apis/autoscaling
Expand Down

0 comments on commit 8033e31

Please sign in to comment.