Add command "kubectl replace". "kubectl update" is still supported as an alias.

"kubectl replace --patch" is NOT supported. It's moved to "kubectl patch" as a separate command in another commit.
This commit is contained in:
Chao Xu
2015-06-26 21:25:08 -07:00
parent ad12c98e6d
commit 9b3d42c090
16 changed files with 101 additions and 189 deletions

View File

@@ -321,9 +321,9 @@ _kubectl_create()
must_have_one_noun=()
}
_kubectl_update()
_kubectl_replace()
{
last_command="kubectl_update"
last_command="kubectl_replace"
commands=()
flags=()
@@ -342,13 +342,11 @@ _kubectl_update()
flags+=("--grace-period=")
flags+=("--help")
flags+=("-h")
flags+=("--patch=")
flags+=("--timeout=")
must_have_one_flag=()
must_have_one_flag+=("--filename=")
must_have_one_flag+=("-f")
must_have_one_flag+=("--patch=")
must_have_one_noun=()
}
@@ -906,7 +904,7 @@ _kubectl()
commands+=("get")
commands+=("describe")
commands+=("create")
commands+=("update")
commands+=("replace")
commands+=("delete")
commands+=("namespace")
commands+=("logs")