Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-11-21 15:06:40 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-11-21 15:06:40 +0300
commit0a6ffb540e569bd7a7c548d59b12bc55d4bf9cf1 (patch)
tree9ff7dd7b21a3f9642a8fbb45c922f71a433faf02 /lib/gitlab/kubernetes
parenta048261403ea7e12992ccffe704f0779235712d7 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/kubernetes')
-rw-r--r--lib/gitlab/kubernetes/kubectl_cmd.rb10
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