diff --git a/controller.go b/controller.go index 8bbff7e..1b4f9ea 100644 --- a/controller.go +++ b/controller.go @@ -25,7 +25,7 @@ var ( func (c *Client) ControllerList(opts types.ListOptions) ([]*types.Controller, error) { listOpts := doOptions{ fieldSelector: opts.FieldSelector, - labelSelector: opts.LabelSelector, + labelSelector: opts.LabelSelector, context: opts.Context, } diff --git a/login_test.go b/login_test.go index 2c356c9..93798f0 100644 --- a/login_test.go +++ b/login_test.go @@ -33,7 +33,7 @@ func TestLoginBadCreds(t *testing.T) { } if token != "" { - t.Error("token (%v) incorrectly returned", token) + t.Errorf("token (%v) incorrectly returned", token) } } diff --git a/types/controller.go b/types/controller.go index b6381f1..4d71cdf 100644 --- a/types/controller.go +++ b/types/controller.go @@ -59,6 +59,9 @@ type Controller struct { VersionInfo map[string]VersionInfo `json:"versionInfo"` Version string `json:"version"` + // Cordon true if in an unschedulable state + Cordon bool `json:"unschedulable"` + // high level stats that combine info from all driver instances CapacityStats CapacityStats `json:"capacityStats"` } diff --git a/types/controller_update_options.go b/types/controller_update_options.go index 8c17ade..a55b816 100644 --- a/types/controller_update_options.go +++ b/types/controller_update_options.go @@ -19,6 +19,9 @@ type ControllerUpdateOptions struct { // Labels are user-defined key/value metadata. Labels map[string]string `json:"labels"` + // Cordon sets the controler into an unschedulable state if true + Cordon bool `json:"unschedulable"` + // Context can be set with a timeout or can be used to cancel a request. Context context.Context `json:"-"` }