Documentation ¶
Index ¶
- Constants
- func Add(ctx context.Context, mgr manager.Manager, args AddArgs) error
- func ClusterToDNSRecordMapper(mgr manager.Manager, predicates []predicate.Predicate) mapper.Mapper
- func DefaultPredicates(ctx context.Context, mgr manager.Manager, ignoreOperationAnnotation bool) []predicate.Predicate
- func FindZoneForName(zones map[string]string, name string) string
- func GetMetaRecordName(name string) string
- func MatchesDomain(name, domain string) bool
- func NewReconciler(mgr manager.Manager, actuator Actuator) reconcile.Reconciler
- type Actuator
- type AddArgs
Constants ¶
const ( // FinalizerName is the dnsrecord controller finalizer. FinalizerName = "extensions.gardener.cloud/dnsrecord" // ControllerName is the name of the controller ControllerName = "dnsrecord" )
Variables ¶
This section is empty.
Functions ¶
func ClusterToDNSRecordMapper ¶
ClusterToDNSRecordMapper returns a mapper that returns requests for DNSRecords whose referenced clusters have been modified.
func DefaultPredicates ¶
func DefaultPredicates(ctx context.Context, mgr manager.Manager, ignoreOperationAnnotation bool) []predicate.Predicate
DefaultPredicates returns the default predicates for a dnsrecord reconciler.
func FindZoneForName ¶
FindZoneForName returns the zone ID for the longest zone domain from the given zones map that is matched by the given name. If the given name doesn't match any of the zone domains in the given zones map, an empty string is returned.
func GetMetaRecordName ¶
GetMetaRecordName returns the meta record name for the given name.
func MatchesDomain ¶
MatchesDomain returns true if the given name matches (is a subdomain) of the given domain, false otherwise.
func NewReconciler ¶
func NewReconciler(mgr manager.Manager, actuator Actuator) reconcile.Reconciler
NewReconciler creates a new reconcile.Reconciler that reconciles dnsrecord resources of Gardener's `extensions.gardener.cloud` API group.
Types ¶
type Actuator ¶
type Actuator interface { // Reconcile reconciles the DNSRecord. Reconcile(context.Context, logr.Logger, *extensionsv1alpha1.DNSRecord, *extensionscontroller.Cluster) error // Delete deletes the DNSRecord. Delete(context.Context, logr.Logger, *extensionsv1alpha1.DNSRecord, *extensionscontroller.Cluster) error // ForceDelete forcefully deletes the DNSRecord. ForceDelete(context.Context, logr.Logger, *extensionsv1alpha1.DNSRecord, *extensionscontroller.Cluster) error // Restore restores the DNSRecord. Restore(context.Context, logr.Logger, *extensionsv1alpha1.DNSRecord, *extensionscontroller.Cluster) error // Migrate migrates the DNSRecord. Migrate(context.Context, logr.Logger, *extensionsv1alpha1.DNSRecord, *extensionscontroller.Cluster) error }
Actuator acts upon DNSRecord resources.
type AddArgs ¶
type AddArgs struct { // Actuator is a DNSRecord actuator. Actuator Actuator // ControllerOptions are the controller options used for creating a controller. // The options.Reconciler is always overridden with a reconciler created from the // given actuator. ControllerOptions controller.Options // Predicates are the predicates to use. // If unset, GenerationChangedPredicate will be used. Predicates []predicate.Predicate // Type is the type of the resource considered for reconciliation. Type string // IgnoreOperationAnnotation specifies whether to ignore the operation annotation or not. // If the annotation is not ignored, the extension controller will only reconcile // with a present operation annotation typically set during a reconcile (e.g in the maintenance time) by the Gardenlet IgnoreOperationAnnotation bool // ExtensionClass defines the extension class this extension is responsible for. ExtensionClass extensionsv1alpha1.ExtensionClass }
AddArgs are arguments for adding a DNSRecord controller to a manager.