Documentation ¶
Overview ¶
Package controllers implements the OriginIssuer and CertificateRequest Kubernetes controllers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IssuerStatusHasCondition ¶ added in v0.9.0
func IssuerStatusHasCondition(status v1.OriginIssuerStatus, c v1.OriginIssuerCondition) bool
IssuerStatusHasCondition will return true if the given OriginIssuerStatus has a condition matching the provided OriginIssuerCondtion. Only the Type and Status fields are used in the comparison, meaning this function will return `true` even if the Reason, Message, and LastTransitionTime fields do not match.
func SetIssuerStatusCondition ¶ added in v0.9.0
func SetIssuerStatusCondition(ois *v1.OriginIssuerStatus, conditionType v1.ConditionType, status v1.ConditionStatus, log logr.Logger, cl clock.Clock, reason, message string)
SetIssuerStatusCondition will set a condition on the given OriginIssuerStatus.
If no condition of the same type exists, the condition will be inserted with the LastTransitionTime set to the current time.
If a condition of the same type and status already exists, the condition will be updated but the LastTransitionTime will no be modified.
If a condition of the same type and different state already exists, the condition will be updated and the LastTransitionTime set to the current time.
Types ¶
type CertificateRequestController ¶
type CertificateRequestController struct { client.Client Reader client.Reader ClusterResourceNamespace string Log logr.Logger Builder *cfapi.Builder Clock clock.Clock CheckApprovedCondition bool }
CertificateRequestController implements a controller that reconciles CertificateRequests that references this controller.
func (*CertificateRequestController) Reconcile ¶
func (r *CertificateRequestController) Reconcile(ctx context.Context, cr *certmanager.CertificateRequest) (reconcile.Result, error)
Reconcile reconciles CertificateRequest by fetching a Cloudflare API provisioner from the referenced OriginIssuer, and providing the request's CSR.
type ClusterOriginIssuerController ¶ added in v0.9.0
type ClusterOriginIssuerController struct { client.Client Reader client.Reader ClusterResourceNamespace string Log logr.Logger Clock clock.Clock }
ClusterOriginIssuerController implements a controller that watches for changes to OriginIssuer resources.
func (*ClusterOriginIssuerController) Reconcile ¶ added in v0.9.0
func (r *ClusterOriginIssuerController) Reconcile(ctx context.Context, iss *v1.ClusterOriginIssuer) (reconcile.Result, error)
Reconcile reconciles ClusterOriginIssuer resources by managing Cloudflare API provisioners.
type OriginIssuerController ¶
type OriginIssuerController struct { client.Client Reader client.Reader Log logr.Logger Clock clock.Clock }
OriginIssuerController implements a controller that watches for changes to OriginIssuer resources.
func (*OriginIssuerController) Reconcile ¶
func (r *OriginIssuerController) Reconcile(ctx context.Context, iss *v1.OriginIssuer) (reconcile.Result, error)
Reconcile reconciles OriginIssuer resources by managing Cloudflare API provisioners.