Skip to content

Commit b341d39

Browse files
Add a migration framework for mutable resources
Implement a migration framework and an image reference migrator: oadm migrate image-references registry1.com/*=registry2.com/* --confirm Reuse resource builder to manage output
1 parent 7651cc5 commit b341d39

File tree

17 files changed

+1363
-6
lines changed

17 files changed

+1363
-6
lines changed

contrib/completions/bash/oadm

+95
Original file line numberDiff line numberDiff line change
@@ -1921,6 +1921,100 @@ _oadm_prune()
19211921
must_have_one_noun=()
19221922
}
19231923

1924+
_oadm_migrate_image-references()
1925+
{
1926+
last_command="oadm_migrate_image-references"
1927+
commands=()
1928+
1929+
flags=()
1930+
two_word_flags=()
1931+
flags_with_completion=()
1932+
flags_completion=()
1933+
1934+
flags+=("--all-namespaces")
1935+
flags+=("--confirm")
1936+
flags+=("--filename=")
1937+
flags_with_completion+=("--filename")
1938+
flags_completion+=("__handle_filename_extension_flag json|yaml|yml")
1939+
two_word_flags+=("-f")
1940+
flags_with_completion+=("-f")
1941+
flags_completion+=("__handle_filename_extension_flag json|yaml|yml")
1942+
flags+=("--include=")
1943+
flags+=("--output=")
1944+
two_word_flags+=("-o")
1945+
flags+=("--api-version=")
1946+
flags+=("--as=")
1947+
flags+=("--certificate-authority=")
1948+
flags_with_completion+=("--certificate-authority")
1949+
flags_completion+=("_filedir")
1950+
flags+=("--client-certificate=")
1951+
flags_with_completion+=("--client-certificate")
1952+
flags_completion+=("_filedir")
1953+
flags+=("--client-key=")
1954+
flags_with_completion+=("--client-key")
1955+
flags_completion+=("_filedir")
1956+
flags+=("--cluster=")
1957+
flags+=("--config=")
1958+
flags_with_completion+=("--config")
1959+
flags_completion+=("_filedir")
1960+
flags+=("--context=")
1961+
flags+=("--google-json-key=")
1962+
flags+=("--insecure-skip-tls-verify")
1963+
flags+=("--log-flush-frequency=")
1964+
flags+=("--match-server-version")
1965+
flags+=("--namespace=")
1966+
two_word_flags+=("-n")
1967+
flags+=("--server=")
1968+
flags+=("--token=")
1969+
flags+=("--user=")
1970+
1971+
must_have_one_flag=()
1972+
must_have_one_flag+=("--filename=")
1973+
must_have_one_flag+=("-f")
1974+
must_have_one_noun=()
1975+
}
1976+
1977+
_oadm_migrate()
1978+
{
1979+
last_command="oadm_migrate"
1980+
commands=()
1981+
commands+=("image-references")
1982+
1983+
flags=()
1984+
two_word_flags=()
1985+
flags_with_completion=()
1986+
flags_completion=()
1987+
1988+
flags+=("--api-version=")
1989+
flags+=("--as=")
1990+
flags+=("--certificate-authority=")
1991+
flags_with_completion+=("--certificate-authority")
1992+
flags_completion+=("_filedir")
1993+
flags+=("--client-certificate=")
1994+
flags_with_completion+=("--client-certificate")
1995+
flags_completion+=("_filedir")
1996+
flags+=("--client-key=")
1997+
flags_with_completion+=("--client-key")
1998+
flags_completion+=("_filedir")
1999+
flags+=("--cluster=")
2000+
flags+=("--config=")
2001+
flags_with_completion+=("--config")
2002+
flags_completion+=("_filedir")
2003+
flags+=("--context=")
2004+
flags+=("--google-json-key=")
2005+
flags+=("--insecure-skip-tls-verify")
2006+
flags+=("--log-flush-frequency=")
2007+
flags+=("--match-server-version")
2008+
flags+=("--namespace=")
2009+
two_word_flags+=("-n")
2010+
flags+=("--server=")
2011+
flags+=("--token=")
2012+
flags+=("--user=")
2013+
2014+
must_have_one_flag=()
2015+
must_have_one_noun=()
2016+
}
2017+
19242018
_oadm_config_view()
19252019
{
19262020
last_command="oadm_config_view"
@@ -3262,6 +3356,7 @@ _oadm()
32623356
commands+=("diagnostics")
32633357
commands+=("manage-node")
32643358
commands+=("prune")
3359+
commands+=("migrate")
32653360
commands+=("config")
32663361
commands+=("create-kubeconfig")
32673362
commands+=("create-api-client-config")

contrib/completions/bash/oc

+95
Original file line numberDiff line numberDiff line change
@@ -5084,6 +5084,100 @@ _oc_adm_prune()
50845084
must_have_one_noun=()
50855085
}
50865086

5087+
_oc_adm_migrate_image-references()
5088+
{
5089+
last_command="oc_adm_migrate_image-references"
5090+
commands=()
5091+
5092+
flags=()
5093+
two_word_flags=()
5094+
flags_with_completion=()
5095+
flags_completion=()
5096+
5097+
flags+=("--all-namespaces")
5098+
flags+=("--confirm")
5099+
flags+=("--filename=")
5100+
flags_with_completion+=("--filename")
5101+
flags_completion+=("__handle_filename_extension_flag json|yaml|yml")
5102+
two_word_flags+=("-f")
5103+
flags_with_completion+=("-f")
5104+
flags_completion+=("__handle_filename_extension_flag json|yaml|yml")
5105+
flags+=("--include=")
5106+
flags+=("--output=")
5107+
two_word_flags+=("-o")
5108+
flags+=("--api-version=")
5109+
flags+=("--as=")
5110+
flags+=("--certificate-authority=")
5111+
flags_with_completion+=("--certificate-authority")
5112+
flags_completion+=("_filedir")
5113+
flags+=("--client-certificate=")
5114+
flags_with_completion+=("--client-certificate")
5115+
flags_completion+=("_filedir")
5116+
flags+=("--client-key=")
5117+
flags_with_completion+=("--client-key")
5118+
flags_completion+=("_filedir")
5119+
flags+=("--cluster=")
5120+
flags+=("--config=")
5121+
flags_with_completion+=("--config")
5122+
flags_completion+=("_filedir")
5123+
flags+=("--context=")
5124+
flags+=("--google-json-key=")
5125+
flags+=("--insecure-skip-tls-verify")
5126+
flags+=("--log-flush-frequency=")
5127+
flags+=("--match-server-version")
5128+
flags+=("--namespace=")
5129+
two_word_flags+=("-n")
5130+
flags+=("--server=")
5131+
flags+=("--token=")
5132+
flags+=("--user=")
5133+
5134+
must_have_one_flag=()
5135+
must_have_one_flag+=("--filename=")
5136+
must_have_one_flag+=("-f")
5137+
must_have_one_noun=()
5138+
}
5139+
5140+
_oc_adm_migrate()
5141+
{
5142+
last_command="oc_adm_migrate"
5143+
commands=()
5144+
commands+=("image-references")
5145+
5146+
flags=()
5147+
two_word_flags=()
5148+
flags_with_completion=()
5149+
flags_completion=()
5150+
5151+
flags+=("--api-version=")
5152+
flags+=("--as=")
5153+
flags+=("--certificate-authority=")
5154+
flags_with_completion+=("--certificate-authority")
5155+
flags_completion+=("_filedir")
5156+
flags+=("--client-certificate=")
5157+
flags_with_completion+=("--client-certificate")
5158+
flags_completion+=("_filedir")
5159+
flags+=("--client-key=")
5160+
flags_with_completion+=("--client-key")
5161+
flags_completion+=("_filedir")
5162+
flags+=("--cluster=")
5163+
flags+=("--config=")
5164+
flags_with_completion+=("--config")
5165+
flags_completion+=("_filedir")
5166+
flags+=("--context=")
5167+
flags+=("--google-json-key=")
5168+
flags+=("--insecure-skip-tls-verify")
5169+
flags+=("--log-flush-frequency=")
5170+
flags+=("--match-server-version")
5171+
flags+=("--namespace=")
5172+
two_word_flags+=("-n")
5173+
flags+=("--server=")
5174+
flags+=("--token=")
5175+
flags+=("--user=")
5176+
5177+
must_have_one_flag=()
5178+
must_have_one_noun=()
5179+
}
5180+
50875181
_oc_adm_config_view()
50885182
{
50895183
last_command="oc_adm_config_view"
@@ -6425,6 +6519,7 @@ _oc_adm()
64256519
commands+=("diagnostics")
64266520
commands+=("manage-node")
64276521
commands+=("prune")
6522+
commands+=("migrate")
64286523
commands+=("config")
64296524
commands+=("create-kubeconfig")
64306525
commands+=("create-api-client-config")

0 commit comments

Comments
 (0)