aksd: DeployWizard: warn when deployment exceeds namespace resource quota#494
aksd: DeployWizard: warn when deployment exceeds namespace resource quota#494gambtho merged 2 commits intoAzure:mainfrom
Conversation
e3c48ce to
40d902d
Compare
There was a problem hiding this comment.
Pull request overview
Adds advisory ResourceQuota awareness to the DeployWizard review step so users get warned (non-blocking) when their deployment’s pod resources would exceed remaining namespace quota.
Changes:
- Introduces shared CPU/memory quantity parse/format helpers.
- Adds
checkResourceQuota()to fetch namespace quotas and compare against computed manifest totals. - Wires quota warnings through the DeployWizard hook and UI banner.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| plugins/aks-desktop/src/utils/shared/resourceUnits.ts | Adds K8s resource quantity parsing/formatting helpers. |
| plugins/aks-desktop/src/utils/shared/resourceUnits.test.ts | Unit tests for resource unit helpers. |
| plugins/aks-desktop/src/components/DeployWizard/utils/quotaCheck.ts | Computes totals from manifests and compares against ResourceQuota remaining. |
| plugins/aks-desktop/src/components/DeployWizard/utils/quotaCheck.test.ts | Unit tests for quota check behavior. |
| plugins/aks-desktop/src/components/DeployWizard/hooks/useDeployWizard.ts | Runs quota check when entering Deploy step; plumbs warnings into state. |
| plugins/aks-desktop/src/components/DeployWizard/components/DeployPure.tsx | Renders a warning banner in the Review & Deploy step. |
| plugins/aks-desktop/src/components/DeployWizard/components/Deploy.tsx | Passes quotaWarnings to the pure component. |
| plugins/aks-desktop/src/components/DeployWizard/DeployWizard.tsx | Passes quotaWarnings from wizard state into Deploy step. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
40d902d to
c67cb37
Compare
c67cb37 to
c30ab40
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 10 out of 10 changed files in this pull request and generated 10 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
944ecf1 to
95c9db7
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
5e124df to
82cfdb4
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 11 out of 28 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
82cfdb4 to
69f7922
Compare
69f7922 to
f9ffc0c
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 12 out of 29 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
f9ffc0c to
a2547db
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 13 out of 30 changed files in this pull request and generated 3 comments.
Comments suppressed due to low confidence (1)
headlamp:1
- The PR description focuses on Deploy Wizard quota warnings, but this PR also updates the Headlamp submodule and includes very large localization churn across multiple locales. To keep review/audit scope clear, consider splitting the submodule + broad localization updates into a separate PR, or explicitly call them out in the PR description as intentional changes.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
fff128b to
e6066ce
Compare
e6066ce to
30ea068
Compare
30ea068 to
726171a
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 17 out of 17 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
The deploy wizard's server-side dry-run validates the Deployment object but not the pods the ReplicaSet controller creates. When a namespace has a ResourceQuota, users could deploy successfully only to find pods stuck in
FailedCreatewith no prior warning.checkResourceQuota()utility that fetches namespace ResourceQuotas and compares requested resources against remaining quotaparseCpuToMillicores,parseMemoryToBytes,formatCpu,formatMemory)Type of Change
Related Issues
Fixes #492 (quota warning portion; Map tab fix is in #493)
Changes Made
utils/shared/resourceUnits.tsutils/shared/resourceUnits.test.tsDeployWizard/utils/quotaCheck.tsDeployWizard/utils/quotaCheck.test.tsDeployWizard/hooks/useDeployWizard.tsquotaWarningsstate +useEffectthat runs quota check on Deploy step entryDeployWizard/components/DeployPure.tsxwarning.maincolor)DeployWizard/components/Deploy.tsxquotaWarningsthroughDeployWizard/DeployWizard.tsxquotaWarningsthroughDesign decisions
useEffectwhen entering the Deploy review step, so warnings appear before the user clicks Deployspec.replicas(uses declared replicas, not HPA max, to keep it simple)requests.cpu,requests.memory,limits.cpu,limits.memoryTesting
Test Cases
Checklist