controllers

package
v0.11.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 1, 2024 License: BSD-3-Clause Imports: 17 Imported by: 0

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

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

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

Reconcile reconciles OriginIssuer resources by managing Cloudflare API provisioners.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL