Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add mongodb 5.0.3 #372

Merged
merged 3 commits into from
Oct 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions catalog/active_versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
"1.5.4-v1"
],
"MongoDB": [
"5.0.3",
"5.0.2",
"4.4.6",
"percona-4.2.7",
Expand Down
3 changes: 2 additions & 1 deletion catalog/backup_tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@
"mongodb-backup-4.4.6": [
"4.4.6"
],
"mongodb-backup-5.0.2": [
"mongodb-backup-5.0.3": [
"5.0.3",
"5.0.2"
],
"mysql-backup-5.7.25": [
Expand Down
4 changes: 2 additions & 2 deletions catalog/raw/mongodb/mongodb-5.0.2-official.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ spec:
stash:
addon:
backupTask:
name: mongodb-backup-5.0.2
name: mongodb-backup-5.0.3
restoreTask:
name: mongodb-restore-5.0.2
name: mongodb-restore-5.0.3
version: 5.0.2
23 changes: 23 additions & 0 deletions catalog/raw/mongodb/mongodb-5.0.3-official.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
apiVersion: catalog.kubedb.com/v1alpha1
kind: MongoDBVersion
metadata:
name: 5.0.3
spec:
db:
image: mongo:5.0.3
distribution: Official
exporter:
image: kubedb/mongodb_exporter:v0.20.4
initContainer:
image: kubedb/mongodb-init:4.2-v2
podSecurityPolicies:
databasePolicyName: mongodb-db
replicationModeDetector:
image: kubedb/replication-mode-detector:v0.9.0
stash:
addon:
backupTask:
name: mongodb-backup-5.0.3
restoreTask:
name: mongodb-restore-5.0.3
version: 5.0.3
3 changes: 2 additions & 1 deletion catalog/restore_tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@
"mongodb-restore-4.4.6": [
"4.4.6"
],
"mongodb-restore-5.0.2": [
"mongodb-restore-5.0.3": [
"5.0.3",
"5.0.2"
],
"mysql-restore-5.7.25": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ spec:
stash:
addon:
backupTask:
name: mongodb-backup-5.0.2
name: mongodb-backup-5.0.3
restoreTask:
name: mongodb-restore-5.0.2
name: mongodb-restore-5.0.3
version: 5.0.2
{{ end }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{{ if .Values.catalog.mongodb }}
apiVersion: catalog.kubedb.com/v1alpha1
kind: MongoDBVersion
metadata:
name: '5.0.3'
labels:
{{- include "kubedb-catalog.labels" . | nindent 4 }}
spec:
db:
image: '{{ include "official.registry" (set (.Values | deepCopy) "officialRegistry" (list "mongo")) }}:5.0.3'
distribution: Official
exporter:
image: '{{ include "catalog.registry" . }}/mongodb_exporter:v0.20.4'
initContainer:
image: '{{ include "catalog.registry" . }}/mongodb-init:4.2-v2'
podSecurityPolicies:
databasePolicyName: mongodb-db
replicationModeDetector:
image: '{{ include "catalog.registry" . }}/replication-mode-detector:v0.9.0'
stash:
addon:
backupTask:
name: mongodb-backup-5.0.3
restoreTask:
name: mongodb-restore-5.0.3
version: 5.0.3
{{ end }}
4 changes: 1 addition & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,17 @@ require (
github.com/Masterminds/semver/v3 v3.1.1
github.com/Masterminds/sprig/v3 v3.2.2
github.com/gobuffalo/flect v0.2.3 // indirect
github.com/google/go-cmp v0.5.6 // indirect
github.com/google/gofuzz v1.2.0
github.com/spf13/pflag v1.0.5
github.com/yudai/gojsondiff v1.0.0
golang.org/x/crypto v0.0.0-20210314154223-e6e6c4f2bb5b // indirect
gomodules.xyz/go-sh v0.1.0
gomodules.xyz/semvers v0.0.0-20210603205601-45dfbb5326a4
k8s.io/api v0.21.1
k8s.io/apimachinery v0.21.1
kmodules.xyz/client-go v0.0.0-20210928133955-8df5bb467db6
kmodules.xyz/schema-checker v0.1.3
sigs.k8s.io/yaml v1.2.0
stash.appscode.dev/installer v0.12.2-0.20211007063844-5e8dc3cd6620
stash.appscode.dev/installer v0.12.2-0.20211007220922-a088dcdf1983
)

replace gopkg.in/yaml.v2 => gopkg.in/yaml.v2 v2.3.0
Expand Down
5 changes: 2 additions & 3 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -689,7 +689,6 @@ k8s.io/klog/v2 v2.8.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec=
k8s.io/kube-aggregator v0.21.1/go.mod h1:cAZ0n02IiSl57sQSHz4vvrz3upQRMbytOiZnpPJaQzQ=
k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7/go.mod h1:wXW5VT87nVfh/iLV8FpR2uDvrFyomxbtb1KivDbvPTE=
k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
kmodules.xyz/client-go v0.0.0-20210921150324-f005c6dfcb32/go.mod h1:0gkPeALtYjB27OHt4rd6+ZmMgoVTHVLtEJQeU23/gtA=
kmodules.xyz/client-go v0.0.0-20210928133955-8df5bb467db6 h1:o+SymmN26C8bqh1nLTFjT0UdOtAYrTLbp6v49iRe5MY=
kmodules.xyz/client-go v0.0.0-20210928133955-8df5bb467db6/go.mod h1:0gkPeALtYjB27OHt4rd6+ZmMgoVTHVLtEJQeU23/gtA=
kmodules.xyz/schema-checker v0.1.2/go.mod h1:JyT3tjizU/gQY9bK56xzAvkjJoAaUPRam7HELx4Nb/o=
Expand All @@ -708,5 +707,5 @@ sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o=
sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q=
sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc=
sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU=
stash.appscode.dev/installer v0.12.2-0.20211007063844-5e8dc3cd6620 h1:7d7AUuQji5WYgygeEIr78ITswCoZkt54D1KRxWko23E=
stash.appscode.dev/installer v0.12.2-0.20211007063844-5e8dc3cd6620/go.mod h1:USGEb3BkysH9hqGEJp/xvHL1Ffqi9XNLza5DGdyeJBQ=
stash.appscode.dev/installer v0.12.2-0.20211007220922-a088dcdf1983 h1:ySWPaGBwdJXwm1b7Q8Jl9swxAwiawZNZ9DDul6cJqfE=
stash.appscode.dev/installer v0.12.2-0.20211007220922-a088dcdf1983/go.mod h1:wkiUoS4nYMsZL3UK5WqE2YFr7xeVt4/+pZBB+rS1pPA=
11 changes: 7 additions & 4 deletions hack/fmt/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@ import (
stash "stash.appscode.dev/installer/catalog"
)

const registryKubeDB = "kubedb"
const (
registryKubeDB = "kubedb"
distroOfficial = "Official"
)

type StashAddon struct {
DBType string
Expand Down Expand Up @@ -190,7 +193,7 @@ func main() {
} else if dbKind == "Postgres" {
if distro == "" {

distro = "Official"
distro = distroOfficial
if strings.Contains(strings.ToLower(ri.Object.GetName()), "timescale") {
distro = "TimescaleDB"
}
Expand All @@ -201,7 +204,7 @@ func main() {
}
} else if dbKind == "MySQL" {
if distro == "" {
distro = "Official"
distro = distroOfficial
if strings.Contains(strings.ToLower(ri.Object.GetName()), "percona") {
distro = "Percona"
}
Expand All @@ -218,7 +221,7 @@ func main() {
}
} else if dbKind == "MongoDB" {
if distro == "" {
distro = "Official"
distro = distroOfficial
if strings.Contains(strings.ToLower(ri.Object.GetName()), "percona") {
distro = "Percona"
}
Expand Down
4 changes: 1 addition & 3 deletions vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ github.com/gogo/protobuf/sortkeys
github.com/golang/protobuf/jsonpb
github.com/golang/protobuf/proto
# github.com/google/go-cmp v0.5.6
## explicit
github.com/google/go-cmp/cmp
github.com/google/go-cmp/cmp/internal/diff
github.com/google/go-cmp/cmp/internal/flags
Expand Down Expand Up @@ -64,7 +63,6 @@ github.com/yudai/gojsondiff/formatter
# github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82
github.com/yudai/golcs
# golang.org/x/crypto v0.0.0-20210314154223-e6e6c4f2bb5b
## explicit
golang.org/x/crypto/bcrypt
golang.org/x/crypto/blowfish
golang.org/x/crypto/pbkdf2
Expand Down Expand Up @@ -173,7 +171,7 @@ sigs.k8s.io/structured-merge-diff/v4/value
# sigs.k8s.io/yaml v1.2.0
## explicit
sigs.k8s.io/yaml
# stash.appscode.dev/installer v0.12.2-0.20211007063844-5e8dc3cd6620
# stash.appscode.dev/installer v0.12.2-0.20211007220922-a088dcdf1983
## explicit
stash.appscode.dev/installer/catalog
# gopkg.in/yaml.v2 => gopkg.in/yaml.v2 v2.3.0
Expand Down
2 changes: 1 addition & 1 deletion vendor/stash.appscode.dev/installer/catalog/catalog.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"4.1.13-v11",
"4.2.3-v11",
"4.4.6-v2",
"5.0.2"
"5.0.3"
]
},
{
Expand Down