* pull config map parsing into separate package
We want to parse these configmaps but not don't want a heavy dependency on k/k libs
* fix linter warnings
* retain existing error message
* 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>
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>