Skip to content

Commit

Permalink
Merge branch 'master' into my-arch-pause
Browse files Browse the repository at this point in the history
  • Loading branch information
ArnobKumarSaha authored Feb 15, 2024
2 parents 459d541 + 8da97b4 commit 896ac7c
Show file tree
Hide file tree
Showing 125 changed files with 7,273 additions and 497 deletions.
18 changes: 10 additions & 8 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ require (
k8s.io/klog/v2 v2.110.1
k8s.io/kubectl v0.29.0
kmodules.xyz/cert-manager-util v0.29.0
kmodules.xyz/client-go v0.29.6
kmodules.xyz/client-go v0.29.8
kmodules.xyz/custom-resources v0.29.1
kmodules.xyz/monitoring-agent-api v0.29.0
kubedb.dev/apimachinery v0.41.0
kubedb.dev/db-client-go v0.0.10
kubedb.dev/apimachinery v0.42.0
kubedb.dev/db-client-go v0.0.11
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
stash.appscode.dev/apimachinery v0.33.0
)

require (
Expand Down Expand Up @@ -78,7 +78,8 @@ require (
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/kubernetes-csi/external-snapshotter/client/v4 v4.2.0 // indirect
github.com/klauspost/cpuid/v2 v2.0.9 // indirect
github.com/kubernetes-csi/external-snapshotter/client/v7 v7.0.0 // indirect
github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect
Expand Down Expand Up @@ -108,6 +109,7 @@ require (
github.com/xlab/treeprint v1.2.0 // indirect
github.com/yudai/gojsondiff v1.0.0 // indirect
github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82 // indirect
github.com/zeebo/xxh3 v1.0.2 // indirect
go.starlark.net v0.0.0-20230525235612-a134d8f9ddca // indirect
golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect
golang.org/x/net v0.19.0 // indirect
Expand Down Expand Up @@ -135,12 +137,12 @@ require (
k8s.io/metrics v0.29.0 // indirect
k8s.io/utils v0.0.0-20231127182322-b307cd553661 // indirect
kmodules.xyz/apiversion v0.2.0 // indirect
kmodules.xyz/objectstore-api v0.29.0 // indirect
kmodules.xyz/objectstore-api v0.29.1 // indirect
kmodules.xyz/offshoot-api v0.29.0 // indirect
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 // indirect
kubeops.dev/sidekick v0.0.5 // indirect
kubestash.dev/apimachinery v0.5.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
157 changes: 22 additions & 135 deletions go.sum

Large diffs are not rendered by default.

8 changes: 7 additions & 1 deletion pkg/data/mariadb.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ import (
cmdutil "k8s.io/kubectl/pkg/cmd/util"
)

const (
mdCaFile = "/etc/mysql/certs/client/ca.crt"
mdCertFile = "/etc/mysql/certs/client/tls.crt"
mdKeyFile = "/etc/mysql/certs/client/tls.key"
)

func InsertMariaDBDataCMD(f cmdutil.Factory) *cobra.Command {
var (
dbName string
Expand Down Expand Up @@ -317,7 +323,7 @@ func (opts *mariadbOpts) getShellCommand(command string) (string, error) {
containerName := "mariadb"

if db.Spec.TLS != nil {
cmd = fmt.Sprintf("kubectl exec -n %s svc/%s -c %s -- mysql -u%s -p'%s' --host=%s --port=%s --ssl-ca='%v' --ssl-cert='%v' --ssl-key='%v' %s -e \"%s\"", db.Namespace, db.OffshootName(), containerName, user, password, "127.0.0.1", "3306", myCaFile, myCertFile, myKeyFile, api.ResourceSingularMySQL, command)
cmd = fmt.Sprintf("kubectl exec -n %s svc/%s -c %s -- mysql -u%s -p'%s' --host=%s --port=%s --ssl-ca='%v' --ssl-cert='%v' --ssl-key='%v' %s -e \"%s\"", db.Namespace, db.OffshootName(), containerName, user, password, "127.0.0.1", "3306", mdCaFile, mdCertFile, mdKeyFile, api.ResourceSingularMySQL, command)
} else {
cmd = fmt.Sprintf("kubectl exec -n %s svc/%s -c %s -- mysql -u%s -p'%s' %s -e \"%s\"", db.Namespace, db.OffshootName(), containerName, user, password, api.ResourceSingularMySQL, command)
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/data/mongodb.go
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ func (opts *mongoDBOpts) getShellCommand(command string) (*shell.Session, error)
if err != nil {
return nil, err
}
mgCommand = append(mgCommand, c)
mgCommand = append(mgCommand, c...)
} else {
mgCommand = append(mgCommand,
KubeDBDatabaseName, "--quiet",
Expand Down Expand Up @@ -413,7 +413,7 @@ func (opts *mongoDBOpts) handleTLS() ([]interface{}, error) {
}

mgCommand := []interface{}{
"mongo", KubeDBDatabaseName, "--quiet",
KubeDBDatabaseName, "--quiet",
"--tls",
fmt.Sprintf("--tlsCAFile=%v", mgCAFile),
fmt.Sprintf("--tlsCertificateKeyFile=%v", mgPEMFile),
Expand Down
24 changes: 24 additions & 0 deletions vendor/github.com/klauspost/cpuid/v2/.gitignore

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

74 changes: 74 additions & 0 deletions vendor/github.com/klauspost/cpuid/v2/.goreleaser.yml

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

35 changes: 35 additions & 0 deletions vendor/github.com/klauspost/cpuid/v2/CONTRIBUTING.txt

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

22 changes: 22 additions & 0 deletions vendor/github.com/klauspost/cpuid/v2/LICENSE

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

137 changes: 137 additions & 0 deletions vendor/github.com/klauspost/cpuid/v2/README.md

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

Loading

0 comments on commit 896ac7c

Please sign in to comment.