Skip to content

[FEAT cloudctl] - cluster-version command should read version from ClusterKubeconfig label #81

Closed

Description

@onuryilmaz

User Story

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:

  1. Primary path: read the version from the greenhouse.sap/kubernetes-version label on the ClusterKubeconfig resource (when available) — no live API call required
  2. 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

Reference Issues

cloudoperators/greenhouse#2213

Activity

  1. added
    featureNew functional capabilities or significant additions to the CLI.
    on Sep 15, 2026
  2. github-actions commented on Sep 15, 2026

    @github-actions

    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:

    • A clear problem statement
    • Steps to reproduce (for bugs)
    • Expected vs actual behavior

    This helps us route your issue faster.

  3. self-assigned this
    on Sep 15, 2026
  4. moved this from Sprint Backlog to Done in Greenhouse Core Roadmapon Sep 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

featureNew functional capabilities or significant additions to the CLI.needs-triageNew issue, not yet reviewed

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions