Repository navigation
feat(cli): deploy names the platform and shows every installed chart's version - #503
Merged
Merged
Conversation
…s version kates deploy and kates detect name the platform from the strongest signal they have, and say which: the config.openshift.io API group, the server version's -eks-/-gke. suffix on aws:// or gce:// nodes (EKS Anywhere and Google Distributed Cloud run those builds elsewhere), +k3s/+rke2, a node's kind://, k3s:// or AKS scale-set providerID, and last the context name, now labelled a guess. Before, the context name was all there was. One helm list -A (per-namespace lists when an admin-less account may not list every namespace) replaces the per-release lookups, so a component installed in another namespace shows up. Every component of the deploy that is installed gets a line with its chart beside this deploy's and what deploy does with it, in the wizard's Already installed screen, the review and the --dry-run preview. A Kafka whose CR is not Ready is shown as reapplied, as deployGroupB does; Connect and monitoring as kept unless deploy finds them broken. --upgrade name,...|all upgrades installed components without the wizard. It refuses a name deploy does not upgrade, and one this deploy does not include, instead of ignoring it.
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.
PR 1 of the deploy plan (
plans/deploy-enhancement.md, three-PR cut): detection, installed versions for every chart,--upgrade.What changes
Platform detection (
pkg/detect/collector.go,platformOf). Strongest signal first, and the report says which one decided (ProviderBasis).kates detectand deploy's pre-flight phase print it, e.g.Platform: kind (node providerID kind://).The
config.openshift.ioAPI group (kubectl api-versions) →openshift.The server
gitVersion:-eks-onaws://nodes →eks-gke.ongce://nodes →gke+k3s→k3s+rke2→rke2EKS Anywhere and Google Distributed Cloud run the same builds off AWS and GCP, so the suffix alone names nothing.
A node
providerID:kind://,k3s://, or an AKS scale set (AKS has no version suffix).The context name, last, now labelled "guessed". Until now, the context name was the only signal.
openshift,k3sandrke2fall into valuesgen's generic branches. Admin-less deploys still skip the collector, so their provider staysunknown. Detecting it there would switch them onto the kind overlays, so that waits for PR 3's cluster summary.Installed rows (
cmd/deploy_installed.go).helm list -Areplaces the per-release lookups:--filter ^(<this deploy's releases>)$, with a 10 s budget of its own. When the account may not list every namespace, it falls back to onehelm list -nper namespace.--dry-runpreview, under a new "Already installed" section.deployGroupBdoes.--upgrade name,…|all. It fillsdeployUpgradeReleases, the same map the wizard's ticks fill, and with-ithe wizard preselects those names. It refuses a name deploy doesn't upgrade, and one this deploy doesn't include (--upgrade mm2: this deploy does not include it; add --with-mirror-maker2, …), instead of ignoring it.Also: the
--strimzi-versionhelp said "the repository pin"; it now says "this release's pin".Checks
TestPlatformOf: 12 cases, including EKS Anywhere and GDC.TestDeployedReleases_FallsBackToTheEntriesNamespacesTestInstalledRows: other namespace, Kafka not Ready, Connect, a ticked and an unticked upgrade.TestApplyUpgradeFlag,TestCheckUpgradeInDeploy,TestDeployDryRunListsInstalled.go test ./...incli/passes.golangci-lint run --new-from-rev=origin/mainreports 0 issues.scripts/check-cli-style.shpasses.kind-panda:kates deploy --dry-run --yesthrough a copied kubeconfig (read-only).Platform: kind (node providerID kind://), and "Kafka UI 0.3.2 → 0.3.2 in kafka (same chart; reapply): kept", or "applied" with--upgrade kafka-ui.--upgrade mm2and--upgrade kafkawere both refused.--upgradesilently ignoring a component outside the deploy;-Asharing its timeout with the fallback.Not in this PR
published-smoke, which the plan listed here. That job only runs on a tag and gates the GitHub Release, so a failure could only show up at a release. It needs its own PR.