Skip to content

Commit

Permalink
Use kubernetes/code-generator (#163)
Browse files Browse the repository at this point in the history
  • Loading branch information
tamalsaha authored Sep 9, 2017
1 parent 3b1d6bf commit da3eb2e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions run.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
stringz "github.com/appscode/go/strings"
"github.com/appscode/log"
"github.com/appscode/pat"
sapi "github.com/appscode/stash/api"
scs "github.com/appscode/stash/client/clientset"
sapi "github.com/appscode/stash/apis/stash"
scs "github.com/appscode/stash/client/internalclientset/typed/stash/internalversion"
"github.com/appscode/stash/pkg/controller"
"github.com/appscode/stash/pkg/docker"
"github.com/appscode/stash/pkg/migrator"
Expand All @@ -22,7 +22,7 @@ import (

var (
kubeClient clientset.Interface
stashClient scs.ExtensionInterface
stashClient scs.ResticsGetter

scratchDir string = "/tmp"
)
Expand Down
4 changes: 2 additions & 2 deletions schedule.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"time"

"github.com/appscode/log"
rcs "github.com/appscode/stash/client/clientset"
scs "github.com/appscode/stash/client/internalclientset/typed/stash/internalversion"
"github.com/appscode/stash/pkg/scheduler"
"github.com/appscode/stash/pkg/util"
"github.com/spf13/cobra"
Expand Down Expand Up @@ -42,7 +42,7 @@ func NewCmdSchedule() *cobra.Command {
log.Fatalf("Could not get Kubernetes config: %s", err)
}
kubeClient = clientset.NewForConfigOrDie(config)
stashClient = rcs.NewForConfigOrDie(config)
stashClient = scs.NewForConfigOrDie(config)

opt.NodeName = os.Getenv("NODE_NAME")
if opt.NodeName == "" {
Expand Down
4 changes: 2 additions & 2 deletions snapshot_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
_ "net/http/pprof"

"github.com/appscode/pat"
sapi "github.com/appscode/stash/api"
sapi "github.com/appscode/stash/apis/stash"
"github.com/appscode/stash/pkg/cli"
kerr "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down Expand Up @@ -38,7 +38,7 @@ func ExportSnapshots(w http.ResponseWriter, r *http.Request) {
resticCLI := cli.New(scratchDir)

var resource *sapi.Restic
resource, err := stashClient.Restics(namespace).Get(name)
resource, err := stashClient.Restics(namespace).Get(name, metav1.GetOptions{})
if kerr.IsNotFound(err) {
http.Error(w, err.Error(), http.StatusNotFound)
return
Expand Down

0 comments on commit da3eb2e

Please sign in to comment.