move implementations to external repos (#17)

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2020-08-25 13:44:41 +03:00
committed by GitHub
parent c4a303190a
commit 0f4b1435d9
238 changed files with 151 additions and 37364 deletions

View File

@@ -341,16 +341,20 @@ func NewDeployment(name, version, typ, namespace string) *Deployment {
// NewLocalClient returns a client that can be used with `kubectl proxy`
func NewLocalClient(hosts ...string) *client {
if len(hosts) == 0 {
hosts[0] = "http://localhost:8001"
}
return &client{
c := &client{
opts: &api.Options{
Client: http.DefaultClient,
Host: hosts[0],
Namespace: "default",
},
}
if len(hosts) == 0 {
c.opts.Host = "http://localhost:8001"
} else {
c.opts.Host = hosts[0]
}
return c
}
// NewClusterClient creates a Kubernetes client for use from within a k8s pod.