Documentation ¶
Index ¶
- Constants
- func CertSourceController(source CertSourceType, reconcilerType controller.ReconcilerType) controller.Configuration
- func DomainsString(domains []string) string
- func MasterResourcesType(kind schema.GroupKind) reconcilers.Resources
- func SlaveReconcilerType(c controller.Interface) (reconcile.Interface, error)
- func SrcReconciler(sourceType CertSourceType, rtype controller.ReconcilerType) controller.ReconcilerType
- type CertCurrentState
- type CertFeedback
- type CertInfo
- type CertSource
- type CertSourceCreator
- type CertSourceType
- type CertState
- type CertTargetExtractor
- type CertsInfo
- type DefaultCertSource
- func (s *DefaultCertSource) Delete(logger logger.LogContext, obj resources.Object) reconcile.Status
- func (s *DefaultCertSource) Deleted(logger logger.LogContext, key resources.ClusterObjectKey)
- func (s *DefaultCertSource) GetCertsInfo(logger logger.LogContext, obj resources.Object, current *CertCurrentState) (*CertsInfo, error)
- func (s *DefaultCertSource) GetEvents(key resources.ClusterObjectKey) map[string]string
- func (s *DefaultCertSource) NewCertsInfo(logger logger.LogContext, obj resources.Object) *CertsInfo
- func (s *DefaultCertSource) Setup()
- func (s *DefaultCertSource) Start()
- type EventFeedback
Constants ¶
const ( // AnnotDnsnames annotation is shared with dns controller manager AnnotDnsnames = "dns.gardener.cloud/dnsnames" // AnnotDNSClass is the annotation for the dns class AnnotDNSClass = "dns.gardener.cloud/class" // AnnotClass is the annotation for the cert class AnnotClass = "cert.gardener.cloud/class" // AnnotForwardOwnerRefs is the annotation for the forward owner references AnnotForwardOwnerRefs = "cert.gardener.cloud/forward-owner-refs" // AnnotSecretname is the annotation for the secret name AnnotSecretname = "cert.gardener.cloud/secretname" // AnnotIssuer is the annotation for the issuer name AnnotIssuer = "cert.gardener.cloud/issuer" // OptClass is the cert-class command line option OptClass = "cert-class" // OptTargetclass is the target-cert-class command line option OptTargetclass = "cert-target-class" // OptNamespace is the namespace command line option OptNamespace = "target-namespace" // OptNameprefix is the target-name-prefix command line option OptNameprefix = "target-name-prefix" // DefaultClass is the default cert-class DefaultClass = "gardencert" )
Variables ¶
This section is empty.
Functions ¶
func CertSourceController ¶
func CertSourceController(source CertSourceType, reconcilerType controller.ReconcilerType) controller.Configuration
CertSourceController creates a CertSource controller.
func DomainsString ¶
DomainsString creates a comma separated string.
func MasterResourcesType ¶
func MasterResourcesType(kind schema.GroupKind) reconcilers.Resources
MasterResourcesType creates the master resource type interfaces function.
func SlaveReconcilerType ¶
func SlaveReconcilerType(c controller.Interface) (reconcile.Interface, error)
SlaveReconcilerType creates a slaveReconciler.
func SrcReconciler ¶ added in v0.2.10
func SrcReconciler(sourceType CertSourceType, rtype controller.ReconcilerType) controller.ReconcilerType
SrcReconciler create a source reconciler.
Types ¶
type CertCurrentState ¶
CertCurrentState contains the current state.
func (*CertCurrentState) ContainsSecretName ¶
func (s *CertCurrentState) ContainsSecretName(name string) bool
ContainsSecretName returns true if name is in map.
type CertFeedback ¶
type CertFeedback interface { Succeeded() Pending(info *CertInfo, msg string) Ready(info *CertInfo, msg string) Failed(info *CertInfo, err error) }
CertFeedback is an interface for reporting certificate status.
func NewEventFeedback ¶
func NewEventFeedback(logger logger.LogContext, obj resources.Object, events map[string]string) CertFeedback
NewEventFeedback creates a new EventFeedback
type CertInfo ¶
CertInfo contains basic certificate data.
func (CertInfo) DomainsString ¶
DomainsString returns all domains as comma separated string (common name and DNS names)
type CertSource ¶
type CertSource interface { Start() Setup() GetCertsInfo(logger logger.LogContext, obj resources.Object, current *CertCurrentState) (*CertsInfo, error) Delete(logger logger.LogContext, obj resources.Object) reconcile.Status Deleted(logger logger.LogContext, key resources.ClusterObjectKey) }
CertSource is...
type CertSourceCreator ¶
type CertSourceCreator func(controller.Interface) (CertSource, error)
CertSourceCreator is type for creator.
type CertSourceType ¶
type CertSourceType interface { Name() string GroupKind() schema.GroupKind Create(controller.Interface) (CertSource, error) }
CertSourceType provides basic functionalilty.
func NewCertSourceTypeForCreator ¶
func NewCertSourceTypeForCreator(name string, kind schema.GroupKind, handler CertSourceCreator) CertSourceType
NewCertSourceTypeForCreator creates CertSourceType for creator.
func NewCertSourceTypeForExtractor ¶
func NewCertSourceTypeForExtractor(name string, kind schema.GroupKind, handler CertTargetExtractor) CertSourceType
NewCertSourceTypeForExtractor creates CertSourceType for extractor.
type CertState ¶
type CertState struct { // Spec is original spec from CR. Spec api.CertificateSpec // State is the state string. State string // Message is the optional status or error message. Message *string // CreationTimestamp contains the creation timestamp of the certificate. CreationTimestamp metav1.Time }
CertState contains internal certificate state.
type CertTargetExtractor ¶
type CertTargetExtractor func(logger logger.LogContext, obj resources.Object, current *CertCurrentState) (string, error)
CertTargetExtractor is type for extractor.
type CertsInfo ¶
type CertsInfo struct { Certs map[string]CertInfo Feedback CertFeedback }
CertsInfo contains a map of CertInfo.
type DefaultCertSource ¶
type DefaultCertSource struct { Events map[resources.ClusterObjectKey]map[string]string // contains filtered or unexported fields }
DefaultCertSource is the standard CertSource implementation.
func NewDefaultCertSource ¶
func NewDefaultCertSource(handler CertTargetExtractor, _ schema.GroupKind) DefaultCertSource
NewDefaultCertSource creates a DefaultCertSource
func (*DefaultCertSource) Delete ¶
func (s *DefaultCertSource) Delete(logger logger.LogContext, obj resources.Object) reconcile.Status
Delete deleted a object.
func (*DefaultCertSource) Deleted ¶
func (s *DefaultCertSource) Deleted(logger logger.LogContext, key resources.ClusterObjectKey)
Deleted performs cleanup.
func (*DefaultCertSource) GetCertsInfo ¶
func (s *DefaultCertSource) GetCertsInfo(logger logger.LogContext, obj resources.Object, current *CertCurrentState) (*CertsInfo, error)
GetCertsInfo fills a CertsInfo for an object.
func (*DefaultCertSource) GetEvents ¶
func (s *DefaultCertSource) GetEvents(key resources.ClusterObjectKey) map[string]string
GetEvents returns the events for a cluster object key.
func (*DefaultCertSource) NewCertsInfo ¶
func (s *DefaultCertSource) NewCertsInfo(logger logger.LogContext, obj resources.Object) *CertsInfo
NewCertsInfo creates a CertsInfo
type EventFeedback ¶
type EventFeedback struct {
// contains filtered or unexported fields
}
EventFeedback is struct to store events
func (*EventFeedback) Failed ¶
func (f *EventFeedback) Failed(info *CertInfo, err error)
Failed adds a failed event.
func (*EventFeedback) Pending ¶
func (f *EventFeedback) Pending(info *CertInfo, msg string)
Pending adds a pending event.
func (*EventFeedback) Ready ¶
func (f *EventFeedback) Ready(info *CertInfo, msg string)
Ready adds a ready event
func (*EventFeedback) Succeeded ¶
func (f *EventFeedback) Succeeded()
Succeeded addas a succeeded event.