Skip to content
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

add default printer columns #174

Merged
merged 1 commit into from
Sep 22, 2023

Conversation

kevinrizza
Copy link
Member

Add printer columns to catalog API. Adds Phase as well as Age printer columns

Resolves #172

@fgiloux
Copy link

fgiloux commented Sep 20, 2023

As a side effect related to this PR: Phase is deprecated in the API conventions.
"Some resources in the v1 API contain fields called phase, and associated message, reason, and other status fields. The pattern of using phase is deprecated. Newer API types should use conditions instead. Phase was essentially a state-machine enumeration field, that contradicted system-design principles and hampered evolution, since adding new enum values breaks backward compatibility. Rather than encouraging clients to infer implicit properties from phases, we prefer to explicitly expose the individual conditions that clients need to monitor. Conditions also have the benefit that it is possible to create some conditions with uniform meaning across all resource types, while still exposing others that are unique to specific resource types. See #7856 for more details and discussion."

@@ -47,6 +47,8 @@ const (
//+kubebuilder:object:root=true
//+kubebuilder:resource:scope=Cluster
//+kubebuilder:subresource:status
//+kubebuilder:printcolumn:name="Catalog Phase",type=string,JSONPath=`.status.phase`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: I think just "Phase" is probably fine here

@joelanford
Copy link
Member

@fgiloux I made #175 to capture your comment.

Signed-off-by: kevinrizza <krizza@redhat.com>
@kevinrizza
Copy link
Member Author

I updated the printer header from Catalog Phase to just Phase. PTAL :)

@codecov
Copy link

codecov bot commented Sep 21, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (20d83c1) 87.02% compared to head (fb6bfe9) 87.02%.
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #174   +/-   ##
=======================================
  Coverage   87.02%   87.02%           
=======================================
  Files           3        3           
  Lines         131      131           
=======================================
  Hits          114      114           
  Misses         10       10           
  Partials        7        7           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@joelanford
Copy link
Member

Thanks @kevinrizza!

@joelanford joelanford added this pull request to the merge queue Sep 22, 2023
Merged via the queue into operator-framework:main with commit 7f903c6 Sep 22, 2023
10 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.

Add printer column for Catalog phase
4 participants