Commit d5a0ee92 authored by Tiger's avatar Tiger

Update KubernetesService deprecation warning

parent da5c00d1
...@@ -170,12 +170,11 @@ class KubernetesService < Service ...@@ -170,12 +170,11 @@ class KubernetesService < Service
def deprecation_message def deprecation_message
content = if project content = if project
_("Kubernetes service integration has been deprecated. %{deprecated_message_content} your Kubernetes clusters using the new <a href=\"%{url}\"/>Kubernetes Clusters</a> page") % { _("Kubernetes service integration has been disabled. Fields on this page are not used by GitLab, you can configure your Kubernetes clusters using the new <a href=\"%{url}\"/>Kubernetes Clusters</a> page") % {
deprecated_message_content: deprecated_message_content,
url: Gitlab::Routing.url_helpers.project_clusters_path(project) url: Gitlab::Routing.url_helpers.project_clusters_path(project)
} }
else else
_("The instance-level Kubernetes service integration is deprecated. Your data has been migrated to an <a href=\"%{url}\"/>instance-level cluster</a>.") % { _("The instance-level Kubernetes service integration is disabled. Your data has been migrated to an <a href=\"%{url}\"/>instance-level cluster</a>.") % {
url: Gitlab::Routing.url_helpers.admin_clusters_path url: Gitlab::Routing.url_helpers.admin_clusters_path
} }
end end
...@@ -260,8 +259,4 @@ class KubernetesService < Service ...@@ -260,8 +259,4 @@ class KubernetesService < Service
errors[:base] << deprecation_message errors[:base] << deprecation_message
end end
end end
def deprecated_message_content
_("Fields on this page are now uneditable, you can configure")
end
end end
--- ---
title: Remove Kubernetes service template from available deployment platforms title: Remove Kubernetes service integration and Kubernetes service template from available deployment platforms
merge_request: 29786 merge_request: 29786
author: author:
type: removed type: removed
...@@ -4408,9 +4408,6 @@ msgstr "" ...@@ -4408,9 +4408,6 @@ msgstr ""
msgid "February" msgid "February"
msgstr "" msgstr ""
msgid "Fields on this page are now uneditable, you can configure"
msgstr ""
msgid "File" msgid "File"
msgid_plural "Files" msgid_plural "Files"
msgstr[0] "" msgstr[0] ""
...@@ -5645,7 +5642,7 @@ msgstr "" ...@@ -5645,7 +5642,7 @@ msgstr ""
msgid "Kubernetes error: %{error_code}" msgid "Kubernetes error: %{error_code}"
msgstr "" msgstr ""
msgid "Kubernetes service integration has been deprecated. %{deprecated_message_content} your Kubernetes clusters using the new <a href=\"%{url}\"/>Kubernetes Clusters</a> page" msgid "Kubernetes service integration has been disabled. Fields on this page are not used by GitLab, you can configure your Kubernetes clusters using the new <a href=\"%{url}\"/>Kubernetes Clusters</a> page"
msgstr "" msgstr ""
msgid "LFS" msgid "LFS"
...@@ -10002,7 +9999,7 @@ msgstr "" ...@@ -10002,7 +9999,7 @@ msgstr ""
msgid "The import will time out after %{timeout}. For repositories that take longer, use a clone/push combination." msgid "The import will time out after %{timeout}. For repositories that take longer, use a clone/push combination."
msgstr "" msgstr ""
msgid "The instance-level Kubernetes service integration is deprecated. Your data has been migrated to an <a href=\"%{url}\"/>instance-level cluster</a>." msgid "The instance-level Kubernetes service integration is disabled. Your data has been migrated to an <a href=\"%{url}\"/>instance-level cluster</a>."
msgstr "" msgstr ""
msgid "The invitation could not be accepted." msgid "The invitation could not be accepted."
......
...@@ -78,7 +78,7 @@ describe KubernetesService, :use_clean_rails_memory_store_caching do ...@@ -78,7 +78,7 @@ describe KubernetesService, :use_clean_rails_memory_store_caching do
it 'includes an error with a deprecation message' do it 'includes an error with a deprecation message' do
kubernetes_service.valid? kubernetes_service.valid?
expect(kubernetes_service.errors[:base].first).to match(/Kubernetes service integration has been deprecated/) expect(kubernetes_service.errors[:base].first).to match(/Kubernetes service integration has been disabled/)
end end
end end
...@@ -383,13 +383,13 @@ describe KubernetesService, :use_clean_rails_memory_store_caching do ...@@ -383,13 +383,13 @@ describe KubernetesService, :use_clean_rails_memory_store_caching do
let(:kubernetes_service) { create(:kubernetes_service) } let(:kubernetes_service) { create(:kubernetes_service) }
it 'indicates the service is deprecated' do it 'indicates the service is deprecated' do
expect(kubernetes_service.deprecation_message).to match(/Kubernetes service integration has been deprecated/) expect(kubernetes_service.deprecation_message).to match(/Kubernetes service integration has been disabled/)
end end
context 'if the service is not active' do context 'if the service is not active' do
it 'returns a message' do it 'returns a message' do
kubernetes_service.update_attribute(:active, false) kubernetes_service.update_attribute(:active, false)
expect(kubernetes_service.deprecation_message).to match(/Fields on this page are now uneditable/) expect(kubernetes_service.deprecation_message).to match(/Fields on this page are not used by GitLab/)
end end
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment