apache / cloudstack

Apache CloudStack is an opensource Infrastructure as a Service (IaaS) cloud computing platform
https://cloudstack.apache.org/
Apache License 2.0
2.1k stars 1.11k forks source link

Fix Kubernetes cluster view when user is unable to scale #9867

Closed hsato03 closed 2 weeks ago

hsato03 commented 3 weeks ago

Description

If a user does not have access to the scaleKubernetesCluster API and tries to list Kubernetes clusters through the UI, an error is thrown. Therefore, it is not possible to list and create Kubernetes clusters due to this error, even if the user has permission for such actions.

Screenshot from 2024-10-28 13-42-38

Since then, changes have been made so that this error no longer occurs and the user can list and manage Kubernetes clusters even if he doesn't have access to the scaleKubernetesCluster API.

Screenshot from 2024-10-28 18-08-21

Types of changes

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

Bug Severity

Screenshots (if appropriate):

How Has This Been Tested?

I created an account from a custom admin role that has the scaleKubernetesCluster API as DENY and all other APIs as ALLOW. Then, I logged into this account and was able to perform some basic operations like creating, listing and deleting a Kubernetes cluster.

codecov[bot] commented 3 weeks ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 15.08%. Comparing base (7fbd0a9) to head (977bb90). Report is 5 commits behind head on 4.19.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## 4.19 #9867 +/- ## ========================================== Coverage 15.08% 15.08% - Complexity 11201 11203 +2 ========================================== Files 5404 5404 Lines 473424 473423 -1 Branches 60702 60168 -534 ========================================== + Hits 71418 71428 +10 + Misses 394059 394045 -14 - Partials 7947 7950 +3 ``` | [Flag](https://app.codecov.io/gh/apache/cloudstack/pull/9867/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | | |---|---|---| | [uitests](https://app.codecov.io/gh/apache/cloudstack/pull/9867/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `4.30% <ø> (+<0.01%)` | :arrow_up: | | [unittests](https://app.codecov.io/gh/apache/cloudstack/pull/9867/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `15.80% <ø> (+<0.01%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

DaanHoogland commented 3 weeks ago

@blueorangutan ui

blueorangutan commented 3 weeks ago

@DaanHoogland a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.

blueorangutan commented 3 weeks ago

UI build: :heavy_check_mark: Live QA URL: https://qa.cloudstack.cloud/simulator/pr/9867 (QA-JID-475)