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

Add Cluster mgmt feature #1430

Merged

Conversation

sykim-etri
Copy link
Member

CB-Spider에서 제공하는 PMKS 기능을 활용하여 각 CSP를 대상으로 K8S 클러스터를 관리할 수 있는 API와 각 클러스터의 노드 그룹을 관리할 수 있는 API를 개발하였습니다.

  • 기능 시험

    • README.md에 테스트 스크립트 사용 방법을 간략히 작성하였으니 이를 참고하시면 됩니다.
  • 시험 환경

    • CB-Spider PMKS 드라이버들 중 Azure-PMKS만 정상 동작을 확인하였기 때문에 Azure에서만 시험이 가능합니다.
    • AKS의 경우 Resource Group Name을 내부적으로 활용하는데, 길이 제약이 있으므로 Resource Group Name 설정에 신경을 써야 합니다.
      • conf.env의 Azure 관련 변수들 중 아래 예시와 같이 축약할 필요가 있습니다.관련 PR
        • RegionVal02[$IX,$IY]=cb-tumblebug -> cb-tb 로 축약
        • CONN_CONFIG[$IX,$IY]=azure-koreacentral -> az-krc 로 축약
    • 또한 AKS의 경우 노드 스펙이 2 core 이상이어야 합니다.
    • conf.env의 Azure 관련 CommonSpec[$IX] 변수를 변경할 필요가 있습니다.
      • CommonSpec[$IX]=${CommonSpecSmall[$IX]} -> ${CommonSpecMedium[$IX]}

  • Add Cluster management APIs

    • Cluster
      • Create Cluster (POST /:nsId/cluster)
      • Get Cluster (GET /:nsId/cluster/:clusterId)
      • Get All Clusters (GET /:nsId/cluster)
      • Delete Cluster (DELETE /:nsId/cluster/:clusterId)
      • Delete All Clusters (DELETE /:nsId/cluster)
    • NodeGroup
      • Add NodeGroup (POST /:nsId/cluster/:clusterId/nodegroup)
      • Remove NodeGroup (DELETE /:nsId/cluster/:clusterId/nodegroup)
      • Set Autoscaling (PUT /:nsId/cluster/:clusterId/nodegroup/:nodeGroupName/onautoscaling)
      • Change Autoscale Size (PUT /:nsId/cluster/:clusterId/nodegroup/:nodeGroupName/autoscalesize)
  • Add test scripts to test cluster apis

* Add Cluster management APIs
  - Cluster
    - Create Cluster (POST /:nsId/cluster)
    - Get Cluster (GET /:nsId/cluster/:clusterId)
    - Get All Clusters (GET /:nsId/cluster)
    - Delete Cluster (DELETE /:nsId/cluster/:clusterId)
    - Delete All Clusters (DELETE /:nsId/cluster)
  - NodeGroup
    - Add NodeGroup (POST /:nsId/cluster/:clusterId/nodegroup)
    - Remove NodeGroup (DELETE /:nsId/cluster/:clusterId/nodegroup)
    - Set Autoscaling (PUT /:nsId/cluster/:clusterId/nodegroup/:nodeGroupName/onautoscaling)
    - Change Autoscale Size (PUT /:nsId/cluster/:clusterId/nodegroup/:nodeGroupName/autoscalesize)

* Add test scripts to test cluster apis
@github-actions github-actions bot added the documentation Improvements or additions to documentation label Jan 17, 2024
@seokho-son
Copy link
Member

@sykim-etri 감사합니다! 고생 많으셨네요.
LGTM 입니다.

세부 사항은 merge 후에 살펴보도록 하겠습니다. :)

@seokho-son
Copy link
Member

/approve

@github-actions github-actions bot added the approved This PR is approved and will be merged soon. label Jan 18, 2024
@seokho-son
Copy link
Member

@sykim-etri Codacy Static Code Analysis 관련해서는 아래 링크를 참조하셔서, 향후에 필요시 반영해주시면 되겠습니다.
https://app.codacy.com/gh/cloud-barista/cb-tumblebug/pullRequest?prid=13427929

@seokho-son seokho-son merged commit e415176 into cloud-barista:main Jan 18, 2024
2 of 3 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. documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants