diff options
-rw-r--r-- | app/assets/javascripts/clusters/components/uninstall_application_confirmation_modal.vue | 13 | ||||
-rw-r--r-- | app/models/clusters/applications/helm.rb | 7 | ||||
-rw-r--r-- | changelogs/unreleased/9102-update-hide-dismissed-param.yml | 5 | ||||
-rw-r--r-- | doc/subscriptions/index.md | 3 | ||||
-rw-r--r-- | lib/gitlab/kubernetes/helm/reset_command.rb | 9 | ||||
-rw-r--r-- | lib/gitlab/kubernetes/kube_client.rb | 1 | ||||
-rw-r--r-- | locale/gitlab.pot | 2 | ||||
-rw-r--r-- | package.json | 2 | ||||
-rw-r--r-- | spec/lib/gitlab/kubernetes/helm/reset_command_spec.rb | 2 | ||||
-rw-r--r-- | spec/lib/gitlab/kubernetes/kube_client_spec.rb | 1 | ||||
-rw-r--r-- | spec/models/clusters/applications/helm_spec.rb | 10 | ||||
-rw-r--r-- | yarn.lock | 8 |
12 files changed, 53 insertions, 10 deletions
diff --git a/app/assets/javascripts/clusters/components/uninstall_application_confirmation_modal.vue b/app/assets/javascripts/clusters/components/uninstall_application_confirmation_modal.vue index 4f60e543666..f1925c243f2 100644 --- a/app/assets/javascripts/clusters/components/uninstall_application_confirmation_modal.vue +++ b/app/assets/javascripts/clusters/components/uninstall_application_confirmation_modal.vue @@ -5,8 +5,14 @@ import trackUninstallButtonClickMixin from 'ee_else_ce/clusters/mixins/track_uni import { HELM, INGRESS, CERT_MANAGER, PROMETHEUS, RUNNER, KNATIVE, JUPYTER } from '../constants'; const CUSTOM_APP_WARNING_TEXT = { - [HELM]: s__( - 'ClusterIntegration|The associated Tiller pod will be deleted and cannot be restored.', + [HELM]: sprintf( + s__( + 'ClusterIntegration|The associated Tiller pod, the %{gitlabManagedAppsNamespace} namespace, and all of its resources will be deleted and cannot be restored.', + ), + { + gitlabManagedAppsNamespace: '<code>gitlab-managed-apps</code>', + }, + false, ), [INGRESS]: s__( 'ClusterIntegration|The associated load balancer and IP will be deleted and cannot be restored.', @@ -76,6 +82,7 @@ export default { :modal-id="modalId" :title="title" @ok="confirmUninstall()" - >{{ warningText }} {{ customAppWarningText }}</gl-modal > + {{ warningText }} <span v-html="customAppWarningText"></span> + </gl-modal> </template> diff --git a/app/models/clusters/applications/helm.rb b/app/models/clusters/applications/helm.rb index 261f6ce8987..4a1bcac4bb7 100644 --- a/app/models/clusters/applications/helm.rb +++ b/app/models/clusters/applications/helm.rb @@ -68,6 +68,13 @@ module Clusters ca_key.present? && ca_cert.present? end + def post_uninstall + cluster.kubeclient.delete_namespace(Gitlab::Kubernetes::Helm::NAMESPACE) + rescue Kubeclient::ResourceNotFoundError + # we actually don't care if the namespace is not present + # since we want to delete it anyway. + end + private def files diff --git a/changelogs/unreleased/9102-update-hide-dismissed-param.yml b/changelogs/unreleased/9102-update-hide-dismissed-param.yml new file mode 100644 index 00000000000..0bc2146b0c1 --- /dev/null +++ b/changelogs/unreleased/9102-update-hide-dismissed-param.yml @@ -0,0 +1,5 @@ +--- +title: Use scope param instead of hide_dismissed +merge_request: 16834 +author: +type: changed diff --git a/doc/subscriptions/index.md b/doc/subscriptions/index.md index 950850536e9..bc6baa1b1fc 100644 --- a/doc/subscriptions/index.md +++ b/doc/subscriptions/index.md @@ -247,6 +247,9 @@ In order to purchase additional minutes, you should follow these steps: ![Additional minutes](img/additional_minutes.png) + The **Additional minutes** displayed now includes the purchased additional CI minutes, plus any + minutes rolled over from last month. + Be aware that: 1. If you have purchased extra CI minutes before the purchase of a paid plan, diff --git a/lib/gitlab/kubernetes/helm/reset_command.rb b/lib/gitlab/kubernetes/helm/reset_command.rb index c8349639ec3..13176360227 100644 --- a/lib/gitlab/kubernetes/helm/reset_command.rb +++ b/lib/gitlab/kubernetes/helm/reset_command.rb @@ -18,7 +18,8 @@ module Gitlab def generate_script super + [ reset_helm_command, - delete_tiller_replicaset + delete_tiller_replicaset, + delete_tiller_clusterrolebinding ].join("\n") end @@ -43,6 +44,12 @@ module Gitlab Gitlab::Kubernetes::KubectlCmd.delete(*delete_args) end + def delete_tiller_clusterrolebinding + delete_args = %w[clusterrolebinding tiller-admin] + + Gitlab::Kubernetes::KubectlCmd.delete(*delete_args) + end + def reset_helm_command command = %w[helm reset] + optional_tls_flags diff --git a/lib/gitlab/kubernetes/kube_client.rb b/lib/gitlab/kubernetes/kube_client.rb index 64317225ec6..aadbc35d499 100644 --- a/lib/gitlab/kubernetes/kube_client.rb +++ b/lib/gitlab/kubernetes/kube_client.rb @@ -39,6 +39,7 @@ module Gitlab :get_secret, :get_service, :get_service_account, + :delete_namespace, :delete_pod, :create_config_map, :create_namespace, diff --git a/locale/gitlab.pot b/locale/gitlab.pot index dd3c2d96d7f..0ec169a081b 100644 --- a/locale/gitlab.pot +++ b/locale/gitlab.pot @@ -3703,7 +3703,7 @@ msgstr "" msgid "ClusterIntegration|The associated IP and all deployed services will be deleted and cannot be restored. Uninstalling Knative will also remove Istio from your cluster. This will not effect any other applications." msgstr "" -msgid "ClusterIntegration|The associated Tiller pod will be deleted and cannot be restored." +msgid "ClusterIntegration|The associated Tiller pod, the %{gitlabManagedAppsNamespace} namespace, and all of its resources will be deleted and cannot be restored." msgstr "" msgid "ClusterIntegration|The associated load balancer and IP will be deleted and cannot be restored." diff --git a/package.json b/package.json index 9e1ea86b692..c68c442956d 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "@babel/preset-env": "^7.5.5", "@gitlab/svgs": "^1.74.0", "@gitlab/ui": "5.26.0", - "@gitlab/visual-review-tools": "1.0.2", + "@gitlab/visual-review-tools": "1.0.3", "apollo-cache-inmemory": "^1.5.1", "apollo-client": "^2.5.1", "apollo-link": "^1.2.11", diff --git a/spec/lib/gitlab/kubernetes/helm/reset_command_spec.rb b/spec/lib/gitlab/kubernetes/helm/reset_command_spec.rb index d49d4779735..2a89b04723d 100644 --- a/spec/lib/gitlab/kubernetes/helm/reset_command_spec.rb +++ b/spec/lib/gitlab/kubernetes/helm/reset_command_spec.rb @@ -15,6 +15,7 @@ describe Gitlab::Kubernetes::Helm::ResetCommand do <<~EOS helm reset kubectl delete replicaset -n gitlab-managed-apps -l name\\=tiller + kubectl delete clusterrolebinding tiller-admin EOS end end @@ -32,6 +33,7 @@ describe Gitlab::Kubernetes::Helm::ResetCommand do --tls-key /data/helm/helm/config/key.pem EOS1 kubectl delete replicaset -n gitlab-managed-apps -l name\\=tiller + kubectl delete clusterrolebinding tiller-admin EOS2 end end diff --git a/spec/lib/gitlab/kubernetes/kube_client_spec.rb b/spec/lib/gitlab/kubernetes/kube_client_spec.rb index e5d688aa391..8efaca65f5a 100644 --- a/spec/lib/gitlab/kubernetes/kube_client_spec.rb +++ b/spec/lib/gitlab/kubernetes/kube_client_spec.rb @@ -162,6 +162,7 @@ describe Gitlab::Kubernetes::KubeClient do :get_secret, :get_service, :get_service_account, + :delete_namespace, :delete_pod, :create_config_map, :create_namespace, diff --git a/spec/models/clusters/applications/helm_spec.rb b/spec/models/clusters/applications/helm_spec.rb index 9672129bb1e..64f58155a66 100644 --- a/spec/models/clusters/applications/helm_spec.rb +++ b/spec/models/clusters/applications/helm_spec.rb @@ -134,4 +134,14 @@ describe Clusters::Applications::Helm do end end end + + describe '#post_uninstall' do + let(:helm) { create(:clusters_applications_helm, :installed) } + + it do + expect(helm.cluster.kubeclient).to receive(:delete_namespace).with('gitlab-managed-apps') + + helm.post_uninstall + end + end end diff --git a/yarn.lock b/yarn.lock index 8e6fd5b1a2e..15da26ed64b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1013,10 +1013,10 @@ vue "^2.6.10" vue-loader "^15.4.2" -"@gitlab/visual-review-tools@1.0.2": - version "1.0.2" - resolved "https://registry.yarnpkg.com/@gitlab/visual-review-tools/-/visual-review-tools-1.0.2.tgz#d7b410d962cf32e6b6159207917134f7e6a90c68" - integrity sha512-U6cw/y/Hf9gYhpV9zBPv4SoIXf1hKye2Xrynj+1Yt2ZmJJG/+QnJfvS6MEuFcNcJRL42p1VDG98uzYMp3rJ7ww== +"@gitlab/visual-review-tools@1.0.3": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@gitlab/visual-review-tools/-/visual-review-tools-1.0.3.tgz#b49c4a6fd8af3a1517d7e7d04096562f8bcb5d14" + integrity sha512-96j+0+Ivon5nYvT2doDCLQoBzU/GZYfQGLBmZZE3FZVMsIPAEsqDcSV/6+XCikUzU3B8VnH6er6l9OxE5x1RVw== "@gitlab/vue-toasted@^1.2.1": version "1.2.1" |