Commit Graph

27 Commits

Author SHA1 Message Date
Dave Protasowski 8532ae0645
update OWNERS files to use teams with active members (#2672)
* update OWNERS files to use teams with active members

* add eventing-wg leads as approvers to /apis
2023-02-06 16:58:45 +00:00
Clay Kauzlaric 4fd6eb8652
make ChildName produce valid names (#2660)
* removes trailing "." in addition to "-"
* test checks for valid DNS1123Subdomain now
2022-12-21 23:09:56 +00:00
Dave Protasowski a99300deff
kmap (#2354)
* move some functional map operations to it's own package

* include a new accessor helper for migrating key names

* use kmap methods

* add deprecation notices

* fix boilerplate

* Rename Accessor to OrderedLookup
2021-11-19 09:07:23 -08:00
Evan Anderson 728bc4ad4e
Update OWNERS_ALIASES to match autogen in community (#2078) 2021-04-08 07:42:51 -07:00
Markus Thömmes 385c8b9c0e
Fix nolint warnings and adhere to best practices (#1823) 2020-10-20 09:33:59 -07:00
Josh Soref b39d5da935
Spelling (#1797)
* spelling: adopted

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: aliased

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: apierrs

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: assignment

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: available

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: coexistence

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: commit

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: conversions

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: creates

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: custom

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: determine

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: different

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: distribution

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: duplicate

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: editing

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: endpoint

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: environment

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: generate

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: implementation

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: identified

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: ignore

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: indicates

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: interface

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: interleaved

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: labels

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: label

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: mimic

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: namespaced

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: necessary

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: organization

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: populatable

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: prometheus

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: refer

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: reference

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: repetitive

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: response

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: something

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: specable

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: spoofing

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: synchronized

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: this

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: trailing

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: unsupported

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: validation

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* chore: reviewdog go header boilerplate

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
2020-10-18 14:22:57 -07:00
Victor Agababov a371418524
v2 (#1754) 2020-09-29 13:18:29 -07:00
Markus Thömmes e4ecf702a3
Apply gosec checks to the codebase, except tests. (#1725)
* Apply gosec checks to the codebase, except tests.

* Fix YAML whitespace.

* Tune back file mode change and add a comment.
2020-09-22 08:55:40 -07:00
Victor Agababov 495174c966
Make UnionMaps variadic! (#1360)
Thanks @dprotaso for the suggestion.
2020-05-26 19:47:49 -07:00
Matt Moore bb008a5b53
Move map functions to PKG (#1126) 2020-02-24 20:57:50 -08:00
Victor Agababov e73c8084c2 Fix a typo in the comment (#962) 2019-12-23 14:38:26 -08:00
Victor Agababov 731f943e4f Fix the childname where trimming caused a dash. (#928)
If suffix name itself contained dashes, when we append the trimmed suffix
we might end up on the dash, which is a non valid k8s name.
So fix that.

/assign mattmoor
2019-12-08 14:12:44 -08:00
Dave Protasowski f9aa7d2d11 pull out object reference helper function (#733) 2019-10-01 07:09:06 -07:00
Matt Moore e4ac97c252 Update our dependency on K8s libs to 1.15.3 (#686)
With a minimum K8s version of 1.14 (starting in 0.10), 1.15.3 puts us in the center of the +/-1 version window of support.
2019-09-18 13:36:48 -07:00
Victor Agababov 8a10634b4f Fix the panics in the naming functions. (#556)
currently if the suffix is longer than 31 characters the function would panic.
This fixes that by adding additional checks and trimming. Plus in this case
it will hash the whole string, to ensure uniqueness.

/assign @mattmoor
2019-08-02 14:48:46 -07:00
Victor Agababov 74c5d67ea0 Fix the issues pointed out by staticcheck (#541)
* Fix the issues pointed out by staticcheck

* review fix
2019-07-23 13:13:36 -07:00
Zhimin Xiang 83cfa18c15 add OwnerRefableAccessor into kmeta (#535) 2019-07-18 17:15:29 -07:00
Matt Moore 222dd25986 Migrate pkg to use the knative.dev/pkg import path (#489)
* Manual changes.

* scripted changes.
2019-06-26 13:02:06 -07:00
Victor Agababov 55ded05b4e Upstream ChildName to the pkg (#471) 2019-06-18 18:43:46 -07:00
Adriano Cunha c0132d9dde Update OWNERS to use OWNERS_ALIASES (#422) 2019-05-29 20:04:33 -07:00
lichuqiang af2c4bc84e Update OnChanged in tracker to support deletion events (#160)
* define kmeta.Accessor interface

* update tracker and EnsureTypeMeta to support deletion events
2018-11-05 08:21:35 -08:00
Matt Moore 35322088a8 Move the `getObject` method into `kmeta` (#155)
This promotes the private deletion-handling helper wrapping `meta.Accessor` into `kmeta`.  The wordy name is based on the wordier `cache.DeletionHandlingMetaNamespaceKeyFunc`, since it serves a similar purpose.
2018-11-01 18:48:34 -07:00
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
jonjohnsonjr 2a7e950c4e Rename kmeta.NewOwnerReference to NewControllerRef (#70)
This is more accurate, since we're creating a controller ref (and keeps
the naming consistent with metav1).

Also, adds a test!
2018-09-13 15:01:16 -07:00
jonjohnsonjr bfddf2d91b Introduce an OwnerRefable interface (#69)
* Introduce an OwnerRefable interface

An OwnerRefable type provides sufficient information that we can
construct a metav1.OwnerReference from it, e.g. for
kmeta.NewOwnerReference, which does just that.

* Move interface to kmeta
2018-09-13 14:14:16 -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