Commit fda8bd0b authored by Tiger's avatar Tiger

Update KubernetesService deprecation warning

parent 9d75b6d4
......@@ -170,12 +170,11 @@ class KubernetesService < Service
def deprecation_message
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") % {
deprecated_message_content: deprecated_message_content,
_("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") % {
url: Gitlab::Routing.url_helpers.project_clusters_path(project)
}
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
}
end
......@@ -260,10 +259,6 @@ class KubernetesService < Service
errors[:base] << deprecation_message
end
end
def deprecated_message_content
_("Fields on this page are now uneditable, you can configure")
end
end
KubernetesService.prepend(EE::KubernetesService)
---
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
author:
type: removed
......@@ -5610,9 +5610,6 @@ msgstr ""
msgid "Fetching licenses failed. You are not permitted to perform this action."
msgstr ""
msgid "Fields on this page are now uneditable, you can configure"
msgstr ""
msgid "File"
msgid_plural "Files"
msgstr[0] ""
......@@ -7554,7 +7551,7 @@ msgstr ""
msgid "Kubernetes error: %{error_code}"
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 ""
msgid "LDAP settings"
......@@ -13166,7 +13163,7 @@ msgstr ""
msgid "The import will time out after %{timeout}. For repositories that take longer, use a clone/push combination."
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 ""
msgid "The invitation could not be accepted."
......
......@@ -78,7 +78,7 @@ describe KubernetesService, :use_clean_rails_memory_store_caching do
it 'includes an error with a deprecation message' do
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
......@@ -383,13 +383,13 @@ describe KubernetesService, :use_clean_rails_memory_store_caching do
let(:kubernetes_service) { create(:kubernetes_service) }
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
context 'if the service is not active' do
it 'returns a message' do
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
......
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