Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClientWithKey ¶
func ClientWithKey(iss cmapi.GenericIssuer, pk *rsa.PrivateKey) (acme.Interface, error)
ClientWithKey will construct a new ACME client for the provided Issuer, using the given RSA private key.
func PrivateKeySelector ¶
func PrivateKeySelector(sel cmapi.SecretKeySelector) cmapi.SecretKeySelector
PrivateKeySelector will default the SecretKeySelector with a default secret key if one is not already specified.
Types ¶
type Helper ¶
type Helper struct { SecretLister corelisters.SecretLister ClusterResourceNamespace string }
Helper is a structure that provides 'glue' between cert-managers API types and constructs, and ACME clients. For example, it can be used to obtain an ACME client for a IssuerRef that is correctly configured (e.g. with user agents, timeouts, proxy handling etc)
func NewHelper ¶
func NewHelper(lister corelisters.SecretLister, ns string) *Helper
NewHelper is a helper that constructs a new Helper structure with the given secret lister.
func (*Helper) ClientForIssuer ¶
ClientForIssuer will return a properly configure ACME client for the given Issuer resource. If the private key for the Issuer does not exist, an error will be returned. If the provided issuer is not an ACME Issuer, an error will be returned.
func (*Helper) ReadPrivateKey ¶
func (h *Helper) ReadPrivateKey(sel cmapi.SecretKeySelector, ns string) (*rsa.PrivateKey, error)
ReadPrivateKey will attempt to read and parse an ACME private key from a secret. If the referenced secret or key within that secret does not exist, an error will be returned. A *rsa.PrivateKey will be returned here, as ACME private keys can currently only be RSA.