From da3eb2ec8d6975d4603afa21fc4b7806c60f797d Mon Sep 17 00:00:00 2001 From: Tamal Saha Date: Fri, 8 Sep 2017 17:51:52 -0700 Subject: [PATCH] Use kubernetes/code-generator (#163) --- run.go | 6 +++--- schedule.go | 4 ++-- snapshot_handler.go | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/run.go b/run.go index 79bf9a36c..3a31d8874 100644 --- a/run.go +++ b/run.go @@ -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" @@ -22,7 +22,7 @@ import ( var ( kubeClient clientset.Interface - stashClient scs.ExtensionInterface + stashClient scs.ResticsGetter scratchDir string = "/tmp" ) diff --git a/schedule.go b/schedule.go index 6ab7a161e..ed6eaa541 100644 --- a/schedule.go +++ b/schedule.go @@ -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" @@ -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 == "" { diff --git a/snapshot_handler.go b/snapshot_handler.go index 7333360f8..a0a366094 100644 --- a/snapshot_handler.go +++ b/snapshot_handler.go @@ -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" @@ -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