Skip to content

Commit

Permalink
Fix: cloudshell scheme not found
Browse files Browse the repository at this point in the history
Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
  • Loading branch information
chivalryq committed Jul 13, 2023
1 parent ff8382c commit 1176aae
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ require (
github.com/barnettZQG/inject v0.0.1
github.com/briandowns/spinner v1.23.0 // indirect
github.com/chartmuseum/helm-push v0.10.4 // indirect
github.com/cloudtty/cloudtty v0.2.0
github.com/cloudtty/cloudtty v0.5.0
github.com/containerd/containerd v1.7.2 // indirect
github.com/coreos/go-oidc v2.2.1+incompatible
github.com/crossplane/crossplane-runtime v0.19.2 // indirect
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,8 @@ github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDk
github.com/cloudflare/circl v1.1.0/go.mod h1:prBCrKB9DV4poKZY1l9zBXg2QJY7mvgRvtMxxK7fi4I=
github.com/cloudflare/circl v1.3.3 h1:fE/Qz0QdIGqeWfnwq0RE0R7MI51s0M2E4Ga9kq5AEMs=
github.com/cloudflare/circl v1.3.3/go.mod h1:5XYMA4rFBvNIrhs50XuiBJ15vF2pZn4nnUKZrLbUZFA=
github.com/cloudtty/cloudtty v0.2.0 h1:QvDbb2hZl7nSfLDrKkbjIixjkW6seSVBX3N/GRmioyM=
github.com/cloudtty/cloudtty v0.2.0/go.mod h1:RRVb8fLrfpzjsLFqaUk74ouRvZ2drVCvSN3ZzidHju8=
github.com/cloudtty/cloudtty v0.5.0 h1:ees/ai35hhFiMPX+ifbRtyGra8QaE1+LHO49ZCuDKBs=
github.com/cloudtty/cloudtty v0.5.0/go.mod h1:gyxZNmuHhu+53n0mQV6n8TfMw4uwJHIA/7hZ2kKv1/4=
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI=
Expand Down
5 changes: 5 additions & 0 deletions pkg/server/infrastructure/clients/kubeclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package clients
import (
"fmt"

cloudshellv1alpha1 "github.com/cloudtty/cloudtty/pkg/apis/cloudshell/v1alpha1"
pkgmulticluster "github.com/kubevela/pkg/multicluster"
"github.com/kubevela/workflow/api/v1alpha1"
"github.com/kubevela/workflow/pkg/cue/packages"
Expand Down Expand Up @@ -77,6 +78,10 @@ func GetKubeClient() (client.Client, error) {
if err != nil {
return nil, err
}
err = cloudshellv1alpha1.AddToScheme(common.Scheme)
if err != nil {
return nil, err
}

Check warning on line 84 in pkg/server/infrastructure/clients/kubeclient.go

View check run for this annotation

Codecov / codecov/patch

pkg/server/infrastructure/clients/kubeclient.go#L83-L84

Added lines #L83 - L84 were not covered by tests
return pkgmulticluster.NewClient(kubeConfig, pkgmulticluster.ClientOptions{
Options: client.Options{Scheme: common.Scheme},
})
Expand Down

0 comments on commit 1176aae

Please sign in to comment.