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

Generation variant of kmeta/labels.go #116

Closed
mattmoor opened this issue Oct 7, 2018 · 0 comments
Closed

Generation variant of kmeta/labels.go #116

mattmoor opened this issue Oct 7, 2018 · 0 comments

Comments

@mattmoor
Copy link
Member

mattmoor commented Oct 7, 2018

This code deals with ResourceVersion. The current use of ResourceVersion stems from the Kubernetes bug where it fails to bump Generation for CRDs (still affects us until we move to 1.11 w/ /status subresource).

For CRDs without status (e.g. WarmImage, BuildTemplate) ResourceVersion is a useful stand-in because it changes at roughly the same pace as Spec.

However, for resources with status (e.g. Revision, or K8s resources) the methods we have are of limited use because they are too high-churn; this is because ResourceVersion will change every time /status changes as well, making the current methods unsuitable for child-resource instantiation for these parent resources.

These Generation variants will only be useful for our own CRDs once we're on 1.11, but once we are they should become the standard way of achieving this.

@mattmoor mattmoor self-assigned this Oct 7, 2018
mattmoor added a commit to mattmoor/pkg that referenced this issue Oct 7, 2018
Unlike `ResourceVersion`, which changes whenever the resource changes at all (including `/status` which can be high churn), `Generation` only changes when the `/spec` of a CRD changes (for CRDs starting in 1.11, right now they are locked at `generation: 1`).

These methods are useful for interacting with K8s resource now, and will be useful for CRDs soon.

Fixes: knative#116
knative-prow-robot pushed a commit that referenced this issue Oct 8, 2018
Unlike `ResourceVersion`, which changes whenever the resource changes at all (including `/status` which can be high churn), `Generation` only changes when the `/spec` of a CRD changes (for CRDs starting in 1.11, right now they are locked at `generation: 1`).

These methods are useful for interacting with K8s resource now, and will be useful for CRDs soon.

Fixes: #116
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants