Skip to content

Commit

Permalink
Prepare for release v0.41.0 (#755)
Browse files Browse the repository at this point in the history
ProductLine: KubeDB

Release: v2024.1.31

Release-tracker: kubedb/CHANGELOG#84

Signed-off-by: 1gtm <[email protected]>
  • Loading branch information
1gtm authored Feb 1, 2024
1 parent 7aeaa86 commit 8ff0608
Show file tree
Hide file tree
Showing 12 changed files with 77 additions and 40 deletions.
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ require (
kmodules.xyz/client-go v0.29.6
kmodules.xyz/custom-resources v0.29.1
kmodules.xyz/monitoring-agent-api v0.29.0
kubedb.dev/apimachinery v0.41.0-rc.1.0.20240131123101-c711b3abb2a0
kubedb.dev/db-client-go v0.0.9
kubedb.dev/apimachinery v0.41.0
kubedb.dev/db-client-go v0.0.10
sigs.k8s.io/controller-runtime v0.17.0
sigs.k8s.io/yaml v1.4.0
stash.appscode.dev/apimachinery v0.32.1-0.20231225221320-6f5a8df2ab6e
Expand Down Expand Up @@ -138,7 +138,7 @@ require (
kmodules.xyz/prober v0.29.0 // indirect
kmodules.xyz/resource-metadata v0.18.2-0.20240105072614-e92a8a48d400 // indirect
kubeops.dev/sidekick v0.0.5-0.20231225214445-a15c70833046 // indirect
kubestash.dev/apimachinery v0.4.0-rc.2 // indirect
kubestash.dev/apimachinery v0.4.0 // indirect
sigs.k8s.io/gateway-api v0.8.0 // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/kustomize/api v0.13.5-0.20230601165947-6ce0bf390ce3 // indirect
Expand Down
12 changes: 6 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -819,14 +819,14 @@ kmodules.xyz/prober v0.29.0 h1:Ex7m4F9rH7uWNNJlLgP63ROOM+nUATJkC2L5OQ7nwMg=
kmodules.xyz/prober v0.29.0/go.mod h1:UtK+HKyI1lFLEKX+HFLyOCVju6TO93zv3kwGpzqmKOo=
kmodules.xyz/resource-metadata v0.18.2-0.20240105072614-e92a8a48d400 h1:bmd9/fvbhE55xtMF9hXVzjoUZFLGjMfEoHSHu9Hw6Gc=
kmodules.xyz/resource-metadata v0.18.2-0.20240105072614-e92a8a48d400/go.mod h1:XsCdEKjfoulX29tMGviDhjT/jLl158uvMvXlKOhK1as=
kubedb.dev/apimachinery v0.41.0-rc.1.0.20240131123101-c711b3abb2a0 h1:pgtLsEzFPYzRXCNHKiuczfbwhYi5XyRrvT9ijDB2nWI=
kubedb.dev/apimachinery v0.41.0-rc.1.0.20240131123101-c711b3abb2a0/go.mod h1:Z6vywQE35f+j6Vh24OaY2q5jnwAirDlx70nuKmlrrN0=
kubedb.dev/db-client-go v0.0.9 h1:oYfNBjZRLtF5jij1u83NW0yCjz1Is4zE9RI0tG0h5AU=
kubedb.dev/db-client-go v0.0.9/go.mod h1:h37/SUuec3Jnxusxv7JTs3Vl5SX9C/rNPG7qB7hQq4M=
kubedb.dev/apimachinery v0.41.0 h1:VbGQnH3YL7ICFvnCjAumlnL3HeZzg5F4F+flpjOSnG4=
kubedb.dev/apimachinery v0.41.0/go.mod h1:rNWsbBzdnZA8G2FE8igi+nsGnlWqYurC+i3RFFDwluc=
kubedb.dev/db-client-go v0.0.10 h1:pirFbkMZn9nsD3wO092dYFL3H4NSJo5sccXfduTbL4o=
kubedb.dev/db-client-go v0.0.10/go.mod h1:sadvZUXo7tWz/75gdW7wpqeR25bi9kI/h2djyYLjN0A=
kubeops.dev/sidekick v0.0.5-0.20231225214445-a15c70833046 h1:X1ieV+IXqNesmFwSH6NEVF1J2wO0vplC4k6v3Vmq0d0=
kubeops.dev/sidekick v0.0.5-0.20231225214445-a15c70833046/go.mod h1:XX6Vhw9EMmX9R8Y13AgaYDAsfeLZdTL8MzymTOAT0nY=
kubestash.dev/apimachinery v0.4.0-rc.2 h1:BSThxK1vQ0wp4JtO5HCVLvEqTP0TJuTqmEmeQOyK738=
kubestash.dev/apimachinery v0.4.0-rc.2/go.mod h1:ysktK/jLtv5SnFgyxmBZmSFDZmD03lFwEF/8bG/VoF8=
kubestash.dev/apimachinery v0.4.0 h1:FH4gS7hWwGeY0MdWyMwAZYF43xXj3q/dNlMApiVYPz4=
kubestash.dev/apimachinery v0.4.0/go.mod h1:ysktK/jLtv5SnFgyxmBZmSFDZmD03lFwEF/8bG/VoF8=
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
sigs.k8s.io/gateway-api v0.8.0 h1:isQQ3Jx2qFP7vaA3ls0846F0Amp9Eq14P08xbSwVbQg=
sigs.k8s.io/gateway-api v0.8.0/go.mod h1:okOnjPNBFbIS/Rw9kAhuIUaIkLhTKEu+ARIuXk2dgaM=
Expand Down
15 changes: 13 additions & 2 deletions vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -1137,9 +1137,20 @@ var (
},
}

// DefaultResourcesElasticSearch must be used for elasticsearch
// DefaultResourcesCPUIntensive is for MongoDB versions >= 6
DefaultResourcesCPUIntensive = core.ResourceRequirements{
Requests: core.ResourceList{
core.ResourceCPU: resource.MustParse(".800"),
core.ResourceMemory: resource.MustParse("1024Mi"),
},
Limits: core.ResourceList{
core.ResourceMemory: resource.MustParse("1024Mi"),
},
}

// DefaultResourcesMemoryIntensive must be used for elasticsearch
// to avoid OOMKILLED while deploying ES V8
DefaultResourcesElasticSearch = core.ResourceRequirements{
DefaultResourcesMemoryIntensive = core.ResourceRequirements{
Requests: core.ResourceList{
core.ResourceCPU: resource.MustParse(".500"),
core.ResourceMemory: resource.MustParse("1.5Gi"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ func (e *Elasticsearch) SetDefaults(esVersion *catalog.ElasticsearchVersion, top
if e.Spec.Topology.Ingest.Suffix == "" {
e.Spec.Topology.Ingest.Suffix = string(ElasticsearchNodeRoleTypeIngest)
}
apis.SetDefaultResourceLimits(&e.Spec.Topology.Ingest.Resources, DefaultResourcesElasticSearch)
apis.SetDefaultResourceLimits(&e.Spec.Topology.Ingest.Resources, DefaultResourcesMemoryIntensive)
if e.Spec.Topology.Ingest.Replicas == nil {
e.Spec.Topology.Ingest.Replicas = pointer.Int32P(1)
}
Expand All @@ -463,7 +463,7 @@ func (e *Elasticsearch) SetDefaults(esVersion *catalog.ElasticsearchVersion, top
if e.Spec.Topology.Master.Suffix == "" {
e.Spec.Topology.Master.Suffix = string(ElasticsearchNodeRoleTypeMaster)
}
apis.SetDefaultResourceLimits(&e.Spec.Topology.Master.Resources, DefaultResourcesElasticSearch)
apis.SetDefaultResourceLimits(&e.Spec.Topology.Master.Resources, DefaultResourcesMemoryIntensive)
if e.Spec.Topology.Master.Replicas == nil {
e.Spec.Topology.Master.Replicas = pointer.Int32P(1)
}
Expand All @@ -478,7 +478,7 @@ func (e *Elasticsearch) SetDefaults(esVersion *catalog.ElasticsearchVersion, top
if e.Spec.Topology.Data.Suffix == "" {
e.Spec.Topology.Data.Suffix = string(ElasticsearchNodeRoleTypeData)
}
apis.SetDefaultResourceLimits(&e.Spec.Topology.Data.Resources, DefaultResourcesElasticSearch)
apis.SetDefaultResourceLimits(&e.Spec.Topology.Data.Resources, DefaultResourcesMemoryIntensive)
if e.Spec.Topology.Data.Replicas == nil {
e.Spec.Topology.Data.Replicas = pointer.Int32P(1)
}
Expand All @@ -493,7 +493,7 @@ func (e *Elasticsearch) SetDefaults(esVersion *catalog.ElasticsearchVersion, top
if e.Spec.Topology.DataHot.Suffix == "" {
e.Spec.Topology.DataHot.Suffix = string(ElasticsearchNodeRoleTypeDataHot)
}
apis.SetDefaultResourceLimits(&e.Spec.Topology.DataHot.Resources, DefaultResourcesElasticSearch)
apis.SetDefaultResourceLimits(&e.Spec.Topology.DataHot.Resources, DefaultResourcesMemoryIntensive)
if e.Spec.Topology.DataHot.Replicas == nil {
e.Spec.Topology.DataHot.Replicas = pointer.Int32P(1)
}
Expand All @@ -508,7 +508,7 @@ func (e *Elasticsearch) SetDefaults(esVersion *catalog.ElasticsearchVersion, top
if e.Spec.Topology.DataWarm.Suffix == "" {
e.Spec.Topology.DataWarm.Suffix = string(ElasticsearchNodeRoleTypeDataWarm)
}
apis.SetDefaultResourceLimits(&e.Spec.Topology.DataWarm.Resources, DefaultResourcesElasticSearch)
apis.SetDefaultResourceLimits(&e.Spec.Topology.DataWarm.Resources, DefaultResourcesMemoryIntensive)
if e.Spec.Topology.DataWarm.Replicas == nil {
e.Spec.Topology.DataWarm.Replicas = pointer.Int32P(1)
}
Expand All @@ -523,7 +523,7 @@ func (e *Elasticsearch) SetDefaults(esVersion *catalog.ElasticsearchVersion, top
if e.Spec.Topology.DataCold.Suffix == "" {
e.Spec.Topology.DataCold.Suffix = string(ElasticsearchNodeRoleTypeDataCold)
}
apis.SetDefaultResourceLimits(&e.Spec.Topology.DataCold.Resources, DefaultResourcesElasticSearch)
apis.SetDefaultResourceLimits(&e.Spec.Topology.DataCold.Resources, DefaultResourcesMemoryIntensive)
if e.Spec.Topology.DataCold.Replicas == nil {
e.Spec.Topology.DataCold.Replicas = pointer.Int32P(1)
}
Expand All @@ -538,7 +538,7 @@ func (e *Elasticsearch) SetDefaults(esVersion *catalog.ElasticsearchVersion, top
if e.Spec.Topology.DataFrozen.Suffix == "" {
e.Spec.Topology.DataFrozen.Suffix = string(ElasticsearchNodeRoleTypeDataFrozen)
}
apis.SetDefaultResourceLimits(&e.Spec.Topology.DataFrozen.Resources, DefaultResourcesElasticSearch)
apis.SetDefaultResourceLimits(&e.Spec.Topology.DataFrozen.Resources, DefaultResourcesMemoryIntensive)
if e.Spec.Topology.DataFrozen.Replicas == nil {
e.Spec.Topology.DataFrozen.Replicas = pointer.Int32P(1)
}
Expand All @@ -553,7 +553,7 @@ func (e *Elasticsearch) SetDefaults(esVersion *catalog.ElasticsearchVersion, top
if e.Spec.Topology.DataContent.Suffix == "" {
e.Spec.Topology.DataContent.Suffix = string(ElasticsearchNodeRoleTypeDataContent)
}
apis.SetDefaultResourceLimits(&e.Spec.Topology.DataContent.Resources, DefaultResourcesElasticSearch)
apis.SetDefaultResourceLimits(&e.Spec.Topology.DataContent.Resources, DefaultResourcesMemoryIntensive)
if e.Spec.Topology.DataContent.Replicas == nil {
e.Spec.Topology.DataContent.Replicas = pointer.Int32P(1)
}
Expand All @@ -568,7 +568,7 @@ func (e *Elasticsearch) SetDefaults(esVersion *catalog.ElasticsearchVersion, top
if e.Spec.Topology.ML.Suffix == "" {
e.Spec.Topology.ML.Suffix = string(ElasticsearchNodeRoleTypeML)
}
apis.SetDefaultResourceLimits(&e.Spec.Topology.ML.Resources, DefaultResourcesElasticSearch)
apis.SetDefaultResourceLimits(&e.Spec.Topology.ML.Resources, DefaultResourcesMemoryIntensive)
if e.Spec.Topology.ML.Replicas == nil {
e.Spec.Topology.ML.Replicas = pointer.Int32P(1)
}
Expand All @@ -583,7 +583,7 @@ func (e *Elasticsearch) SetDefaults(esVersion *catalog.ElasticsearchVersion, top
if e.Spec.Topology.Transform.Suffix == "" {
e.Spec.Topology.Transform.Suffix = string(ElasticsearchNodeRoleTypeTransform)
}
apis.SetDefaultResourceLimits(&e.Spec.Topology.Transform.Resources, DefaultResourcesElasticSearch)
apis.SetDefaultResourceLimits(&e.Spec.Topology.Transform.Resources, DefaultResourcesMemoryIntensive)
if e.Spec.Topology.Transform.Replicas == nil {
e.Spec.Topology.Transform.Replicas = pointer.Int32P(1)
}
Expand All @@ -593,7 +593,7 @@ func (e *Elasticsearch) SetDefaults(esVersion *catalog.ElasticsearchVersion, top
}

} else {
apis.SetDefaultResourceLimits(&e.Spec.PodTemplate.Spec.Resources, DefaultResourcesElasticSearch)
apis.SetDefaultResourceLimits(&e.Spec.PodTemplate.Spec.Resources, DefaultResourcesMemoryIntensive)
if e.Spec.Replicas == nil {
e.Spec.Replicas = pointer.Int32P(1)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -633,15 +633,20 @@ func (m *MongoDB) SetDefaults(mgVersion *v1alpha1.MongoDBVersion, topology *core
}
}

defaultResource := DefaultResources
if m.isVersion6OrLater(mgVersion) {
defaultResource = DefaultResourcesCPUIntensive
}

if m.Spec.ShardTopology != nil {
apis.SetDefaultResourceLimits(&m.Spec.ShardTopology.Mongos.PodTemplate.Spec.Resources, DefaultResources)
apis.SetDefaultResourceLimits(&m.Spec.ShardTopology.Shard.PodTemplate.Spec.Resources, DefaultResources)
apis.SetDefaultResourceLimits(&m.Spec.ShardTopology.ConfigServer.PodTemplate.Spec.Resources, DefaultResources)
apis.SetDefaultResourceLimits(&m.Spec.ShardTopology.Mongos.PodTemplate.Spec.Resources, defaultResource)
apis.SetDefaultResourceLimits(&m.Spec.ShardTopology.Shard.PodTemplate.Spec.Resources, defaultResource)
apis.SetDefaultResourceLimits(&m.Spec.ShardTopology.ConfigServer.PodTemplate.Spec.Resources, defaultResource)
if m.Spec.Arbiter != nil {
apis.SetDefaultResourceLimits(&m.Spec.Arbiter.PodTemplate.Spec.Resources, DefaultResources)
apis.SetDefaultResourceLimits(&m.Spec.Arbiter.PodTemplate.Spec.Resources, defaultResource)
}
if m.Spec.Hidden != nil {
apis.SetDefaultResourceLimits(&m.Spec.Hidden.PodTemplate.Spec.Resources, DefaultResources)
apis.SetDefaultResourceLimits(&m.Spec.Hidden.PodTemplate.Spec.Resources, defaultResource)
}

if m.Spec.ShardTopology.ConfigServer.PodTemplate.Spec.ServiceAccountName == "" {
Expand Down Expand Up @@ -711,19 +716,19 @@ func (m *MongoDB) SetDefaults(mgVersion *v1alpha1.MongoDBVersion, topology *core
// set default affinity (PodAntiAffinity)
m.setDefaultAffinity(m.Spec.PodTemplate, m.OffshootSelectors(), topology)

apis.SetDefaultResourceLimits(&m.Spec.PodTemplate.Spec.Resources, DefaultResources)
apis.SetDefaultResourceLimits(&m.Spec.PodTemplate.Spec.Resources, defaultResource)
m.setDefaultSecurityContext(mgVersion, m.Spec.PodTemplate)

if m.Spec.Arbiter != nil {
m.setDefaultProbes(&m.Spec.Arbiter.PodTemplate, mgVersion, true)
m.setDefaultAffinity(&m.Spec.Arbiter.PodTemplate, m.OffshootSelectors(), topology)
apis.SetDefaultResourceLimits(&m.Spec.Arbiter.PodTemplate.Spec.Resources, DefaultResources)
apis.SetDefaultResourceLimits(&m.Spec.Arbiter.PodTemplate.Spec.Resources, defaultResource)
m.setDefaultSecurityContext(mgVersion, &m.Spec.Arbiter.PodTemplate)
}
if m.Spec.Hidden != nil {
m.setDefaultProbes(&m.Spec.Hidden.PodTemplate, mgVersion)
m.setDefaultAffinity(&m.Spec.Hidden.PodTemplate, m.OffshootSelectors(), topology)
apis.SetDefaultResourceLimits(&m.Spec.Hidden.PodTemplate.Spec.Resources, DefaultResources)
apis.SetDefaultResourceLimits(&m.Spec.Hidden.PodTemplate.Spec.Resources, defaultResource)
m.setDefaultSecurityContext(mgVersion, &m.Spec.Hidden.PodTemplate)
}
if m.Spec.ReplicaSet != nil {
Expand Down
12 changes: 6 additions & 6 deletions vendor/kubestash.dev/apimachinery/apis/constant.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,12 @@ const (

// RBAC related
const (
KubeStashBackupJobClusterRole = "kubestash-backup-job"
KubeStashRestoreJobClusterRole = "kubestash-restore-job"
KubeStashCronJobClusterRole = "kubestash-cron-job"
KubeStashBackendJobClusterRole = "kubestash-backend-job"
KubeStashBackendAccessorClusterRole = "kubestash-backend-accessor"
KubeStashPopulatorJobRole = "kubestash-populator-job"
KubeStashBackupJobClusterRole = "kubestash-backup-job"
KubeStashRestoreJobClusterRole = "kubestash-restore-job"
KubeStashCronJobClusterRole = "kubestash-cron-job"
KubeStashBackendJobClusterRole = "kubestash-backend-job"
KubeStashStorageInitializerClusterRole = "kubestash-storage-initializer-job"
KubeStashPopulatorJobClusterRole = "kubestash-populator-job"
)

// Reconciliation related
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 @@ -107,6 +107,14 @@ type S3Spec struct {
// SecretName specifies the name of the Secret that contains the access credential for this storage.
// +optional
SecretName string `json:"secretName,omitempty"`

// InsecureTLS controls whether a client should skip TLS certificate verification.
// Setting this field to true disables verification, which might be necessary in cases
// where the server uses self-signed certificates or certificates from an untrusted CA.
// Use this option with caution, as it can expose the client to man-in-the-middle attacks
// and other security risks. Only use it when absolutely necessary.
// +optional
InsecureTLS bool `json:"insecureTLS,omitempty"`
}

type GCSSpec struct {
Expand Down

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

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 @@ -4488,6 +4488,16 @@ spec:
description: Endpoint specifies the URL of the S3 or S3 compatible
storage bucket.
type: string
insecureTLS:
description: InsecureTLS controls whether a client should
skip TLS certificate verification. Setting this field to
true disables verification, which might be necessary in
cases where the server uses self-signed certificates or
certificates from an untrusted CA. Use this option with
caution, as it can expose the client to man-in-the-middle
attacks and other security risks. Only use it when absolutely
necessary.
type: boolean
prefix:
description: Prefix specifies a directory inside the bucket/container
where the data for this backend will be stored.
Expand Down
8 changes: 4 additions & 4 deletions vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1484,7 +1484,7 @@ kmodules.xyz/prober/api/v1
kmodules.xyz/resource-metadata/apis/node
kmodules.xyz/resource-metadata/apis/node/v1alpha1
kmodules.xyz/resource-metadata/crds
# kubedb.dev/apimachinery v0.41.0-rc.1.0.20240131123101-c711b3abb2a0
# kubedb.dev/apimachinery v0.41.0
## explicit; go 1.21.5
kubedb.dev/apimachinery/apis
kubedb.dev/apimachinery/apis/archiver/v1alpha1
Expand Down Expand Up @@ -1526,15 +1526,15 @@ kubedb.dev/apimachinery/crds
kubedb.dev/apimachinery/pkg/double_optin
kubedb.dev/apimachinery/pkg/factory
kubedb.dev/apimachinery/pkg/validator
# kubedb.dev/db-client-go v0.0.9
## explicit; go 1.21.5
# kubedb.dev/db-client-go v0.0.10
## explicit; go 1.21.6
kubedb.dev/db-client-go/elasticsearch
kubedb.dev/db-client-go/redis
# kubeops.dev/sidekick v0.0.5-0.20231225214445-a15c70833046
## explicit; go 1.21.5
kubeops.dev/sidekick/apis/apps
kubeops.dev/sidekick/apis/apps/v1alpha1
# kubestash.dev/apimachinery v0.4.0-rc.2
# kubestash.dev/apimachinery v0.4.0
## explicit; go 1.21.5
kubestash.dev/apimachinery/apis
kubestash.dev/apimachinery/apis/core/v1alpha1
Expand Down

0 comments on commit 8ff0608

Please sign in to comment.