diff options
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 |