source

package
v0.2.9 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2019 License: Apache-2.0, MIT Imports: 18 Imported by: 7

Documentation

Index

Constants

View Source
const (
	// ANNOT_DNSNAMES annotation is shared with dns controller manager
	ANNOT_DNSNAMES           = "dns.gardener.cloud/dnsnames"
	ANNOT_CLASS              = "cert.gardener.cloud/class"
	ANNOT_FORWARD_OWNER_REFS = "cert.gardener.cloud/forward-owner-refs"
	ANNOT_SECRETNAME         = "cert.gardener.cloud/secretname"
	ANNOT_ISSUER             = "cert.gardener.cloud/issuer"

	OPT_CLASS       = "cert-class"
	OPT_TARGETCLASS = "cert-target-class"
	OPT_NAMESPACE   = "target-namespace"
	OPT_NAMEPREFIX  = "target-name-prefix"

	DefaultClass = "gardencert"
)

Variables

Functions

func CertSourceController

func CertSourceController(source CertSourceType, reconcilerType controller.ReconcilerType) controller.Configuration

func DomainsString

func DomainsString(domains []string) string

func MasterResourcesType

func MasterResourcesType(kind schema.GroupKind) reconcilers.Resources

func SlaveReconcilerType

func SlaveReconcilerType(c controller.Interface) (reconcile.Interface, error)

func SourceReconciler

func SourceReconciler(sourceType CertSourceType, rtype controller.ReconcilerType) controller.ReconcilerType

Types

type CertCurrentState

type CertCurrentState struct {
	CertStates map[string]*CertState
}

func (*CertCurrentState) ContainsSecretName

func (s *CertCurrentState) ContainsSecretName(name string) bool

type CertFeedback

type CertFeedback interface {
	Succeeded()
	Pending(info *CertInfo, msg string)
	Ready(info *CertInfo, msg string)
	Failed(info *CertInfo, err error)
}

func NewEventFeedback

func NewEventFeedback(logger logger.LogContext, obj resources.Object, events map[string]string) CertFeedback

type CertInfo

type CertInfo struct {
	SecretName string
	Domains    []string
	IssuerName *string
}

func (CertInfo) DomainsString

func (info CertInfo) DomainsString() string

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)
}

type CertSourceCreator

type CertSourceCreator func(controller.Interface) (CertSource, error)

type CertSourceType

type CertSourceType interface {
	Name() string
	GroupKind() schema.GroupKind
	Create(controller.Interface) (CertSource, error)
}

func NewCertSourceTypeForCreator

func NewCertSourceTypeForCreator(name string, kind schema.GroupKind, handler CertSourceCreator) CertSourceType

func NewCertSourceTypeForExtractor

func NewCertSourceTypeForExtractor(name string, kind schema.GroupKind, handler CertTargetExtractor) CertSourceType

type CertState

type CertState struct {
	Spec              api.CertificateSpec
	State             string
	Message           *string
	CreationTimestamp metav1.Time
}

type CertTargetExtractor

type CertTargetExtractor func(logger logger.LogContext, obj resources.Object, current *CertCurrentState) (string, error)

type CertsInfo

type CertsInfo struct {
	Certs    map[string]CertInfo
	Feedback CertFeedback
}

type DefaultCertSource

type DefaultCertSource struct {
	Events map[resources.ClusterObjectKey]map[string]string
	// contains filtered or unexported fields
}

func NewDefaultCertSource

func NewDefaultCertSource(handler CertTargetExtractor, _ schema.GroupKind) DefaultCertSource

func (*DefaultCertSource) Delete

func (*DefaultCertSource) Deleted

func (this *DefaultCertSource) Deleted(logger logger.LogContext, key resources.ClusterObjectKey)

func (*DefaultCertSource) GetCertsInfo

func (this *DefaultCertSource) GetCertsInfo(logger logger.LogContext, obj resources.Object, current *CertCurrentState) (*CertsInfo, error)

func (*DefaultCertSource) GetEvents

func (this *DefaultCertSource) GetEvents(key resources.ClusterObjectKey) map[string]string

func (*DefaultCertSource) NewCertsInfo

func (this *DefaultCertSource) NewCertsInfo(logger logger.LogContext, obj resources.Object) *CertsInfo

func (*DefaultCertSource) Setup

func (this *DefaultCertSource) Setup()

func (*DefaultCertSource) Start

func (this *DefaultCertSource) Start()

type EventFeedback

type EventFeedback struct {
	// contains filtered or unexported fields
}

func (*EventFeedback) Failed

func (this *EventFeedback) Failed(info *CertInfo, err error)

func (*EventFeedback) Pending

func (this *EventFeedback) Pending(info *CertInfo, msg string)

func (*EventFeedback) Ready

func (this *EventFeedback) Ready(info *CertInfo, msg string)

func (*EventFeedback) Succeeded

func (this *EventFeedback) Succeeded()

Jump to

Keyboard shortcuts

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