Skip to content

💡PROPOSAL: Automate generation and injection of the webhook related certificates #318

@p-strusiewiczsurmacki-mobica

Description

What

As per #313 - currently Coil (by default) uses certificates generated with make cert (which uses internal tool) for webhooks, or user has to incorporate other cert-generation tools (like. e.g. cert-manager). We would like to streamline this process by incorporating open-policy-agent/cert-controller into Coil.

How

Cert-controller is based on controller-runtime - it can be added to the controller-runtime's manager and started with mgr.Start().

The workflow look as follows:

  1. Add cert-controller to the manager.
  2. Move all manager-related setup logic to goroutine that waits for cert-controller to finish certificate generation and injection.
  3. Start manager in goroutine so it won't block the main thread.
  4. Watch for both of the goroutines completion/errors.

The general plan for implementation would be:

  • 1. Add cert-manager to coil-ipam-controller and coil-egress-controller (both have webhooks).
  • 2. Change customization files to not use webhook injection patches as default.
  • 3. Decide to what to do with v2/cmd/gencert and add relevant changes.
  • 4. Update tests - as certificates are generated and injected after Coil's start there might be a delay between the start and reaching the full operability state, therefore tests should reflect that.
  • 5. Update relevant docs - e.g. quick start guide, e2e guide etc.

Checklist

  • Finish implentation of the issue
  • Test all functions
  • Have enough logs to trace activities
  • Notify developers of necessary actions

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions