Skip to content

fix kubectl active printcolumn selector #1248

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

wozniakjan
Copy link
Member

The printcolumn condition is selecting based on wrong selector resulting in always stating empty string in the ACTIVE column.

$ k get httpso
NAME   TARGETWORKLOAD            TARGETSERVICE   MINREPLICAS   MAXREPLICAS   AGE   ACTIVE
demo   apps/v1/Deployment/demo   demo:8080       0             10            66m   

This is because somehow all condition type values are always just Ready

$ k get httpso demo -o yaml | yq '.status.conditions'
- message: Identified HTTPScaledObject creation signal
  reason: PendingCreation
  status: Unknown
  timestamp: "2025-02-10T13:37:50Z"
  type: Ready
- message: App ScaledObject created
  reason: AppScaledObjectCreated
  status: "True"
  timestamp: "2025-02-10T13:37:50Z"
  type: Ready
- message: Finished object creation
  reason: HTTPScaledObjectIsReady
  status: "True"
  timestamp: "2025-02-10T13:37:50Z"
  type: Ready

There are some discrepancies with how conditions are handled in the addon and how usually they are handled in kubernetes API so I would like to propose just a simple fix for the selector. With this fix kubectl at least displays correctly

$ kubectl get httpso
NAME   TARGETWORKLOAD            TARGETSERVICE   MINREPLICAS   MAXREPLICAS   AGE   ACTIVE
demo   apps/v1/Deployment/demo   demo:8080       0             10            70m   True

Checklist

  • Commits are signed with Developer Certificate of Origin (DCO)
  • Changelog has been updated and is aligned with our changelog requirements

Fixes ##1211

@wozniakjan wozniakjan requested a review from a team as a code owner February 10, 2025 14:47
@JorTurFer JorTurFer merged commit 6d76063 into kedacore:main Feb 10, 2025
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants