Expose cluster agent of the environment
This MR is on top of Add cluster_agent_id FK to environments (!120954 - merged)
What does this MR do and why?
This MR exposes registered cluster agent for the environment via GraphQL.
Users can't register a cluster agent yet. It'll be followed up after Environment Update GraphQL Mutation (!120561 - merged).
Related to Allow to Select Agent in Environment setting page (#396407 - closed)
Screenshots or screen recordings
Query
query {
project(fullPath: "root/pipeline-playground") {
environments {
nodes {
id
name
clusterAgent {
name
}
}
}
}
}
Response
{
"data": {
"project": {
"environments": {
"nodes": [
{
"id": "gid://gitlab/Environment/17",
"name": "production",
"clusterAgent": {
"name": "prod"
}
}
]
}
}
}
}
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Shinya Maeda