opendatahub-io / opendatahub-operator

Open Data Hub operator to manage ODH component integrations
https://opendatahub.io
Apache License 2.0
59 stars 127 forks source link

Add .status.phase to printed columns #1086

Open akram opened 2 months ago

akram commented 2 months ago

fixes https://issues.redhat.com/browse/RHOAIENG-9101

Description

Adds status.phase to printed colums.

How Has This Been Tested?

Before:

$ oc get dsc
NAME               AGE
default-dsc      86m

Then:

$ oc replace -f oc replace  -f bundle/manifests/datasciencecluster.opendatahub.io_datascienceclusters.yaml
customresourcedefinition.apiextensions.k8s.io/datascienceclusters.datasciencecluster.opendatahub.io replaced

After:

$ oc get dsc
NAME          STATUS   AGE
default-dsc   Ready    86m
openshift-ci[bot] commented 2 months ago

Hi @akram. Thanks for your PR.

I'm waiting for a opendatahub-io member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.
zdtsw commented 2 months ago

thanks for the PR!

I am fine with "Age" to be printed out but I would hold "Status" for a while. We have an ongoing issue https://issues.redhat.com/browse/RHOAIENG-408 which need to sort out which value to be set in the "Status" first.

zdtsw commented 2 months ago

maybe what you really want to add is a new field of "Created At" ? //+kubebuilder:printcolumn:name="Created At",type=string,JSONPath=.metadata.creationTimestamp if Age has been included before this PR

akram commented 2 months ago

Name and Age are the default 2 columns that are always printed if developer doesn't set anything. If kubebuilder:printcolumn is added, it will add the specified column after the Name and nothing else except what is specified by kubebuilder:printcolumn . This is why I re-added Age.

Age is also the default label used to display .metadata.creationTimestamp . If you run for example oc get pods , you will get amongst other things, Name and Age.

I see for the .status value issue. Does it prevent from displaying the value even if it is incorrect?

zdtsw commented 1 month ago

/ok-to-test

openshift-ci[bot] commented 1 month ago

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Once this PR has been reviewed and has the lgtm label, please assign jackdelahunt for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files: - **[OWNERS](https://github.com/opendatahub-io/opendatahub-operator/blob/incubation/OWNERS)** Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
ajaypratap003 commented 2 days ago

@zdtsw This is very old PR. Changes looks fine. Should we merge this PR ?