cloudflare / cloudflare/certmgr
Feature: Certmgr as an in-process supervisor
- Dominant language
- Go
- Stars
- 233
- Forks
- 43
- PR merge metrics
- No merged PRs in 30d
Description
Problem:
Currently it's difficult to use certmgr as an in-process supervisor.
Use case:
I am a go library that doesn't want to require my customers to configure Certmgr with cert.Spec JSON files, instead letting them pass in configuration via function parameters.
Potential Solution:
1. Remove the checked-in [vendor](https://github.com/cloudflare/certmgr/tree/649461c5d4655a6f43fba40d36968f96d3669fba/vendor) directory. This causes type issues when using certmgr as a library.
2. Expose the [svcmgr.Manager interface](https://github.com/cloudflare/certmgr/blob/649461c5d4655a6f43fba40d36968f96d3669fba/mgr/manager.go#L37-L38) on Manager (either within the Manager struct or via a constructor). This will enable users of certmgr to pass in their own svcmgr.Manager implementations, enabling users to restart/reload their process as needed.
3. Don't require cert.Spec to exist on the filesystem. Currently the [Load()](https://github.com/cloudflare/certmgr/blob/649461c5d4655a6f43fba40d36968f96d3669fba/mgr/manager.go#L206) function initializes the renew channel. This makes it impossible to configure certmgr without writing a Spec to the filesystem, which is cumbersome from a library perspective.
Contributor guide
Assessment
This issue has not been assessed yet.