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

API conventions: CRD columns: status vs intent #5332

Closed
Tracked by #10852
sbueringer opened this issue Sep 27, 2021 · 14 comments
Closed
Tracked by #10852

API conventions: CRD columns: status vs intent #5332

sbueringer opened this issue Sep 27, 2021 · 14 comments
Labels
area/api Issues or PRs related to the APIs help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. kind/feature Categorizes issue or PR as related to a new feature. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. triage/accepted Indicates an issue or PR is ready to be actively worked on.

Comments

@sbueringer
Copy link
Member

sbueringer commented Sep 27, 2021

This issue is based on a discussion on: #5304 (comment)

do we may be want to recommend printing status vs intent or do we want to set any convention?
@enxebre

Context: Afaik we cannot have columns in CRDs based on multiple values, e.g. Kubernetes Pod 4/5 containers are ready.
I think the only thing we can do is try to avoid misunderstandings if something is spec or status through good column names. Let's see what we currently have:

I think for a lot of columns the distinction doesn't matter (or is already obvious): e.g.: Cluster, Age, NodeName
It seems like our replica columns are also easy to understand: Replicas is .spec.Replicas and all others are from status, e.g. Ready, Updated, Unavailable
Similar for our "object lifecycle flags", like: Initialized, API Server Available
I think the main problem is when, based on the column name, the column could be spec or status and if the status could be different from spec until the object is entirely reconciled. For me that's mostly Version (although the MHC fields and columns could also need some improvement => #5291).

Regarding Version: One idea to clear this up would be to rename the column in cases where it's not clear to something like SPEC_VERSION or DESIRED_VERSION (I don't have good ideas :)). I think this would apply to Cluster and MachineDeployment (Machines only ever have one version and afaik MachineSets too (?)).

But back to topic, I'm not entirely sure what the convention could or should be. I think for me it would be let's try to make clear through the column name if something is spec or status for fields where there could be misunderstandings.
@sbueringer

I would add the following: (next to the other Note)
NOTE: In cases where it's not clear if the column field is part of spec or status, we SHOULD try to make it obvious by choosing the column name accordingly.
Regarding VERSION. Should we make a change to the VERSION column of Cluster and MachineDeployment before the v1beta1 release? As mentioned, my best idea for another name is probably DESIRED_VERSION (alternative SPEC_VERSION).
@sbueringer

AFAIK we currently are reporting spec, but I'm not sure this is out of chance or intentional.
@fabriziopandini

So there are the following questsions:

  1. Do we want to add the note I suggested above to the API conventions
  2. Do we want to rename the VERSION column in Cluster and MachineDeployment to make it more clear that the version is just the spec and not the status

/kind feature

@k8s-ci-robot k8s-ci-robot added the kind/feature Categorizes issue or PR as related to a new feature. label Sep 27, 2021
@sbueringer sbueringer changed the title API conventions: status vs intent API conventions: CRD columns status vs intent Sep 27, 2021
@sbueringer sbueringer changed the title API conventions: CRD columns status vs intent API conventions: CRD columns: status vs intent Sep 27, 2021
@sbueringer
Copy link
Member Author

/cc @enxebre
/area api

@k8s-ci-robot k8s-ci-robot added the area/api Issues or PRs related to the APIs label Sep 27, 2021
@vincepri
Copy link
Member

Cluster and MachineDeployment could share some of the code from KCP to have a version in Status based on what's running on the cluster.

/milestone v1.0

@k8s-ci-robot k8s-ci-robot added this to the v1.0 milestone Sep 30, 2021
@vincepri
Copy link
Member

/kind cleanup

@k8s-ci-robot k8s-ci-robot added the kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. label Sep 30, 2021
@vincepri vincepri modified the milestones: v1.0, v1.1 Oct 22, 2021
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 20, 2022
@fabriziopandini
Copy link
Member

/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 20, 2022
@fabriziopandini fabriziopandini modified the milestones: v1.1, v1.2 Feb 3, 2022
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label May 4, 2022
@fabriziopandini
Copy link
Member

/lifecycle frozen
/kind api-change

To re-consider for the next API version

@k8s-ci-robot k8s-ci-robot added kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels May 8, 2022
@fabriziopandini
Copy link
Member

/milestone Next

@k8s-ci-robot k8s-ci-robot modified the milestones: v1.2, Next May 8, 2022
@fabriziopandini fabriziopandini added the triage/accepted Indicates an issue or PR is ready to be actively worked on. label Jul 29, 2022
@fabriziopandini fabriziopandini removed this from the Next milestone Jul 29, 2022
@fabriziopandini fabriziopandini removed the triage/accepted Indicates an issue or PR is ready to be actively worked on. label Jul 29, 2022
@fabriziopandini
Copy link
Member

/triage accepted

@k8s-ci-robot k8s-ci-robot added the triage/accepted Indicates an issue or PR is ready to be actively worked on. label Oct 3, 2022
@k8s-triage-robot
Copy link

This issue has not been updated in over 1 year, and should be re-triaged.

You can:

  • Confirm that this issue is still relevant with /triage accepted (org members only)
  • Close this issue with /close

For more details on the triage process, see https://www.kubernetes.dev/docs/guide/issue-triage/

/remove-triage accepted

@k8s-ci-robot k8s-ci-robot added needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. and removed triage/accepted Indicates an issue or PR is ready to be actively worked on. labels Jan 19, 2024
@sbueringer
Copy link
Member Author

/triage accepted

@k8s-ci-robot k8s-ci-robot added triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Jan 19, 2024
@fabriziopandini
Copy link
Member

/priority important-longterm

@k8s-ci-robot k8s-ci-robot added the priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. label Apr 12, 2024
@fabriziopandini fabriziopandini removed the lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. label Apr 16, 2024
@fabriziopandini fabriziopandini added the help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. label May 3, 2024
@sbueringer
Copy link
Member Author

A solution to this is proposed in #10897

/close

@k8s-ci-robot
Copy link
Contributor

@sbueringer: Closing this issue.

In response to this:

A solution to this is proposed in #10897

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/api Issues or PRs related to the APIs help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. kind/feature Categorizes issue or PR as related to a new feature. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

No branches or pull requests

5 participants