diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2019-07-31 11:58:39 +0000 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2019-07-31 11:58:39 +0000 |
commit | 252a0b0faa07160214e46e696cbfb0761e6f2a3d (patch) | |
tree | 501c8158265b7744867d91bdd7556e81fa812ca2 /app/models/clusters/applications/prometheus.rb | |
parent | fff0fc7b4c2475a432fd4e1b025be66f9f5ba519 (diff) | |
parent | d7c7ebf50a0c1c52d04ecaab78c652f7786423ed (diff) | |
download | gitlab-ce-252a0b0faa07160214e46e696cbfb0761e6f2a3d.tar.gz |
Merge branch '60668-kubernetes-applications-uninstall-knative' into 'master'
Resolve "Kubernetes > Applications > Uninstall Knative"
See merge request gitlab-org/gitlab-ce!30458
Diffstat (limited to 'app/models/clusters/applications/prometheus.rb')
-rw-r--r-- | app/models/clusters/applications/prometheus.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/app/models/clusters/applications/prometheus.rb b/app/models/clusters/applications/prometheus.rb index 805c8a73f8c..f5375d29f3a 100644 --- a/app/models/clusters/applications/prometheus.rb +++ b/app/models/clusters/applications/prometheus.rb @@ -59,6 +59,15 @@ module Clusters ) end + def uninstall_command + Gitlab::Kubernetes::Helm::DeleteCommand.new( + name: name, + rbac: cluster.platform_kubernetes_rbac?, + files: files, + predelete: delete_knative_istio_metrics.to_a + ) + end + # Returns a copy of files where the values of 'values.yaml' # are replaced by the argument. # @@ -97,6 +106,10 @@ module Clusters def install_knative_metrics ["kubectl apply -f #{Clusters::Applications::Knative::METRICS_CONFIG}"] if cluster.application_knative_available? end + + def delete_knative_istio_metrics + ["kubectl delete -f #{Clusters::Applications::Knative::METRICS_CONFIG}"] if cluster.application_knative_available? + end end end end |