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

Spec is nice, but status is twice as nice #18

Open
n3wscott opened this issue May 26, 2021 · 0 comments
Open

Spec is nice, but status is twice as nice #18

n3wscott opened this issue May 26, 2021 · 0 comments
Labels
schema Shape of YAMLs

Comments

@n3wscott
Copy link

In kube-native resource definitions, we see a lot of implementations that neglect to define the expected shape of the status, but it is vital as the specification to define the minimum shape expected for a status of an observed resource.spec. Without this, observers of the resource will be unable to reconcile their state with the resource.

I recommend adding metadata.generation, this is the mutation count for .spec changes.

Then the minimum .status shape should be:

status:
  observedGeneration: <int> # generation of observed spec of resource.
  conditions:                            # array of conditions
    - lastTransitionTime: <datetime> # in kube api datetime of last meaningful transition of status.
      status: <triloolean> # "True", "False", "Unknown"
      type: Ready # the string "Ready"

@ian-bartholomew ian-bartholomew added this to the v1.0.0 milestone Jul 14, 2021
@programmer04 programmer04 removed this from the v1.0.0 milestone Jun 28, 2022
@programmer04 programmer04 added the schema Shape of YAMLs label Dec 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
schema Shape of YAMLs
Projects
None yet
Development

No branches or pull requests

3 participants