Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
sykim-etri opened this issue Jun 13, 2024 · 2 comments · Fixed by #1809
Assignees
Labels
bug Something isn't working

Comments

@sykim-etri
Copy link
Member

sykim-etri commented Jun 13, 2024

클러스터 제어 관련 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 sykim-etri added the bug Something isn't working label Jun 13, 2024
@sykim-etri sykim-etri self-assigned this Jun 13, 2024
@sykim-etri
Copy link
Member Author

sykim-etri commented Jun 13, 2024

@seokho-son

  • 아래 필드들의 내용을 클러스터 생성 요청시 전달된 CB-TB의 값으로 변경/삭제하고, 기존 CB-SP의 값들은 CspViewK8sClusterDetail, CspViewK8sClusterNodeGroupDetail 등에 포함하면 어떨까요?
    • 응답.Network.{vNetId, subnetIds, securityGroupIds}
    • 응답.NodeGroupList.[{id, imageId, specId, sshKeyId}]
    • 응답.NodeGroupList.[{nodes}] 항목 삭제: 대응되는 CB-TB 객체가 없음

@seokho-son
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants