feat: add furyctl get cluster-info command#652
Conversation
85601a8 to
27c8546
Compare
| // extractModules combines types from furyctl config with versions from the KFD | ||
| // YAML. Fixed order keeps output stable; for EKS, an AWS row is appended when | ||
| // present. | ||
| func extractModules(configMap map[string]any, sd distroconf.KFD, kind string) []ModuleInfo { |
There was a problem hiding this comment.
Note for reviewers: extractModules is intentionally static, display names differ from yaml keys (opa is "Policy", dr is "Disaster Recovery"), each module has its own type extraction logic, and versions are sourced from the typed distroconf.KFD struct. Adding a new module requires an explicit entry.
ralgozino
left a comment
There was a problem hiding this comment.
A first round of review, I'll take a closer look in the next days
| return result | ||
| } | ||
|
|
||
| func etcdTopology(kind string, configMap map[string]any) string { |
There was a problem hiding this comment.
this func will need to be adapted to support immutable
| return etcdDedicated | ||
| } | ||
|
|
||
| func installerVersion(kind string, sd distroconf.KFD) string { |
There was a problem hiding this comment.
this func will need to be adapted to support immutable
There was a problem hiding this comment.
Cannot be added now because fury-distribution v1.34.0 does not yet expose KFDKubernetes.Immutable. I will add the case along with the dependency update once Kubernetes.Immutable is merged into the main branch. WDYT?
Co-authored-by: Ramiro Algozino <ramiro@sighup.io>
Summary 💡
Implements the
furyctl get cluster-infocommand, which displays a quick overview of a running cluster's configuration and status.Closes: sighupio/product-management/issues/642
Description 📝
All values are read from the configmaps/secrets that furyctl stores in the kube-system namespace; the Kubernetes version and node list are retrieved via live
kubectlqueries.The last configuration change time is read from the
furyctl-configsecret. It is printed in UTC.The ongoing upgrade status is read from the
furyctl-upgrade-stateconfigmap and reports the first pending or failed phase with its status.Nodes are grouped by their primary
node-role.kubernetes.io/*label. Since a node can carry multiple role labels, is applied a deterministic order:control-planefirst, thenmaster, then alphabetical, then those with no role.The
--format/-fflag supportstext(default),json, andyaml.Example txt output
Breaking Changes 💔
None.
Tests performed 🧪
Future work 🔧