Skip to content
This repository has been archived by the owner on Apr 18, 2023. It is now read-only.

Add ConfigMap support to resolvers so they can support admin configuration #14

Closed
ghost opened this issue Mar 15, 2022 · 0 comments · Fixed by #38
Closed

Add ConfigMap support to resolvers so they can support admin configuration #14

ghost opened this issue Mar 15, 2022 · 0 comments · Fixed by #38
Labels
kind/feature Categorizes issue or PR as related to a new feature.

Comments

@ghost
Copy link

ghost commented Mar 15, 2022

Feature request

Right now any resolver based on pkg/resolver/framework does not have an easy way to pull in admin configuration options. In any realistic production-ready resolver it's highly likely that some amount of configuration will be required:

  • timeouts <- this is a big one
  • an allow-list of repositories that a git resolver is able to fetch from
  • the names of secrets to use for auth
  • namespaces of tenants allowed to use the resolver
  • the API endpoint to hit for a private git server
  • ... or any of a thousand different parameters that a resolver developer might want to support

So the feature request is to add a new optional interface for Resolvers to implement. Something like:

// ResolverConfigMap is an optional interface for a resolver to implement that allows it
// to register the name of a configmap that holds its admin settings.
type ResolverConfigMap interface {
  // OnConfigMapUpdate is called whenever the watched configmap changes
  OnConfigMapUpdated(ctx, v1.ConfigMap)
}

If a resolver implements this interface the framework would start monitoring the resolver's ConfigMap using knative's ConfigMap helpers. For inspiration on exact implementation see Tekton Pipeline's Config store codebase.

Use case

  • Allow a resolver developer to support a configmap for storing its admin-level settings.
  • Allow an admin deploying a resolver to configure its settings.

Deliverables

Alongside support in code it would also be useful to add:

@ghost ghost added the kind/feature Categorizes issue or PR as related to a new feature. label Mar 15, 2022
@ghost ghost changed the title Expose gitresolver threadiness as config option Add ConfigMaps to framework.Resolver Apr 6, 2022
@ghost ghost changed the title Add ConfigMaps to framework.Resolver Add ConfigMap support to resolvers so they can support admin configuration fields Apr 6, 2022
@ghost ghost changed the title Add ConfigMap support to resolvers so they can support admin configuration fields Add ConfigMap support to resolvers so they can support admin configuration Apr 6, 2022
@ghost ghost closed this as completed in #38 Apr 10, 2022
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

0 participants