Commit Graph

3 Commits

Author SHA1 Message Date
Matt Moore 1a50a39daf Add Generation variants of kmeta/labels.go (#117)
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: https://github.com/knative/pkg/issues/116
2018-10-08 02:14:25 -07:00
Matt Moore d14ed384b0 Switch kmeta/labels to use metav1.ObjectMetaAccessor (#68) 2018-09-13 11:29:16 -07:00
Matt Moore 5f353e5de8 Create a kmeta package for libraries acting on ObjectMeta. (#67)
This bootstraps this package with a useful collection of label methods for managing sub-resources.  I'd initially written this as a way of managing versioned DaemonSet resources as part of WarmImage ([see here](62cad8045a/pkg/reconciler/warmimage/resources/meta.go (L28))).

I am upstreaming this here because I want to take advantage of it in Build for managing Image cache subresources of [Cluster]BuildTemplate resources.
2018-09-13 10:45:16 -07:00