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

Report Resource Generation on byPod Status of Constraints/Templates #444

Closed
maxsmythe opened this issue Jan 29, 2020 · 3 comments
Closed

Comments

@maxsmythe
Copy link
Contributor

Currently we are reporting whether constraints/templates are being enforced, but not which version of those constraints/templates are being enforced.

K8s has the concept of resource generations, which can be a way to track which resource generation has most recently synced.

We should add a field to the byPod status for Constraints and Templates saying what the last synced generation is. This will allow users to detect drift.

@maxsmythe
Copy link
Contributor Author

@EmandM This is the change I was talking about in the meeting LMK if you think you'd have the bandwidth to add this

@shomron You had mentioned adding more context around the concept of generations to this bug.

@shomron
Copy link
Contributor

shomron commented Jan 30, 2020

@maxsmythe Yes, I explored this topic recently and you might find these links useful:

  1. One of the early discussions where the concept was introduced.
  2. Merged PR for incrementing metadata.generation of custom resources based on non-metadata, non-status changes: The metadata.generation of a Custom Resource is always incremented kubernetes/kubernetes#69059
    Good read, see specifically this comment.
  3. Today's implementation of the above in apiextensions-apiserver.
  4. Another comment on why annotations / metadata are excluded.
  5. From api-conventions/typical status properties:

Some resources report the observedGeneration, which is the generation most recently observed by the component responsible for acting upon changes to the desired state of the resource. This can be used, for instance, to ensure that the reported status reflects the most recent desired status.

I hope you find these useful!

@maxsmythe
Copy link
Contributor Author

Fixed by #451

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

No branches or pull requests

2 participants