Skip to content

Support K8s Multi-Cluster based on Labeling#2227

Merged
cb-github-robot merged 1 commit intocloud-barista:mainfrom
seokho-son:main
Nov 27, 2025
Merged

Support K8s Multi-Cluster based on Labeling#2227
cb-github-robot merged 1 commit intocloud-barista:mainfrom
seokho-son:main

Conversation

@seokho-son
Copy link
Copy Markdown
Member

image

Signed-off-by: Seokho Son <shsongist@gmail.com>
Copilot AI review requested due to automatic review settings November 27, 2025 08:07
@github-actions github-actions bot added the asset label Nov 27, 2025
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds support for K8s multi-cluster management based on labeling, enabling users to create, group, and track multiple clusters together. The changes introduce a clustergroup label that is automatically injected when using the multi-cluster creation API with a name prefix, facilitating cluster organization across different cloud providers.

Key Changes:

  • Enhanced multi-cluster creation to automatically inject clustergroup labels for grouping related clusters
  • Added comprehensive failed cluster tracking with detailed error information (ConnectionName, SpecId, Error)
  • Improved error handling to support partial success scenarios in batch operations

Reviewed changes

Copilot reviewed 8 out of 9 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/interface/rest/server/middlewares/responseBodyDump.go Improved response body parsing to better handle trailing newlines and empty responses; changed log level from Error to Debug for non-JSON responses
src/interface/rest/docs/swagger.yaml Added K8sClusterFailedInfo schema for tracking failed cluster creation attempts; updated K8sMultiClusterInfo to include failedClusters array
src/interface/rest/docs/docs.go Auto-generated documentation update corresponding to swagger.yaml changes
src/core/model/k8scluster.go Added K8sClusterFailedInfo struct and updated K8sMultiClusterInfo to support tracking both successful and failed cluster creations
src/core/resource/k8scluster.go Added Label and SystemLabel support to cluster creation; improved error messages; enhanced label merging logic where user labels override system labels; improved error handling for non-existent clusters in ListK8sCluster
src/core/infra/provisioning.go Implemented automatic clustergroup label injection for multi-cluster creation; enhanced error reporting with ConnectionName and SpecId; improved ImageId validation to auto-correct unsupported values instead of failing; updated result collection to track failed clusters separately
docker-compose.yaml Updated cb-mapui image version from 0.11.21 to 0.11.22
assets/k8sclusterinfo.yaml Updated NCloud Kubernetes versions from 1.26-1.29 to 1.31-1.33 to reflect currently supported versions

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@seokho-son
Copy link
Copy Markdown
Member Author

/approve

@github-actions github-actions bot added the approved This PR is approved and will be merged soon. label Nov 27, 2025
@cb-github-robot cb-github-robot merged commit 5854763 into cloud-barista:main Nov 27, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved This PR is approved and will be merged soon. asset

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants