Commit Graph

12 Commits

Author SHA1 Message Date
navin de3e9cc204
Fixing all deprecated use of sets.String (#2915)
* Fixing all deprecated use of sets.String

* review comments

* Fixing deprecated use of sets.String
2024-01-08 15:21:18 +00:00
Pierangelo Di Pilato 3c4dec9b9f
Take pointer to map in AsOptionalMap for consistency (#2460)
* Take pointer to map in AsOptionalMap for consistency

- Other `As*` functions take pointers.
- It avoids having to initialize the map passed to the function

Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>

* Remove double pointer

Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>

* AsOptionalMap -> CollectMapEntriesWithPrefix

Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
2022-03-14 09:45:18 -07:00
Pierangelo Di Pilato fe26417344
Allow overriding lease name for a reconciler (#2435)
Add a `map-lease-prefix` prefix for config keys for
`config-leader-election` that is a map from a generated lease prefix
to a new prefix:

```yaml
map-lease-prefix.<component>.<package>.<reconciler_type_name>: <new_prefix>
map-lease-prefix.<component-x>.<package-x>.<reconciler_type_name-x>: <new_prefix>
```

Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
2022-02-28 11:55:09 -08:00
Pierangelo Di Pilato 7f59158fb3
Add ConfigMap parsing for int16 (#2365)
Signed-off-by: Pierangelo Di Pilato <pdipilat@redhat.com>
2021-11-29 06:10:04 -08:00
jwcesign a94f5f07b3
Trim the space in configmap/registriesSkippingTagResolving's url. (#2231)
* Trim space of confguration registriesSkippingTagResolving's url, delete
head's and tail's space

* Add test case for trim spaces
2021-08-24 05:08:23 -07:00
runzexia 20310686ae
configmap parse int (#1777)
* configmap parse int

Signed-off-by: RyderXia <ryder.xia@sap.com>

* Update configmap/parse.go

Co-authored-by: Markus Thömmes <markusthoemmes@me.com>

Co-authored-by: Markus Thömmes <markusthoemmes@me.com>
2020-10-28 04:58:34 -07:00
Victor Agababov 2465d13e72
Switch bool parsing to the real parser (#1651)
* Switch bool parsing to the real parser

We parse junk as false, but that's not really corect

* fix comment

* 2
2020-08-25 18:35:06 -07:00
Dave Protasowski 20e1d27cd6
add helper to parse namespaced names (#1600)
* add helper to parse namespaced names

* address feedback

* drop comment & re-order checks

* address vagababov feedback

* add optional method and include note about namespace being required
2020-08-10 15:00:05 -07:00
Matt Moore 7df8fc5d77
Implement the first wave of per-reconciler leaderelection. (#1301)
* Implement the first wave of per-reconciler leaderelection.

Detailed design: https://docs.google.com/document/d/1i_QHjQO2T3SNv49xjZLWlivcc0UvZN1Tbw2NKxThkyM/edit#
Issue: https://github.com/knative/pkg/issues/1181

* Feedback from vagababov

* Feedback from yanweiguo

* Drop IsLeaderFor from the LeaderAware interface.

* Moar vagababov nits

* dprotaso feedback

* Add issue comment, error return

* Incorporate dprotaso test feedback
2020-06-18 19:07:25 -07:00
Julian Friedman 6eb9fa1546
Add AsQuantity to configmap parser (#1362) 2020-05-28 10:23:01 -07:00
Markus Thömmes 60f4ae1dbe
Use config map parsing lib and enhance it further. (#1335)
* Use config map parsing lib and enhance it further.

* Unexport test struct values.

* Migrate tracing config too.

* Use sample-rate.
2020-05-18 10:42:06 -07:00
Markus Thömmes a43a1b10f2
Add a library to parse config map values. (#1329)
* Add a library to parse config map values.

* Add AsString and comments.

* Add ParseFunc type.
2020-05-14 09:17:00 -07:00