Skip to content

Commit

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

Release: v2024.3.9-rc.0

Release-tracker: kubedb/CHANGELOG#86

Signed-off-by: 1gtm <[email protected]>
  • Loading branch information
1gtm authored Mar 10, 2024
1 parent 6da3a3e commit c9d1ac6
Show file tree
Hide file tree
Showing 74 changed files with 15,179 additions and 87 deletions.
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ require (
k8s.io/api v0.29.0
k8s.io/apimachinery v0.29.0
k8s.io/klog/v2 v2.110.1
kmodules.xyz/client-go v0.29.9
kmodules.xyz/client-go v0.29.12
kmodules.xyz/custom-resources v0.29.1
kubedb.dev/apimachinery v0.42.2-0.20240227074455-429a2b10fe50
kubedb.dev/apimachinery v0.43.0-rc.0
sigs.k8s.io/controller-runtime v0.17.0
xorm.io/xorm v1.3.6
)
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -579,16 +579,16 @@ k8s.io/utils v0.0.0-20231127182322-b307cd553661 h1:FepOBzJ0GXm8t0su67ln2wAZjbQ6R
k8s.io/utils v0.0.0-20231127182322-b307cd553661/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
kmodules.xyz/apiversion v0.2.0 h1:vAQYqZFm4xu4pbB1cAdHbFEPES6EQkcR4wc06xdTOWk=
kmodules.xyz/apiversion v0.2.0/go.mod h1:oPX8g8LvlPdPX3Yc5YvCzJHQnw3YF/X4/jdW0b1am80=
kmodules.xyz/client-go v0.29.9 h1:nZcKM4YzmHAAQ62EYLep1NQdhARA9uOnYOiHMRf2VVg=
kmodules.xyz/client-go v0.29.9/go.mod h1:WYM/ZC3I5/AUGHYyYYEzYHFhnSwK+tEZyGld6KpLoxI=
kmodules.xyz/client-go v0.29.12 h1:OZV5a9fEJwx0XI8OJYDqYRuCEeJyhsZN0iUs1YCBeks=
kmodules.xyz/client-go v0.29.12/go.mod h1:WYM/ZC3I5/AUGHYyYYEzYHFhnSwK+tEZyGld6KpLoxI=
kmodules.xyz/custom-resources v0.29.1 h1:xiNylhs3ILRbcUhxxy306AOy9GMA4Mq7xFIptZKgal4=
kmodules.xyz/custom-resources v0.29.1/go.mod h1:829zDY1EjaxPP52h1T73LZx/vgv8Pld9/uTT/ViZTc0=
kmodules.xyz/monitoring-agent-api v0.29.0 h1:gpFl6OZrlMLb/ySMHdREI9EwGtnJ91oZBn9H1UFRwB4=
kmodules.xyz/monitoring-agent-api v0.29.0/go.mod h1:iNbvaMTgVFOI5q2LJtGK91j4Dmjv4ZRiRdasGmWLKQI=
kmodules.xyz/offshoot-api v0.29.0 h1:GHLhxxT9jU1N8+FvOCCeJNyU5g0duYS46UGrs6AHNLY=
kmodules.xyz/offshoot-api v0.29.0/go.mod h1:5NxhBblXoDHWStx9HCDJR2KFTwYjEZ7i1Id3jelIunw=
kubedb.dev/apimachinery v0.42.2-0.20240227074455-429a2b10fe50 h1:cyVDIRYXLBss+GjVBNwh7qaWZaCn10BxRw7SUnGbcJs=
kubedb.dev/apimachinery v0.42.2-0.20240227074455-429a2b10fe50/go.mod h1:snGyLCdf0EDRjEMVxAtbObhL8lyFG/y/hNNVprYu1yE=
kubedb.dev/apimachinery v0.43.0-rc.0 h1:XCJfDDF8oDjUlaSZINsMlAbpV4c9NPsMRxEDSKdJYKM=
kubedb.dev/apimachinery v0.43.0-rc.0/go.mod h1:pEkqSvBTEhGfmxSqwSKgib5a7fLYgKx4cP29muFgYQc=
lukechampine.com/uint128 v1.1.1/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk=
lukechampine.com/uint128 v1.2.0 h1:mBi/5l91vocEN8otkC5bDLhi2KdCticRiwbdB0O+rjI=
lukechampine.com/uint128 v1.2.0/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk=
Expand Down
17 changes: 15 additions & 2 deletions vendor/kmodules.xyz/client-go/api/v1/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,28 @@ type ClusterMetadata struct {
Provider HostingProvider `json:"provider,omitempty" protobuf:"bytes,4,opt,name=provider,casttype=HostingProvider"`
}

/*
ENUM(
ACE = 1
OCMHub = 2
OCMMulticlusterControlplane = 4
OCMSpoke = 8
OpenShift = 16
Rancher = 32
VirtualCluster = 64
)
*/
type ClusterManager int

const (
ClusterManagerACE ClusterManager = 1 << iota
ClusterManagerOCMHub
ClusterManagerOCMSpoke
ClusterManagerOCMMulticlusterControlplane
ClusterManagerRancher
ClusterManagerOCMSpoke
ClusterManagerOpenShift
ClusterManagerRancher
ClusterManagerVirtualCluster
)

Expand Down
84 changes: 84 additions & 0 deletions vendor/kmodules.xyz/client-go/api/v1/cluster_enum.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
/*
Copyright AppsCode Inc. and Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package v1

import (
"fmt"
"strings"
)

var ErrInvalidClusterManager = fmt.Errorf("not a valid ClusterManager, try [%s]", strings.Join(_ClusterManagerNames, ", "))

const _ClusterManagerName = "ACEOCMHubOCMMulticlusterControlplaneOCMSpokeOpenShiftRancherVirtualCluster"

var _ClusterManagerNames = []string{
_ClusterManagerName[0:3],
_ClusterManagerName[3:9],
_ClusterManagerName[9:36],
_ClusterManagerName[36:44],
_ClusterManagerName[44:53],
_ClusterManagerName[53:60],
_ClusterManagerName[60:74],
}

// ClusterManagerNames returns a list of possible string values of ClusterManager.
func ClusterManagerNames() []string {
tmp := make([]string, len(_ClusterManagerNames))
copy(tmp, _ClusterManagerNames)
return tmp
}

// ClusterManagerValues returns a list of the values for ClusterManager
func ClusterManagerValues() []ClusterManager {
return []ClusterManager{
ClusterManagerACE,
ClusterManagerOCMHub,
ClusterManagerOCMMulticlusterControlplane,
ClusterManagerOCMSpoke,
ClusterManagerOpenShift,
ClusterManagerRancher,
ClusterManagerVirtualCluster,
}
}

var _ClusterManagerMap = map[ClusterManager]string{
ClusterManagerACE: _ClusterManagerName[0:3],
ClusterManagerOCMHub: _ClusterManagerName[3:9],
ClusterManagerOCMMulticlusterControlplane: _ClusterManagerName[9:36],
ClusterManagerOCMSpoke: _ClusterManagerName[36:44],
ClusterManagerOpenShift: _ClusterManagerName[44:53],
ClusterManagerRancher: _ClusterManagerName[53:60],
ClusterManagerVirtualCluster: _ClusterManagerName[60:74],
}

var _ClusterManagerValue = map[string]ClusterManager{
_ClusterManagerName[0:3]: ClusterManagerACE,
_ClusterManagerName[3:9]: ClusterManagerOCMHub,
_ClusterManagerName[9:36]: ClusterManagerOCMMulticlusterControlplane,
_ClusterManagerName[36:44]: ClusterManagerOCMSpoke,
_ClusterManagerName[44:53]: ClusterManagerOpenShift,
_ClusterManagerName[53:60]: ClusterManagerRancher,
_ClusterManagerName[60:74]: ClusterManagerVirtualCluster,
}

// ParseClusterManager attempts to convert a string to a ClusterManager.
func ParseClusterManager(name string) (ClusterManager, error) {
if x, ok := _ClusterManagerValue[name]; ok {
return x, nil
}
return ClusterManager(0), fmt.Errorf("%s is %w", name, ErrInvalidClusterManager)
}
4 changes: 3 additions & 1 deletion vendor/kmodules.xyz/client-go/core/v1/kubernetes.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,9 @@ func UpsertContainer(containers []core.Container, upsert core.Container) []core.
}

func MergeContainer(container core.Container, containerTemplate core.Container) core.Container {
container.Command = containerTemplate.Command
if len(containerTemplate.Command) > 0 {
container.Command = containerTemplate.Command
}
container.Args = meta.UpsertArgumentList(container.Args, containerTemplate.Args)
container.WorkingDir = containerTemplate.WorkingDir
container.EnvFrom = containerTemplate.EnvFrom
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ type MariaDBVersionSpec struct {
// SecurityContext is for the additional config for the DB container
// +optional
SecurityContext SecurityContext `json:"securityContext"`
// Archiver defines the walg & stash-addon related specifications
Archiver ArchiverSpec `json:"archiver,omitempty"`
}

// MariaDBVersionDatabase is the mariadb image
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 @@ -54,10 +54,12 @@ func (p *PgpoolVersion) ResourcePlural() string {

func (p *PgpoolVersion) ValidateSpecs() error {
if p.Spec.Version == "" ||
p.Spec.Pgpool.Image == "" {
p.Spec.Pgpool.Image == "" ||
p.Spec.Exporter.Image == "" {
return fmt.Errorf(`atleast one of the following specs is not set for pgpoolVersion "%v":
spec.version,
spec.pgpool.image,`, p.Name)
spec.pgpool.image,
spec.exporter.image`, p.Name)
}
return nil
}
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,16 @@ type PgpoolVersion struct {
type PgpoolVersionSpec struct {
// Version
Version string `json:"version"`
// Database Image
Pgpool PgpoolVersionDatabase `json:"pgpool"`

// Pgpool Image
Pgpool PgpoolVersionPgpool `json:"pgpool"`

// +optional
Deprecated bool `json:"deprecated,omitempty"`
// PSP names
// +optional
PodSecurityPolicies PgpoolVersionPodSecurityPolicy `json:"podSecurityPolicies"`

// Exporter Image
Exporter PgpoolVersionExporter `json:"exporter,omitempty"`

// SecurityContext is for the additional config for pgpool DB container
// +optional
SecurityContext PgpoolSecurityContext `json:"securityContext"`
Expand All @@ -69,8 +72,13 @@ type PgpoolVersionPodSecurityPolicy struct {
DatabasePolicyName string `json:"databasePolicyName"`
}

// PgpoolVersionExporter is the image for the Pgpool exporter
type PgpoolVersionExporter struct {
Image string `json:"image"`
}

// PgpoolVersionDatabase is the Pgpool Database image
type PgpoolVersionDatabase struct {
type PgpoolVersionPgpool struct {
Image string `json:"image"`
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ type AddonSpec struct {
Tasks AddonTasks `json:"tasks,omitempty"`
}

// +kubebuilder:validation:Enum=mongodb-addon;postgres-addon;mysql-addon
// +kubebuilder:validation:Enum=mongodb-addon;postgres-addon;mysql-addon;mariadb-addon
type AddonType string

type AddonTasks struct {
Expand Down
Loading

0 comments on commit c9d1ac6

Please sign in to comment.