diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-21 15:06:40 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-21 15:06:40 +0300 |
commit | 0a6ffb540e569bd7a7c548d59b12bc55d4bf9cf1 (patch) | |
tree | 9ff7dd7b21a3f9642a8fbb45c922f71a433faf02 /lib/gitlab/kubernetes | |
parent | a048261403ea7e12992ccffe704f0779235712d7 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/kubernetes')
-rw-r--r-- | lib/gitlab/kubernetes/kubectl_cmd.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/gitlab/kubernetes/kubectl_cmd.rb b/lib/gitlab/kubernetes/kubectl_cmd.rb index 981eb5681dc..e8fde28b44d 100644 --- a/lib/gitlab/kubernetes/kubectl_cmd.rb +++ b/lib/gitlab/kubernetes/kubectl_cmd.rb @@ -13,6 +13,16 @@ module Gitlab %w(kubectl apply -f).concat([filename], args).shelljoin end + + def delete_crds_from_group(group) + api_resources_args = %w(-o name --api-group).push(group) + + api_resources(*api_resources_args) + " | xargs " + delete('--ignore-not-found', 'crd') + end + + def api_resources(*args) + %w(kubectl api-resources).concat(args).shelljoin + end end end end |