Skip to content

Commit

Permalink
Merge pull request #15618 from fabianofranz/release-3.6
Browse files Browse the repository at this point in the history
Automatic merge from submit-queue

Disable RBAC create commands

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1476166

For the **release-3.6 branch**.

Disables `oc create clusterrole|clusterrolebinding|role|rolebinding` until we allow users to control Kube RBAC objects (3.7).
  • Loading branch information
openshift-merge-robot authored Sep 2, 2017
2 parents 07ac16f + 936e0b9 commit 42b4710
Show file tree
Hide file tree
Showing 15 changed files with 8 additions and 1,392 deletions.
336 changes: 0 additions & 336 deletions contrib/completions/bash/oc
Original file line number Diff line number Diff line change
Expand Up @@ -7550,171 +7550,6 @@ _oc_create_clusterresourcequota()
noun_aliases=()
}

_oc_create_clusterrole()
{
last_command="oc_create_clusterrole"
commands=()

flags=()
two_word_flags=()
local_nonpersistent_flags=()
flags_with_completion=()
flags_completion=()

flags+=("--allow-missing-template-keys")
local_nonpersistent_flags+=("--allow-missing-template-keys")
flags+=("--dry-run")
local_nonpersistent_flags+=("--dry-run")
flags+=("--no-headers")
local_nonpersistent_flags+=("--no-headers")
flags+=("--output=")
two_word_flags+=("-o")
local_nonpersistent_flags+=("--output=")
flags+=("--resource=")
local_nonpersistent_flags+=("--resource=")
flags+=("--resource-name=")
local_nonpersistent_flags+=("--resource-name=")
flags+=("--save-config")
local_nonpersistent_flags+=("--save-config")
flags+=("--schema-cache-dir=")
flags_with_completion+=("--schema-cache-dir")
flags_completion+=("_filedir")
local_nonpersistent_flags+=("--schema-cache-dir=")
flags+=("--show-all")
flags+=("-a")
local_nonpersistent_flags+=("--show-all")
flags+=("--show-labels")
local_nonpersistent_flags+=("--show-labels")
flags+=("--sort-by=")
local_nonpersistent_flags+=("--sort-by=")
flags+=("--template=")
flags_with_completion+=("--template")
flags_completion+=("_filedir")
local_nonpersistent_flags+=("--template=")
flags+=("--validate")
local_nonpersistent_flags+=("--validate")
flags+=("--verb=")
local_nonpersistent_flags+=("--verb=")
flags+=("--as=")
flags+=("--certificate-authority=")
flags_with_completion+=("--certificate-authority")
flags_completion+=("_filedir")
flags+=("--client-certificate=")
flags_with_completion+=("--client-certificate")
flags_completion+=("_filedir")
flags+=("--client-key=")
flags_with_completion+=("--client-key")
flags_completion+=("_filedir")
flags+=("--cluster=")
flags+=("--config=")
flags_with_completion+=("--config")
flags_completion+=("_filedir")
flags+=("--context=")
flags+=("--insecure-skip-tls-verify")
flags+=("--log-flush-frequency=")
flags+=("--loglevel=")
flags+=("--logspec=")
flags+=("--match-server-version")
flags+=("--namespace=")
flags_with_completion+=("--namespace")
flags_completion+=("__oc_get_namespaces")
two_word_flags+=("-n")
flags_with_completion+=("-n")
flags_completion+=("__oc_get_namespaces")
flags+=("--request-timeout=")
flags+=("--server=")
flags+=("--token=")
flags+=("--user=")

must_have_one_flag=()
must_have_one_noun=()
noun_aliases=()
}

_oc_create_clusterrolebinding()
{
last_command="oc_create_clusterrolebinding"
commands=()

flags=()
two_word_flags=()
local_nonpersistent_flags=()
flags_with_completion=()
flags_completion=()

flags+=("--allow-missing-template-keys")
local_nonpersistent_flags+=("--allow-missing-template-keys")
flags+=("--clusterrole=")
local_nonpersistent_flags+=("--clusterrole=")
flags+=("--dry-run")
local_nonpersistent_flags+=("--dry-run")
flags+=("--generator=")
local_nonpersistent_flags+=("--generator=")
flags+=("--group=")
local_nonpersistent_flags+=("--group=")
flags+=("--no-headers")
local_nonpersistent_flags+=("--no-headers")
flags+=("--output=")
two_word_flags+=("-o")
local_nonpersistent_flags+=("--output=")
flags+=("--save-config")
local_nonpersistent_flags+=("--save-config")
flags+=("--schema-cache-dir=")
flags_with_completion+=("--schema-cache-dir")
flags_completion+=("_filedir")
local_nonpersistent_flags+=("--schema-cache-dir=")
flags+=("--serviceaccount=")
local_nonpersistent_flags+=("--serviceaccount=")
flags+=("--show-all")
flags+=("-a")
local_nonpersistent_flags+=("--show-all")
flags+=("--show-labels")
local_nonpersistent_flags+=("--show-labels")
flags+=("--sort-by=")
local_nonpersistent_flags+=("--sort-by=")
flags+=("--template=")
flags_with_completion+=("--template")
flags_completion+=("_filedir")
local_nonpersistent_flags+=("--template=")
flags+=("--user=")
local_nonpersistent_flags+=("--user=")
flags+=("--validate")
local_nonpersistent_flags+=("--validate")
flags+=("--as=")
flags+=("--certificate-authority=")
flags_with_completion+=("--certificate-authority")
flags_completion+=("_filedir")
flags+=("--client-certificate=")
flags_with_completion+=("--client-certificate")
flags_completion+=("_filedir")
flags+=("--client-key=")
flags_with_completion+=("--client-key")
flags_completion+=("_filedir")
flags+=("--cluster=")
flags+=("--config=")
flags_with_completion+=("--config")
flags_completion+=("_filedir")
flags+=("--context=")
flags+=("--insecure-skip-tls-verify")
flags+=("--log-flush-frequency=")
flags+=("--loglevel=")
flags+=("--logspec=")
flags+=("--match-server-version")
flags+=("--namespace=")
flags_with_completion+=("--namespace")
flags_completion+=("__oc_get_namespaces")
two_word_flags+=("-n")
flags_with_completion+=("-n")
flags_completion+=("__oc_get_namespaces")
flags+=("--request-timeout=")
flags+=("--server=")
flags+=("--token=")

must_have_one_flag=()
must_have_one_noun=()
noun_aliases=()
}

_oc_create_configmap()
{
last_command="oc_create_configmap"
Expand Down Expand Up @@ -8371,173 +8206,6 @@ _oc_create_quota()
noun_aliases=()
}

_oc_create_role()
{
last_command="oc_create_role"
commands=()

flags=()
two_word_flags=()
local_nonpersistent_flags=()
flags_with_completion=()
flags_completion=()

flags+=("--allow-missing-template-keys")
local_nonpersistent_flags+=("--allow-missing-template-keys")
flags+=("--dry-run")
local_nonpersistent_flags+=("--dry-run")
flags+=("--no-headers")
local_nonpersistent_flags+=("--no-headers")
flags+=("--output=")
two_word_flags+=("-o")
local_nonpersistent_flags+=("--output=")
flags+=("--resource=")
local_nonpersistent_flags+=("--resource=")
flags+=("--resource-name=")
local_nonpersistent_flags+=("--resource-name=")
flags+=("--save-config")
local_nonpersistent_flags+=("--save-config")
flags+=("--schema-cache-dir=")
flags_with_completion+=("--schema-cache-dir")
flags_completion+=("_filedir")
local_nonpersistent_flags+=("--schema-cache-dir=")
flags+=("--show-all")
flags+=("-a")
local_nonpersistent_flags+=("--show-all")
flags+=("--show-labels")
local_nonpersistent_flags+=("--show-labels")
flags+=("--sort-by=")
local_nonpersistent_flags+=("--sort-by=")
flags+=("--template=")
flags_with_completion+=("--template")
flags_completion+=("_filedir")
local_nonpersistent_flags+=("--template=")
flags+=("--validate")
local_nonpersistent_flags+=("--validate")
flags+=("--verb=")
local_nonpersistent_flags+=("--verb=")
flags+=("--as=")
flags+=("--certificate-authority=")
flags_with_completion+=("--certificate-authority")
flags_completion+=("_filedir")
flags+=("--client-certificate=")
flags_with_completion+=("--client-certificate")
flags_completion+=("_filedir")
flags+=("--client-key=")
flags_with_completion+=("--client-key")
flags_completion+=("_filedir")
flags+=("--cluster=")
flags+=("--config=")
flags_with_completion+=("--config")
flags_completion+=("_filedir")
flags+=("--context=")
flags+=("--insecure-skip-tls-verify")
flags+=("--log-flush-frequency=")
flags+=("--loglevel=")
flags+=("--logspec=")
flags+=("--match-server-version")
flags+=("--namespace=")
flags_with_completion+=("--namespace")
flags_completion+=("__oc_get_namespaces")
two_word_flags+=("-n")
flags_with_completion+=("-n")
flags_completion+=("__oc_get_namespaces")
flags+=("--request-timeout=")
flags+=("--server=")
flags+=("--token=")
flags+=("--user=")

must_have_one_flag=()
must_have_one_noun=()
noun_aliases=()
}

_oc_create_rolebinding()
{
last_command="oc_create_rolebinding"
commands=()

flags=()
two_word_flags=()
local_nonpersistent_flags=()
flags_with_completion=()
flags_completion=()

flags+=("--allow-missing-template-keys")
local_nonpersistent_flags+=("--allow-missing-template-keys")
flags+=("--clusterrole=")
local_nonpersistent_flags+=("--clusterrole=")
flags+=("--dry-run")
local_nonpersistent_flags+=("--dry-run")
flags+=("--generator=")
local_nonpersistent_flags+=("--generator=")
flags+=("--group=")
local_nonpersistent_flags+=("--group=")
flags+=("--no-headers")
local_nonpersistent_flags+=("--no-headers")
flags+=("--output=")
two_word_flags+=("-o")
local_nonpersistent_flags+=("--output=")
flags+=("--role=")
local_nonpersistent_flags+=("--role=")
flags+=("--save-config")
local_nonpersistent_flags+=("--save-config")
flags+=("--schema-cache-dir=")
flags_with_completion+=("--schema-cache-dir")
flags_completion+=("_filedir")
local_nonpersistent_flags+=("--schema-cache-dir=")
flags+=("--serviceaccount=")
local_nonpersistent_flags+=("--serviceaccount=")
flags+=("--show-all")
flags+=("-a")
local_nonpersistent_flags+=("--show-all")
flags+=("--show-labels")
local_nonpersistent_flags+=("--show-labels")
flags+=("--sort-by=")
local_nonpersistent_flags+=("--sort-by=")
flags+=("--template=")
flags_with_completion+=("--template")
flags_completion+=("_filedir")
local_nonpersistent_flags+=("--template=")
flags+=("--user=")
local_nonpersistent_flags+=("--user=")
flags+=("--validate")
local_nonpersistent_flags+=("--validate")
flags+=("--as=")
flags+=("--certificate-authority=")
flags_with_completion+=("--certificate-authority")
flags_completion+=("_filedir")
flags+=("--client-certificate=")
flags_with_completion+=("--client-certificate")
flags_completion+=("_filedir")
flags+=("--client-key=")
flags_with_completion+=("--client-key")
flags_completion+=("_filedir")
flags+=("--cluster=")
flags+=("--config=")
flags_with_completion+=("--config")
flags_completion+=("_filedir")
flags+=("--context=")
flags+=("--insecure-skip-tls-verify")
flags+=("--log-flush-frequency=")
flags+=("--loglevel=")
flags+=("--logspec=")
flags+=("--match-server-version")
flags+=("--namespace=")
flags_with_completion+=("--namespace")
flags_completion+=("__oc_get_namespaces")
two_word_flags+=("-n")
flags_with_completion+=("-n")
flags_completion+=("__oc_get_namespaces")
flags+=("--request-timeout=")
flags+=("--server=")
flags+=("--token=")

must_have_one_flag=()
must_have_one_noun=()
noun_aliases=()
}

_oc_create_route_edge()
{
last_command="oc_create_route_edge"
Expand Down Expand Up @@ -9766,8 +9434,6 @@ _oc_create()
last_command="oc_create"
commands=()
commands+=("clusterresourcequota")
commands+=("clusterrole")
commands+=("clusterrolebinding")
commands+=("configmap")
commands+=("deployment")
commands+=("deploymentconfig")
Expand All @@ -9777,8 +9443,6 @@ _oc_create()
commands+=("poddisruptionbudget")
commands+=("policybinding")
commands+=("quota")
commands+=("role")
commands+=("rolebinding")
commands+=("route")
commands+=("secret")
commands+=("service")
Expand Down
Loading

0 comments on commit 42b4710

Please sign in to comment.