Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var (
KeyFunc = cache.DeletionHandlingMetaNamespaceKeyFunc
)
Functions ¶
func CertificateNeedsRenew ¶ added in v0.4.1
func CertificateNeedsRenew(cert *x509.Certificate, renewBeforeDuration time.Duration) bool
func Known ¶
func Known() map[string]Constructor
Known returns a map of the registered controller Constructors
func Register ¶
func Register(name string, fn Constructor)
Register registers a controller constructor with the controller package
Types ¶
type BlockingEventHandler ¶
type BlockingEventHandler struct {
WorkFunc func(obj interface{})
}
BlockingEventHandler is an implementation of cache.ResourceEventHandler that simply synchronously calls it's WorkFunc upon calls to OnAdd, OnUpdate or OnDelete.
func (*BlockingEventHandler) Enqueue ¶
func (b *BlockingEventHandler) Enqueue(obj interface{})
func (*BlockingEventHandler) OnAdd ¶
func (b *BlockingEventHandler) OnAdd(obj interface{})
func (*BlockingEventHandler) OnDelete ¶
func (b *BlockingEventHandler) OnDelete(obj interface{})
func (*BlockingEventHandler) OnUpdate ¶
func (b *BlockingEventHandler) OnUpdate(old, new interface{})
type Constructor ¶
Constructor is a function that creates a new control loop given a controller Context.
type Context ¶
type Context struct { // Client is a Kubernetes clientset Client kubernetes.Interface // CMClient is a cert-manager clientset CMClient clientset.Interface // Recorder to record events to Recorder record.EventRecorder // SharedIndexInformer instances for Kubernetes types KubeSharedInformerFactory kubeinformers.SharedInformerFactory // instances SharedInformerFactory informers.SharedInformerFactory // IssuerFactory is a factory that can be used to obtain issuer.Interface // instances IssuerFactory issuer.Factory // ClusterResourceNamespace is the namespace to store resources created by // non-namespaced resources (e.g. ClusterIssuer) in. ClusterResourceNamespace string // Default issuer/certificates details consumed by ingress-shim DefaultIssuerName string DefaultIssuerKind string DefaultACMEIssuerChallengeType string DefaultACMEIssuerDNS01ProviderName string // RenewBeforeExpiryDuration is the default 'renew before expiry' time for Certificates. // Once a certificate is within this duration until expiry, a new Certificate // will be attempted to be issued. RenewBeforeExpiryDuration time.Duration }
Context contains various types that are used by controller implementations. We purposely don't have specific informers/listers here, and instead keep a reference to a SharedInformerFactory so that controllers can choose themselves which listers are required.
type Interface ¶
Interface represents a controller that can run. 'workers' should be the number of independent goroutines for this controller in question that are to be run, and the workers should shut down upon a signal on stopCh. This method should block until all workers have exited cleanly, thus allowing for graceful shutdown of control loops.
type QueuingEventHandler ¶
type QueuingEventHandler struct {
Queue workqueue.RateLimitingInterface
}
QueuingEventHandler is an implementation of cache.ResourceEventHandler that simply queues objects that are added/updated/deleted.
func (*QueuingEventHandler) Enqueue ¶
func (q *QueuingEventHandler) Enqueue(obj interface{})
func (*QueuingEventHandler) OnAdd ¶
func (q *QueuingEventHandler) OnAdd(obj interface{})
func (*QueuingEventHandler) OnDelete ¶
func (q *QueuingEventHandler) OnDelete(obj interface{})
func (*QueuingEventHandler) OnUpdate ¶
func (q *QueuingEventHandler) OnUpdate(old, new interface{})