Skip to content

Commit

Permalink
Merge pull request #18517 from DirectXMan12/feature/migrate-oapi-hpa
Browse files Browse the repository at this point in the history
Automatic merge from submit-queue (batch tested with PRs 18666, 18810, 18430, 18517, 18653).

Add migrate command for legacy HPAs

There are current broken HPAs floating around that either use the legacy
oapi DeploymentConfig defintion (`v1.DeploymentConfig`) or the incorrect
API group, due to the webconsole (all scalables, but with the group as
`extensions/v1beta1`).  This introduces a migrate command that corrects
the ScaleTargetRef of those HPAs to have correct API groups that are
usable by generic scale clients.

Related to #18377, #18380, openshift/origin-web-console#2776

cc @deads2k @liggitt @spadgett
  • Loading branch information
openshift-merge-robot authored Mar 6, 2018
2 parents 0a8f794 + da442d5 commit f2c2c9c
Show file tree
Hide file tree
Showing 9 changed files with 495 additions and 0 deletions.
86 changes: 86 additions & 0 deletions contrib/completions/bash/oc

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

86 changes: 86 additions & 0 deletions contrib/completions/zsh/oc

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions docs/man/man1/.files_generated_oc

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions docs/man/man1/oc-adm-migrate-legacy-hpa.1

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions pkg/oc/admin/admin.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import (
migrateauthorization "github.com/openshift/origin/pkg/oc/admin/migrate/authorization"
migrateetcd "github.com/openshift/origin/pkg/oc/admin/migrate/etcd"
migrateimages "github.com/openshift/origin/pkg/oc/admin/migrate/images"
migratehpa "github.com/openshift/origin/pkg/oc/admin/migrate/legacyhpa"
migratestorage "github.com/openshift/origin/pkg/oc/admin/migrate/storage"
"github.com/openshift/origin/pkg/oc/admin/network"
"github.com/openshift/origin/pkg/oc/admin/node"
Expand Down Expand Up @@ -97,6 +98,7 @@ func NewCommandAdmin(name, fullName string, in io.Reader, out io.Writer, errout
migratestorage.NewCmdMigrateAPIStorage("storage", fullName+" "+migrate.MigrateRecommendedName+" storage", f, in, out, errout),
migrateauthorization.NewCmdMigrateAuthorization("authorization", fullName+" "+migrate.MigrateRecommendedName+" authorization", f, in, out, errout),
migrateetcd.NewCmdMigrateTTLs("etcd-ttl", fullName+" "+migrate.MigrateRecommendedName+" etcd-ttl", f, in, out, errout),
migratehpa.NewCmdMigrateLegacyHPA("legacy-hpa", fullName+" "+migrate.MigrateRecommendedName+" legacy-hpa", f, in, out, errout),
),
top.NewCommandTop(top.TopRecommendedName, fullName+" "+top.TopRecommendedName, f, out, errout),
image.NewCmdVerifyImageSignature(name, fullName+" "+image.VerifyRecommendedName, f, out, errout),
Expand Down
Loading

0 comments on commit f2c2c9c

Please sign in to comment.