Documentation ¶
Overview ¶
Package provisioners provides a mapping between CertificateRequest and the Cloudflare API, with credentials already bounded by an OriginIssuer.
Index ¶
Constants ¶
const (
// The default validity duration, if not provided.
DefaultDurationInternval = 7
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Collection ¶
type Collection struct {
// contains filtered or unexported fields
}
Collection stores cached Provisioners, stored by namespaced names of the issuer.
func CollectionWith ¶
func CollectionWith(items []CollectionItem) *Collection
CollectionWith returns a Collection storing the provided provisioners.
func (*Collection) Load ¶
func (c *Collection) Load(namespacedName types.NamespacedName) (*Provisioner, bool)
Load returns the stored provisioner, or returns false if nothing is cached with the proved namespaced name.
func (*Collection) Store ¶
func (c *Collection) Store(namespacedName types.NamespacedName, provisioner *Provisioner)
Store adds a provisioner to the collection.
type CollectionItem ¶
type CollectionItem struct { NamespacedName types.NamespacedName Provisioner *Provisioner }
A CollectionItem allows for the namespaced name and provisioner to be stored together.
type Provisioner ¶
type Provisioner struct {
// contains filtered or unexported fields
}
Provisioner allows for CertificateRequests to be signed using the stored Cloudflare API client.
func New ¶
func New(client cfapi.Interface, reqType v1.RequestType, log logr.Logger) (*Provisioner, error)
New returns a new provisioner.
func (*Provisioner) Sign ¶
func (p *Provisioner) Sign(ctx context.Context, cr *certmanager.CertificateRequest) (certPem []byte, err error)
Sign uses the Cloduflare API to sign a CertificateRequest. The validity of the CertificateRequest is normalized to the closests validity allowed by the Cloudflare API, which make be significantly different than the validity provided.