You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FEAT cloudctl] - cluster-version command should read version from ClusterKubeconfig label #81
As a platform engineer, I can run cloudctl cluster-version without making a live API server call, so that the command works faster and in environments where the API server is temporarily unreachable.
Description
The cluster-version command (in cmd/cluster-version.go) currently queries the Kubernetes API server directly via GET /version (unauthenticated, falling back to authenticated) to retrieve the cluster version.
Following the implementation of cloudoperators/greenhouse#2213, the ClusterKubeconfig resource will carry a greenhouse.sap/kubernetes-version label written by the clusterkubeconfig controller, sourced from cluster.status.kubernetesVersion.
The cluster-version command should be updated to:
Primary path: read the version from the greenhouse.sap/kubernetes-version label on the ClusterKubeconfig resource (when available) — no live API call required
Fallback path: if the label is absent or the ClusterKubeconfig resource cannot be found, fall back to the existing direct API server query
This makes the command faster, reduces load on remote clusters, and allows it to succeed even when the remote API server is temporarily unreachable.
Acceptance Criteria
cloudctl cluster-version reads greenhouse.sap/kubernetes-version from the matching ClusterKubeconfig label when available
Falls back to the existing GET /version API call when the label is absent or the resource is not found
Output format is unchanged (existing --output / -o flag, ClusterVersionResult struct)
Tests updated to cover the label-based path and the fallback path
Activity
github-actions commentedon Sep 15, 2026
Thanks for opening this issue! 🎉
A maintainer will triage it within 5 business days. You can learn more about our issue workflow in the Issue Lifecycle documentation.
In the meantime, please make sure you have provided:
This helps us route your issue faster.