Skip to content

Commit f2c2c9c

Browse files
Merge pull request #18517 from DirectXMan12/feature/migrate-oapi-hpa
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
2 parents 0a8f794 + da442d5 commit f2c2c9c

File tree

9 files changed

+495
-0
lines changed

9 files changed

+495
-0
lines changed

contrib/completions/bash/oc

Lines changed: 86 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

contrib/completions/zsh/oc

Lines changed: 86 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/man/man1/.files_generated_oc

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/man/man1/oc-adm-migrate-legacy-hpa.1

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/oc/admin/admin.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import (
2121
migrateauthorization "github.com/openshift/origin/pkg/oc/admin/migrate/authorization"
2222
migrateetcd "github.com/openshift/origin/pkg/oc/admin/migrate/etcd"
2323
migrateimages "github.com/openshift/origin/pkg/oc/admin/migrate/images"
24+
migratehpa "github.com/openshift/origin/pkg/oc/admin/migrate/legacyhpa"
2425
migratestorage "github.com/openshift/origin/pkg/oc/admin/migrate/storage"
2526
"github.com/openshift/origin/pkg/oc/admin/network"
2627
"github.com/openshift/origin/pkg/oc/admin/node"
@@ -97,6 +98,7 @@ func NewCommandAdmin(name, fullName string, in io.Reader, out io.Writer, errout
9798
migratestorage.NewCmdMigrateAPIStorage("storage", fullName+" "+migrate.MigrateRecommendedName+" storage", f, in, out, errout),
9899
migrateauthorization.NewCmdMigrateAuthorization("authorization", fullName+" "+migrate.MigrateRecommendedName+" authorization", f, in, out, errout),
99100
migrateetcd.NewCmdMigrateTTLs("etcd-ttl", fullName+" "+migrate.MigrateRecommendedName+" etcd-ttl", f, in, out, errout),
101+
migratehpa.NewCmdMigrateLegacyHPA("legacy-hpa", fullName+" "+migrate.MigrateRecommendedName+" legacy-hpa", f, in, out, errout),
100102
),
101103
top.NewCommandTop(top.TopRecommendedName, fullName+" "+top.TopRecommendedName, f, out, errout),
102104
image.NewCmdVerifyImageSignature(name, fullName+" "+image.VerifyRecommendedName, f, out, errout),

0 commit comments

Comments
 (0)