Add latest changes from gitlab-org/gitlab@master
This commit is contained in:
parent
039951a891
commit
02c49c4a3c
|
|
@ -347,6 +347,13 @@ module Types
|
|||
method: :linked_to_subscription?,
|
||||
description: 'Indicates if group is linked to a subscription.'
|
||||
|
||||
field :cluster_agents,
|
||||
::Types::Clusters::AgentType.connection_type,
|
||||
extras: [:lookahead],
|
||||
null: true,
|
||||
description: 'Cluster agents associated with projects in the group and its subgroups.',
|
||||
resolver: ::Resolvers::Clusters::AgentsResolver
|
||||
|
||||
def label(title:)
|
||||
BatchLoader::GraphQL.for(title).batch(key: group) do |titles, loader, args|
|
||||
LabelsFinder
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ module Clusters
|
|||
scope :ordered_by_name, -> { order(:name) }
|
||||
scope :with_name, ->(name) { where(name: name) }
|
||||
scope :has_vulnerabilities, ->(value = true) { where(has_vulnerabilities: value) }
|
||||
scope :for_projects, ->(projects) { where(project: projects) }
|
||||
|
||||
ignore_column :connection_mode, remove_with: '17.6', remove_after: '2024-11-01'
|
||||
|
||||
|
|
|
|||
|
|
@ -1171,6 +1171,10 @@ class Group < Namespace
|
|||
CustomerRelations::Organization.where(group_id: id).delete_all
|
||||
end
|
||||
|
||||
def cluster_agents
|
||||
::Clusters::Agent.for_projects(all_projects)
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def feature_flag_enabled_for_self_or_ancestor?(feature_flag, type: :development)
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
removal_milestone: "18.0"
|
||||
window: 3
|
||||
breaking_change: true
|
||||
impact: medium
|
||||
body: |
|
||||
The certificate-based integration with Kubernetes will be [deprecated and removed](https://about.gitlab.com/blog/2021/11/15/deprecating-the-cert-based-kubernetes-integration/). As a GitLab.com user, on new namespaces, you will no longer be able to integrate GitLab and your cluster using the certificate-based approach as of GitLab 15.0. The integration for current users will be enabled per namespace.
|
||||
|
||||
|
|
@ -12,7 +13,7 @@
|
|||
For updates and details about this deprecation, follow [this epic](https://gitlab.com/groups/gitlab-org/configure/-/epics/8).
|
||||
|
||||
GitLab Self-Managed customers can still use the feature [with a feature flag](https://docs.gitlab.com/update/deprecations/#self-managed-certificate-based-integration-with-kubernetes).
|
||||
stage: Configure
|
||||
stage: Deploy
|
||||
tiers: [Free, Premium, Ultimate]
|
||||
issue_url: 'https://gitlab.com/groups/gitlab-org/configure/-/epics/8'
|
||||
documentation_url: 'https://docs.gitlab.com/user/infrastructure/clusters/#certificate-based-kubernetes-integration-deprecated'
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ This window takes place on May 5 - 7, 2025 from 09:00 UTC to 22:00 UTC.
|
|||
|
||||
| Deprecation | Impact | Stage | Scope |
|
||||
|-------------|--------|-------|-------|
|
||||
| [GitLab.com certificate-based integration with Kubernetes](https://gitlab.com/groups/gitlab-org/configure/-/epics/8) | | Configure | |
|
||||
| [GitLab.com certificate-based integration with Kubernetes](https://gitlab.com/groups/gitlab-org/configure/-/epics/8) | Medium | Deploy | |
|
||||
| [Runner `active` GraphQL fields replaced by `paused`](https://gitlab.com/gitlab-org/gitlab/-/issues/351109) | Low | Verify | Instance, group, project |
|
||||
| [ZenTao integration](https://gitlab.com/gitlab-org/gitlab/-/issues/377825) | Low | Foundations | Instance |
|
||||
| [GraphQL deprecation of `dependencyProxyTotalSizeInBytes` field](https://gitlab.com/gitlab-org/gitlab/-/issues/414236) | Low | Package | Group |
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ RSpec.describe GitlabSchema.types['Group'], feature_category: :groups_and_projec
|
|||
contact_state_counts contacts work_item_types
|
||||
recent_issue_boards ci_variables releases environment_scopes work_items autocomplete_users
|
||||
lock_math_rendering_limits_enabled math_rendering_limits_enabled created_at updated_at
|
||||
organization_edit_path is_linked_to_subscription
|
||||
organization_edit_path is_linked_to_subscription cluster_agents
|
||||
]
|
||||
|
||||
expect(described_class).to include_graphql_fields(*expected_fields)
|
||||
|
|
|
|||
|
|
@ -75,6 +75,17 @@ RSpec.describe Clusters::Agent, feature_category: :deployment_management do
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe '.for_projects' do
|
||||
let_it_be(:agent_1) { create(:cluster_agent) }
|
||||
let_it_be(:agent_2) { create(:cluster_agent) }
|
||||
|
||||
subject { described_class.for_projects([agent_1.project, agent_2.project]) }
|
||||
|
||||
it 'return agents for selected projects' do
|
||||
is_expected.to contain_exactly(agent_1, agent_2)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -4361,4 +4361,22 @@ RSpec.describe Group, feature_category: :groups_and_projects do
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe '#cluster_agents' do
|
||||
let_it_be(:other_group) { create(:group) }
|
||||
let_it_be(:other_project) { create(:project, namespace: other_group) }
|
||||
|
||||
let_it_be(:root_group) { create(:group) }
|
||||
let_it_be(:subgroup) { create(:group, parent: root_group) }
|
||||
let_it_be(:project_in_group) { create(:project, namespace: root_group) }
|
||||
let_it_be(:project_in_subgroup) { create(:project, namespace: subgroup) }
|
||||
|
||||
let_it_be(:cluster_agent_for_other_project) { create(:cluster_agent, project: other_project) }
|
||||
let_it_be(:cluster_agent_for_project) { create(:cluster_agent, project: project_in_group) }
|
||||
let_it_be(:cluster_agent_for_project_in_subgroup) { create(:cluster_agent, project: project_in_subgroup) }
|
||||
|
||||
subject { root_group.cluster_agents }
|
||||
|
||||
it { is_expected.to contain_exactly(cluster_agent_for_project, cluster_agent_for_project_in_subgroup) }
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in New Issue