kickstart: add namespace selection to configure phase#2166
Open
bosesuneha wants to merge 2 commits into
Open
Conversation
Adds a namespace pick step after cluster selection. Lists existing namespaces from the cluster via kubectl (filtering system namespaces but always offering 'default'), promotes the last-used choice, and threads the selected namespace through prepare (manifest generation), deploy (kubectl context, next-step tips), and verify phases. - Only existing cluster namespaces are selectable; no manual entry. - Errors out early if kubectl is unavailable or listing fails. - Updates summary table, integration/state tests, and webview contract.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds Kubernetes namespace selection to the AKS Kickstart configure phase and threads the selected namespace through subsequent phases (prepare/deploy/verify), replacing the previous hardcoded default behavior.
Changes:
- Added a namespace QuickPick step after cluster selection and persisted the last-used namespace in
kickstart.lastUsed. - Plumbed
namespacethrough Kickstart state/config + manifest generation prompt, and updated deploy/verify messaging/commands to use it. - Updated webview contract types and test fixtures to include
namespace.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/webview-contract/webviewDefinitions/kickstart.ts | Adds namespace to the webview ConfigData contract. |
| src/tests/suite/kickstart.integration.test.ts | Updates integration test config fixture with namespace: "default". |
| src/commands/aksKickstart/configure.ts | Implements namespace selection via kubernetes-tools API + last-used persistence. |
| src/chatParticipants/kickstart/steps/manifests.ts | Passes selected namespace into the manifest user prompt (defaults to default). |
| src/chatParticipants/kickstart/state.ts | Extends persisted kickstart ConfigData with namespace. |
| src/chatParticipants/kickstart/state.test.ts | Updates state tests to include namespace in config fixtures. |
| src/chatParticipants/kickstart/phases/verify.ts | Uses configured namespace for pod/service checks and user messaging. |
| src/chatParticipants/kickstart/phases/prepare.ts | Announces and forwards namespace into manifest generation. |
| src/chatParticipants/kickstart/phases/deploy.ts | Updates deploy messaging and next-step kubectl commands to use namespace. |
| src/chatParticipants/kickstart/phases/configure.ts | Stores namespace in kickstart state + adds Namespace row to summary table. |
| src/chatParticipants/kickstart/phaseRunner.test.ts | Updates prereq validation test fixtures with namespace: "default". |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| clusterSku: "Automatic" | "Standard"; | ||
| acrName: string; | ||
| acrLoginServer: string; | ||
| namespace: string; |
Comment on lines
49
to
52
| const skuLabel = config.clusterSku === "Automatic" ? "AKS Automatic" : "AKS Standard"; | ||
| stream.markdown(`Generating artifacts for **${skuLabel}** cluster...\n\n`); | ||
| stream.markdown(`Manifests will target namespace **\`${config.namespace}\`**.\n\n`); | ||
|
|
Comment on lines
+267
to
+268
| * Returns non-system namespace names, with "default" always first and the | ||
| * last-used namespace promoted to the top when present. |
…-namespace-selection # Conflicts: # src/chatParticipants/kickstart/steps/manifests.ts # src/commands/aksKickstart/configure.ts # src/webview-contract/webviewDefinitions/kickstart.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a Kubernetes namespace pick step to the kickstart
configurephase, immediately after cluster selection. The selected namespace is threaded throughprepare(manifest generation),deploy(kubectl context + next-step tips), andverifyphases — replacing the previously hardcodeddefault.Behavior
kube-system,kube-public,kube-node-lease,kube-lease) are filtered out, butdefaultis always offered.kickstart.lastUsed) is promoted to the top with a(last used)hint.Plumbing
ConfigData.namespaceadded tosrc/chatParticipants/kickstart/state.tsand the webview contract (no webview UI changes — kept structurally forpushStatetypechecking).KickstartConfiguration+LastUsedSelectionsinconfigure.tscarry the field.prepare.tspassesconfig.namespaceintogenerateManifestsStepand announces it in the stream.steps/manifests.tsplumbs the namespace intobuildK8sManifestUserPrompt, removing the hardcoded"default".deploy.tsuses the namespace in the apply heading and the "Next Steps"kubectlcommands; the AKS-Automatic note now names the target namespace.verify.tsuses the namespace for pod/service queries and user-facing messages.Namespacerow.Tests
phaseRunner.test.ts,state.test.ts, and the integration test were updated to includenamespace: "default"in their fixtures.tsc --noEmitandeslintare clean.Out of scope
No webview UI changes (the webview is slated for removal).