cloud-barista / cb-tumblebug

Cloud-Barista Multi-Cloud Infra Management Framework
Apache License 2.0
40 stars 46 forks source link

No CB-TB objects' values in structs related to TbCluster* (like TbClusterInfo, TbClusterNodeGroupInfo, ...) #1625

Open sykim-etri opened 3 weeks ago

sykim-etri commented 3 weeks ago

클러스터 제어 관련 API에서 사용하는 응답에 사용된 필드들에 CB-TB 오브젝트 기준값이 아닌 상황이므로 수정이 필요합니다.

클러스터 생성 요청 예시는 다음과 같다.

{
  "connectionName": "alibaba-ap-northeast-2",
  "id": "k8scluster-01",
  "version": "1.26.15-aliyun.1",
  "vNetId": "alibaba-ap-northeast-2-tb",
  "subnetIds": [
    "alibaba-ap-northeast-2-tb"
  ],
  "securityGroupIds": [
    "alibaba-ap-northeast-2-tb"
  ],
  "description": "description"
}                                        

클러스터 생성 응답 예시는 다음과 같다.

{
  "id": "k8scluster-01",
  "name": "k8scluster-01",
  "connectionName": "alibaba-ap-northeast-2",
  "version": "1.26.15-aliyun.1",
  "Network": {
    "vNetId": "vpc-mj7l71ewn8107hk17ozus",
    "subnetIds": [
      "vsw-mj7edvdmku8k7xpbuyrtr"
    ],
    "securityGroupIds": [
      "sg-mj75olo1n9wjsfj8qb9j"
    ],
    "keyValueList": null
  },
  "NodeGroupList": [
    {
      "id": "bc54a406-548e-4a56-8680-0d0efa9ca740",
      "imageId": "1213d033-bdf6-4d73-9763-4e8e57c745fb",
      "specId": "m2.c4m8",
      "rootDiskType": "General HDD",
      "rootDiskSize": "20",
      "sshKeyId": "ns01-nhnclo-cpju67kcpuq3e5dkgbm0",
      "onAutoScaling": true,
      "desiredNodeSize": 1,
      "minNodeSize": 1,
      "maxNodeSize": 1,
      "status": "Active",
      "nodes": [
        "dc04d9c1-c19a-4440-b0ba-d1a1d0100762"
      ],
      "keyValueList": [
       ...
      ],
    }
  ],
  "AccessInfo": {
    "endpoint": "Endpoint is not ready yet!",
    "kubeconfig": "Kubeconfig is not ready yet!"
  },
  "Addons": {
    "keyValueList": null
  },
  "status": "Creating",
  "createdTime": "2024-06-10T20:12:30+08:00",
  "keyValueList": [
    {
      "key": "tags.1.value",
      "value": "ca0f2da6f3b1e43fe9780127c43f7f142"
    },
    ...
  ],
  "description": "description",
  "cspClusterId": "ca0f2da6f3b1e43fe9780127c43f7f142",
  "cspClusterName": "ns01-k8scluster-01",
  "systemMessage": "",
  "systemLabel": ""
}

이중 Network/NodeGroupList에 포함된 필드들의 정보들이 CB-TB 오브젝트 기준이 아니라 CB-SP 오브젝트 기준으로 전달되고 있습니다.

sykim-etri commented 3 weeks ago

@seokho-son

seokho-son commented 3 weeks ago

@sykim-etri 넵. 결국, 사용자 측면에서 기존 struct 는 재구성할 필요가 있어보이며, 기존 SP 구조체는 말씀하신 형태의 부가정보로 우선 제공해드리면 좋을 것 같습니다. :)