Skip to content
This repository has been archived by the owner on May 20, 2022. It is now read-only.

Commit

Permalink
Update KubeDB api (#32)
Browse files Browse the repository at this point in the history
Signed-off-by: 1gtm <1gtm@appscode.com>
  • Loading branch information
1gtm committed Oct 8, 2020
1 parent 3edfc19 commit 933baa7
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 10 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ require (
k8s.io/client-go v0.18.9
k8s.io/utils v0.0.0-20200414100711-2df71ebbae66 // indirect
kmodules.xyz/client-go v0.0.0-20201007024140-3223988adf40
kmodules.xyz/custom-resources v0.0.0-20200922210108-70f2815a43bb
kmodules.xyz/custom-resources v0.0.0-20201008012351-6d8090f759d4
)

replace bitbucket.org/ww/goautoneg => gomodules.xyz/goautoneg v0.0.0-20120707110453-a547fc61f48d
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -611,8 +611,8 @@ kmodules.xyz/client-go v0.0.0-20200922200830-63d86b6e5b63/go.mod h1:JZN34jqk6ZlR
kmodules.xyz/client-go v0.0.0-20201007024140-3223988adf40 h1:XQLn2whq+TYbGxVloiyopxSM9jsqjqvWQjltXFKd+aA=
kmodules.xyz/client-go v0.0.0-20201007024140-3223988adf40/go.mod h1:pnRh7gtJ6ErPJQBkQeRlpD95KRtxhD4eGrYagZEU8RM=
kmodules.xyz/crd-schema-fuzz v0.0.0-20200922204806-c1426cd7fcf4/go.mod h1:WrO3fryNyFCgqqyWnwI89lnzWA7kN072Ehya7ELGfzE=
kmodules.xyz/custom-resources v0.0.0-20200922210108-70f2815a43bb h1:SwMPMh6A196yoe8kAH+guTNS8rsTfB2dRbFNh6g0Znk=
kmodules.xyz/custom-resources v0.0.0-20200922210108-70f2815a43bb/go.mod h1:+YU32jSWaGGE4etTr/iCF88tLAeDNq1lhptVymjUbjg=
kmodules.xyz/custom-resources v0.0.0-20201008012351-6d8090f759d4 h1:eftT0CrrAYK1uniwsVhheYao4mwGk+eFT9eftRX9BMo=
kmodules.xyz/custom-resources v0.0.0-20201008012351-6d8090f759d4/go.mod h1:+YU32jSWaGGE4etTr/iCF88tLAeDNq1lhptVymjUbjg=
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.7/go.mod h1:PHgbrJT7lCHcxMU+mDHEm+nx46H4zuuHZkDP6icnhu0=
sigs.k8s.io/controller-runtime v0.6.0/go.mod h1:CpYf5pdNY/B352A1TFLAS2JVSlnGQ5O2cftPHndTroo=
sigs.k8s.io/kustomize v2.0.3+incompatible h1:JUufWFNlI44MdtnjUqVnvh29rR37PQFzPbLXqhyOyX0=
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import (
"kmodules.xyz/client-go/apiextensions"
"kmodules.xyz/custom-resources/crds"

core "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/client-go/kubernetes"
)
Expand All @@ -51,17 +52,12 @@ func (a AppBinding) URL() (string, error) {
return "", errors.New("connection url is missing")
}

const (
KeyUsername = "username"
KeyPassword = "password"
)

func (a AppBinding) URLTemplate() (string, error) {
rawurl, err := a.URL()
if err != nil {
return "", err
}
auth := fmt.Sprintf("{{%s}}:{{%s}}@", KeyUsername, KeyPassword)
auth := fmt.Sprintf("{{%s}}:{{%s}}@", core.BasicAuthUsernameKey, core.BasicAuthPasswordKey)

i := strings.Index(rawurl, "://")
if i < 0 {
Expand Down
2 changes: 1 addition & 1 deletion vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ kmodules.xyz/client-go/tools/analytics
kmodules.xyz/client-go/tools/cli
kmodules.xyz/client-go/tools/clientcmd
kmodules.xyz/client-go/tools/clusterid
# kmodules.xyz/custom-resources v0.0.0-20200922210108-70f2815a43bb
# kmodules.xyz/custom-resources v0.0.0-20201008012351-6d8090f759d4
kmodules.xyz/custom-resources/apis/appcatalog
kmodules.xyz/custom-resources/apis/appcatalog/v1alpha1
kmodules.xyz/custom-resources/client/clientset/versioned/scheme
Expand Down

0 comments on commit 933baa7

Please sign in to comment.