Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-04-20 13:00:54 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-04-20 13:00:54 +0300
commit3cccd102ba543e02725d247893729e5c73b38295 (patch)
treef36a04ec38517f5deaaacb5acc7d949688d1e187 /app/graphql/mutations/environments/canary_ingress/update.rb
parent205943281328046ef7b4528031b90fbda70c75ac (diff)
Add latest changes from gitlab-org/gitlab@14-10-stable-eev14.10.0-rc42
Diffstat (limited to 'app/graphql/mutations/environments/canary_ingress/update.rb')
-rw-r--r--app/graphql/mutations/environments/canary_ingress/update.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/app/graphql/mutations/environments/canary_ingress/update.rb b/app/graphql/mutations/environments/canary_ingress/update.rb
index e4ba08e6dcc..ce24b8842c6 100644
--- a/app/graphql/mutations/environments/canary_ingress/update.rb
+++ b/app/graphql/mutations/environments/canary_ingress/update.rb
@@ -5,6 +5,7 @@ module Mutations
module CanaryIngress
class Update < ::Mutations::BaseMutation
graphql_name 'EnvironmentsCanaryIngressUpdate'
+ description '**Deprecated** This endpoint is planned to be removed along with certificate-based clusters. [See this epic](https://gitlab.com/groups/gitlab-org/configure/-/epics/8) for more information.'
authorize :update_environment
@@ -18,7 +19,13 @@ module Mutations
required: true,
description: 'Weight of the Canary Ingress.'
+ REMOVAL_ERR_MSG = 'This endpoint was deactivated as part of the certificate-based' \
+ 'kubernetes integration removal. See Epic:' \
+ 'https://gitlab.com/groups/gitlab-org/configure/-/epics/8'
+
def resolve(id:, **kwargs)
+ return { errors: [REMOVAL_ERR_MSG] } if cert_based_clusters_ff_disabled?
+
environment = authorized_find!(id: id)
result = ::Environments::CanaryIngress::UpdateService
@@ -33,6 +40,12 @@ module Mutations
id = ::Types::GlobalIDType[::Environment].coerce_isolated_input(id)
GitlabSchema.find_by_gid(id)
end
+
+ private
+
+ def cert_based_clusters_ff_disabled?
+ Feature.disabled?(:certificate_based_clusters, default_enabled: :yaml, type: :ops)
+ end
end
end
end