Skip to content

Commit

Permalink
React to bump
Browse files Browse the repository at this point in the history
  • Loading branch information
damemi committed Jul 23, 2020
1 parent 62968e5 commit 046539b
Show file tree
Hide file tree
Showing 9 changed files with 766 additions and 173 deletions.
436 changes: 377 additions & 59 deletions contrib/completions/bash/oc

Large diffs are not rendered by default.

487 changes: 381 additions & 106 deletions contrib/completions/zsh/oc

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pkg/cli/admin/migrate/images/imagerefs.go
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ func (o *MigrateImageReferenceOptions) transform(obj runtime.Object) (migrate.Re
t.Data[corev1.DockerConfigKey] = data
return migrate.ReporterBool(true), nil
case corev1.SecretTypeDockerConfigJson:
var v credentialprovider.DockerConfigJson
var v credentialprovider.DockerConfigJSON
if err := json.Unmarshal(t.Data[corev1.DockerConfigJsonKey], &v); err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/cli/deployer/deployer.go
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ func (d *Deployer) Deploy(namespace, rcName string) error {
}
// Scale the deployment down to zero.
retryWaitParams := kscale.NewRetryParams(1*time.Second, 120*time.Second)
if err := d.scaler.Scale(candidate.Namespace, candidate.Name, uint(0), &kscale.ScalePrecondition{Size: -1, ResourceVersion: ""}, retryWaitParams, retryWaitParams, corev1.SchemeGroupVersion.WithResource("replicationcontrollers")); err != nil {
if err := d.scaler.Scale(candidate.Namespace, candidate.Name, uint(0), &kscale.ScalePrecondition{Size: -1, ResourceVersion: ""}, retryWaitParams, retryWaitParams, corev1.SchemeGroupVersion.WithResource("replicationcontrollers"), false); err != nil {
fmt.Fprintf(d.errOut, "error: Couldn't scale down prior deployment %s: %v\n", appsutil.LabelForDeployment(candidate), err)
} else {
fmt.Fprintf(d.out, "--> Scaled older deployment %s down\n", candidate.Name)
Expand Down
4 changes: 2 additions & 2 deletions pkg/cli/deployer/deployer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -234,11 +234,11 @@ type ScaleEvent struct {
Size uint
}

func (t *FakeScaler) Scale(namespace, name string, newSize uint, preconditions *kscale.ScalePrecondition, retry, wait *kscale.RetryParams, resource schema.GroupVersionResource) error {
func (t *FakeScaler) Scale(namespace, name string, newSize uint, preconditions *kscale.ScalePrecondition, retry, wait *kscale.RetryParams, resource schema.GroupVersionResource, dryRun bool) error {
t.Events = append(t.Events, ScaleEvent{name, newSize})
return nil
}

func (t *FakeScaler) ScaleSimple(namespace, name string, preconditions *kscale.ScalePrecondition, newSize uint, resource schema.GroupVersionResource) (string, error) {
func (t *FakeScaler) ScaleSimple(namespace, name string, preconditions *kscale.ScalePrecondition, newSize uint, resource schema.GroupVersionResource, dryRun bool) (string, error) {
return "", fmt.Errorf("unexpected call to ScaleSimple")
}
2 changes: 1 addition & 1 deletion pkg/cli/deployer/strategy/rolling/rolling_updater.go
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ func (r *RollingUpdater) scaleDown(newRc, oldRc *corev1.ReplicationController, d
// scalerScaleAndWait scales a controller using a Scaler and a real client.
func (r *RollingUpdater) scaleAndWaitWithScaler(rc *corev1.ReplicationController, retry, wait *kscale.RetryParams) (*corev1.ReplicationController, error) {
scaler := kscale.NewScaler(r.scaleClient)
if err := scaler.Scale(rc.Namespace, rc.Name, uint(*rc.Spec.Replicas), &kscale.ScalePrecondition{Size: -1}, retry, wait, corev1.SchemeGroupVersion.WithResource("replicationcontrollers")); err != nil {
if err := scaler.Scale(rc.Namespace, rc.Name, uint(*rc.Spec.Replicas), &kscale.ScalePrecondition{Size: -1}, retry, wait, corev1.SchemeGroupVersion.WithResource("replicationcontrollers"), false); err != nil {
return nil, err
}
return r.rcClient.ReplicationControllers(rc.Namespace).Get(context.TODO(), rc.Name, metav1.GetOptions{})
Expand Down
2 changes: 1 addition & 1 deletion pkg/cli/idle/idle.go
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ func (o *IdleOptions) calculateIdlableAnnotationsByService(infoVisitor func(reso
}

var controller runtime.Object
controller, err = helper.Get(ref.namespace, ref.Name, false)
controller, err = helper.Get(ref.namespace, ref.Name)
if err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/cli/image/manifest/dockercredentials/credentials.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func NewLocal() auth.CredentialStore {
// NewFromFile creates a new credential store for the provided Docker config.json
// authentication file.
func NewFromFile(path string) (auth.CredentialStore, error) {
cfg, err := credentialprovider.ReadSpecificDockerConfigJsonFile(path)
cfg, err := credentialprovider.ReadSpecificDockerConfigJSONFile(path)
if err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/cli/observe/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ type restListWatcher struct {

func (lw restListWatcher) List(opt metav1.ListOptions) (runtime.Object, error) {
opt.LabelSelector = lw.selector
return lw.Helper.List(lw.namespace, "", false, &opt)
return lw.Helper.List(lw.namespace, "", &opt)
}

func (lw restListWatcher) Watch(opt metav1.ListOptions) (watch.Interface, error) {
Expand Down

0 comments on commit 046539b

Please sign in to comment.