Documentation
¶
Overview ¶
Package controller implements the designate-operator Kubernetes controllers.
Package controller implements the DesignateBackendbind9 controller.
Core reconciliation logic for DesignateBackendbind9. For multipool-specific resource management (ConfigMaps, Services, StatefulSets, TSIG), see designatebackendbind9_multipool.go.
Index ¶
- Variables
- type DesignateAPIReconciler
- func (r *DesignateAPIReconciler) GetClient() client.Client
- func (r *DesignateAPIReconciler) GetKClient() kubernetes.Interface
- func (r *DesignateAPIReconciler) GetLogger(ctx context.Context) logr.Logger
- func (r *DesignateAPIReconciler) GetScheme() *runtime.Scheme
- func (r *DesignateAPIReconciler) Reconcile(ctx context.Context, req ctrl.Request) (result ctrl.Result, _err error)
- func (r *DesignateAPIReconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager) error
- type DesignateBackendbind9Reconciler
- func (r *DesignateBackendbind9Reconciler) GetClient() client.Client
- func (r *DesignateBackendbind9Reconciler) GetKClient() kubernetes.Interface
- func (r *DesignateBackendbind9Reconciler) GetLogger(ctx context.Context) logr.Logger
- func (r *DesignateBackendbind9Reconciler) GetScheme() *runtime.Scheme
- func (r *DesignateBackendbind9Reconciler) Reconcile(ctx context.Context, req ctrl.Request) (result ctrl.Result, _err error)
- func (r *DesignateBackendbind9Reconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager) error
- type DesignateCentralReconciler
- func (r *DesignateCentralReconciler) GetClient() client.Client
- func (r *DesignateCentralReconciler) GetKClient() kubernetes.Interface
- func (r *DesignateCentralReconciler) GetLogger(ctx context.Context) logr.Logger
- func (r *DesignateCentralReconciler) GetScheme() *runtime.Scheme
- func (r *DesignateCentralReconciler) Reconcile(ctx context.Context, req ctrl.Request) (result ctrl.Result, _err error)
- func (r *DesignateCentralReconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager) error
- type DesignateMdnsReconciler
- func (r *DesignateMdnsReconciler) GetClient() client.Client
- func (r *DesignateMdnsReconciler) GetKClient() kubernetes.Interface
- func (r *DesignateMdnsReconciler) GetLogger(ctx context.Context) logr.Logger
- func (r *DesignateMdnsReconciler) GetScheme() *runtime.Scheme
- func (r *DesignateMdnsReconciler) Reconcile(ctx context.Context, req ctrl.Request) (result ctrl.Result, _err error)
- func (r *DesignateMdnsReconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager) error
- type DesignateProducerReconciler
- func (r *DesignateProducerReconciler) GetClient() client.Client
- func (r *DesignateProducerReconciler) GetKClient() kubernetes.Interface
- func (r *DesignateProducerReconciler) GetLogger(ctx context.Context) logr.Logger
- func (r *DesignateProducerReconciler) GetScheme() *runtime.Scheme
- func (r *DesignateProducerReconciler) Reconcile(ctx context.Context, req ctrl.Request) (result ctrl.Result, _err error)
- func (r *DesignateProducerReconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager) error
- type DesignateReconciler
- func (r *DesignateReconciler) GetClient() client.Client
- func (r *DesignateReconciler) GetKClient() kubernetes.Interface
- func (r *DesignateReconciler) GetLogger(ctx context.Context) logr.Logger
- func (r *DesignateReconciler) GetScheme() *runtime.Scheme
- func (r *DesignateReconciler) Reconcile(ctx context.Context, req ctrl.Request) (result ctrl.Result, _err error)
- func (r *DesignateReconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager) error
- type DesignateWorkerReconciler
- func (r *DesignateWorkerReconciler) GetClient() client.Client
- func (r *DesignateWorkerReconciler) GetKClient() kubernetes.Interface
- func (r *DesignateWorkerReconciler) GetLogger(ctx context.Context) logr.Logger
- func (r *DesignateWorkerReconciler) GetScheme() *runtime.Scheme
- func (r *DesignateWorkerReconciler) Reconcile(ctx context.Context, req ctrl.Request) (result ctrl.Result, _err error)
- func (r *DesignateWorkerReconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager) error
- type MultipoolConfigMapValidator
- type NSRecord
- type PoolConfig
- type StubZoneTmplRec
- type UnboundReconciler
Constants ¶
This section is empty.
Variables ¶
var ( ErrACSecretNotFound = errors.New("ApplicationCredential secret not found") ErrACSecretMissingKeys = errors.New("ApplicationCredential secret missing required keys") )
Static errors for Application Credential handling
var ( // ErrPoolsYamlMissing is returned when pools.yaml is not found in ConfigMap ErrPoolsYamlMissing = errors.New("pools.yaml not found in ConfigMap") // ErrPoolNotFoundInConfig is returned when a pool is not found in pools.yaml ErrPoolNotFoundInConfig = errors.New("pool not found in pools.yaml") // ErrNoDesignateCRFound is returned when no Designate CR is found in the namespace ErrNoDesignateCRFound = errors.New("no Designate CR found in namespace") )
var ( // ErrPoolsKeyMissing is returned when the ConfigMap doesn't have a 'pools' key ErrPoolsKeyMissing = errors.New("ConfigMap must contain 'pools' key") // ErrNoPoolsDefined is returned when no pools are defined ErrNoPoolsDefined = errors.New("at least one pool must be defined") // ErrDefaultPoolMissing is returned when the default pool is not present ErrDefaultPoolMissing = errors.New("default pool 'default' must be present in multipool configuration") // ErrEmptyPoolName is returned when a pool has an empty name ErrEmptyPoolName = errors.New("pool has empty name") // ErrDuplicatePoolName is returned when duplicate pool names are found ErrDuplicatePoolName = errors.New("duplicate pool name") // ErrInvalidBindReplicas is returned when bindReplicas is invalid ErrInvalidBindReplicas = errors.New("pool has invalid bindReplicas (must be greater than 0)") // ErrPoolMissingNSRecords is returned when a pool is missing NS records ErrPoolMissingNSRecords = errors.New("pool does not have NS records defined (each pool must define nsRecords)") )
Functions ¶
This section is empty.
Types ¶
type DesignateAPIReconciler ¶
type DesignateAPIReconciler struct {
client.Client
Kclient kubernetes.Interface
Scheme *runtime.Scheme
}
DesignateAPIReconciler reconciles a DesignateAPI object
func (*DesignateAPIReconciler) GetClient ¶
func (r *DesignateAPIReconciler) GetClient() client.Client
GetClient -
func (*DesignateAPIReconciler) GetKClient ¶
func (r *DesignateAPIReconciler) GetKClient() kubernetes.Interface
GetKClient -
func (*DesignateAPIReconciler) GetLogger ¶
func (r *DesignateAPIReconciler) GetLogger(ctx context.Context) logr.Logger
GetLogger returns a logger object with a prefix of "controller.name" and additional controller context fields
func (*DesignateAPIReconciler) GetScheme ¶
func (r *DesignateAPIReconciler) GetScheme() *runtime.Scheme
GetScheme -
func (*DesignateAPIReconciler) Reconcile ¶
func (r *DesignateAPIReconciler) Reconcile(ctx context.Context, req ctrl.Request) (result ctrl.Result, _err error)
Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. TODO(user): Modify the Reconcile function to compare the state specified by the DesignateAPI object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.
For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.12.2/pkg/reconcile
func (*DesignateAPIReconciler) SetupWithManager ¶
SetupWithManager sets up the controller with the Manager.
type DesignateBackendbind9Reconciler ¶
type DesignateBackendbind9Reconciler struct {
client.Client
Kclient kubernetes.Interface
Scheme *runtime.Scheme
}
DesignateBackendbind9Reconciler reconciles a DesignateBackendbind9 object
func (*DesignateBackendbind9Reconciler) GetClient ¶
func (r *DesignateBackendbind9Reconciler) GetClient() client.Client
GetClient -
func (*DesignateBackendbind9Reconciler) GetKClient ¶
func (r *DesignateBackendbind9Reconciler) GetKClient() kubernetes.Interface
GetKClient -
func (*DesignateBackendbind9Reconciler) GetLogger ¶
func (r *DesignateBackendbind9Reconciler) GetLogger(ctx context.Context) logr.Logger
GetLogger returns a logger object with a prefix of "controller.name" and additional controller context fields
func (*DesignateBackendbind9Reconciler) GetScheme ¶
func (r *DesignateBackendbind9Reconciler) GetScheme() *runtime.Scheme
GetScheme -
func (*DesignateBackendbind9Reconciler) Reconcile ¶
func (r *DesignateBackendbind9Reconciler) Reconcile(ctx context.Context, req ctrl.Request) (result ctrl.Result, _err error)
Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. TODO(user): Modify the Reconcile function to compare the state specified by the DesignateBackendbind9 object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.
func (*DesignateBackendbind9Reconciler) SetupWithManager ¶
func (r *DesignateBackendbind9Reconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type DesignateCentralReconciler ¶
type DesignateCentralReconciler struct {
client.Client
Kclient kubernetes.Interface
Scheme *runtime.Scheme
}
DesignateCentralReconciler reconciles a DesignateCentral object
func (*DesignateCentralReconciler) GetClient ¶
func (r *DesignateCentralReconciler) GetClient() client.Client
GetClient -
func (*DesignateCentralReconciler) GetKClient ¶
func (r *DesignateCentralReconciler) GetKClient() kubernetes.Interface
GetKClient -
func (*DesignateCentralReconciler) GetLogger ¶
func (r *DesignateCentralReconciler) GetLogger(ctx context.Context) logr.Logger
GetLogger returns a logger object with a prefix of "controller.name" and additional controller context fields
func (*DesignateCentralReconciler) GetScheme ¶
func (r *DesignateCentralReconciler) GetScheme() *runtime.Scheme
GetScheme -
func (*DesignateCentralReconciler) Reconcile ¶
func (r *DesignateCentralReconciler) Reconcile(ctx context.Context, req ctrl.Request) (result ctrl.Result, _err error)
Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. TODO(user): Modify the Reconcile function to compare the state specified by the DesignateCentral object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.
For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.12.2/pkg/reconcile
func (*DesignateCentralReconciler) SetupWithManager ¶
SetupWithManager sets up the controller with the Manager.
type DesignateMdnsReconciler ¶
type DesignateMdnsReconciler struct {
client.Client
Kclient kubernetes.Interface
Scheme *runtime.Scheme
}
DesignateMdnsReconciler reconciles a DesignateMdns object
func (*DesignateMdnsReconciler) GetClient ¶
func (r *DesignateMdnsReconciler) GetClient() client.Client
GetClient -
func (*DesignateMdnsReconciler) GetKClient ¶
func (r *DesignateMdnsReconciler) GetKClient() kubernetes.Interface
GetKClient -
func (*DesignateMdnsReconciler) GetLogger ¶
func (r *DesignateMdnsReconciler) GetLogger(ctx context.Context) logr.Logger
GetLogger returns a logger object with a prefix of "controller.name" and additional controller context fields
func (*DesignateMdnsReconciler) GetScheme ¶
func (r *DesignateMdnsReconciler) GetScheme() *runtime.Scheme
GetScheme -
func (*DesignateMdnsReconciler) Reconcile ¶
func (r *DesignateMdnsReconciler) Reconcile(ctx context.Context, req ctrl.Request) (result ctrl.Result, _err error)
Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. TODO(user): Modify the Reconcile function to compare the state specified by the DesignateMdns object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.
For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.12.2/pkg/reconcile
func (*DesignateMdnsReconciler) SetupWithManager ¶
SetupWithManager sets up the controller with the Manager.
type DesignateProducerReconciler ¶
type DesignateProducerReconciler struct {
client.Client
Kclient kubernetes.Interface
Scheme *runtime.Scheme
}
DesignateProducerReconciler reconciles a DesignateProducer object
func (*DesignateProducerReconciler) GetClient ¶
func (r *DesignateProducerReconciler) GetClient() client.Client
GetClient -
func (*DesignateProducerReconciler) GetKClient ¶
func (r *DesignateProducerReconciler) GetKClient() kubernetes.Interface
GetKClient -
func (*DesignateProducerReconciler) GetLogger ¶
func (r *DesignateProducerReconciler) GetLogger(ctx context.Context) logr.Logger
GetLogger returns a logger object with a prefix of "controller.name" and additional controller context fields
func (*DesignateProducerReconciler) GetScheme ¶
func (r *DesignateProducerReconciler) GetScheme() *runtime.Scheme
GetScheme -
func (*DesignateProducerReconciler) Reconcile ¶
func (r *DesignateProducerReconciler) Reconcile(ctx context.Context, req ctrl.Request) (result ctrl.Result, _err error)
Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. TODO(user): Modify the Reconcile function to compare the state specified by the DesignateProducer object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.
For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.12.2/pkg/reconcile
func (*DesignateProducerReconciler) SetupWithManager ¶
SetupWithManager sets up the controller with the Manager.
type DesignateReconciler ¶
type DesignateReconciler struct {
client.Client
Kclient kubernetes.Interface
Scheme *runtime.Scheme
}
DesignateReconciler reconciles a Designate object
func (*DesignateReconciler) GetClient ¶
func (r *DesignateReconciler) GetClient() client.Client
GetClient -
func (*DesignateReconciler) GetKClient ¶
func (r *DesignateReconciler) GetKClient() kubernetes.Interface
GetKClient -
func (*DesignateReconciler) GetLogger ¶
func (r *DesignateReconciler) GetLogger(ctx context.Context) logr.Logger
GetLogger returns a logger object with a prefix of "controller.name" and additional controller context fields
func (*DesignateReconciler) GetScheme ¶
func (r *DesignateReconciler) GetScheme() *runtime.Scheme
GetScheme -
func (*DesignateReconciler) Reconcile ¶
func (r *DesignateReconciler) Reconcile(ctx context.Context, req ctrl.Request) (result ctrl.Result, _err error)
Reconcile -
func (*DesignateReconciler) SetupWithManager ¶
SetupWithManager sets up the controller with the Manager.
type DesignateWorkerReconciler ¶
type DesignateWorkerReconciler struct {
client.Client
Kclient kubernetes.Interface
Scheme *runtime.Scheme
}
DesignateWorkerReconciler reconciles a DesignateWorker object
func (*DesignateWorkerReconciler) GetClient ¶
func (r *DesignateWorkerReconciler) GetClient() client.Client
GetClient -
func (*DesignateWorkerReconciler) GetKClient ¶
func (r *DesignateWorkerReconciler) GetKClient() kubernetes.Interface
GetKClient -
func (*DesignateWorkerReconciler) GetLogger ¶
func (r *DesignateWorkerReconciler) GetLogger(ctx context.Context) logr.Logger
GetLogger returns a logger object with a prefix of "controller.name" and additional controller context fields
func (*DesignateWorkerReconciler) GetScheme ¶
func (r *DesignateWorkerReconciler) GetScheme() *runtime.Scheme
GetScheme -
func (*DesignateWorkerReconciler) Reconcile ¶
func (r *DesignateWorkerReconciler) Reconcile(ctx context.Context, req ctrl.Request) (result ctrl.Result, _err error)
Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. TODO(user): Modify the Reconcile function to compare the state specified by the DesignateWorker object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.
For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.12.2/pkg/reconcile
func (*DesignateWorkerReconciler) SetupWithManager ¶
SetupWithManager sets up the controller with the Manager.
type MultipoolConfigMapValidator ¶
type MultipoolConfigMapValidator struct {
// contains filtered or unexported fields
}
MultipoolConfigMapValidator validates the designate-multipool-config ConfigMap
func (*MultipoolConfigMapValidator) Handle ¶
func (v *MultipoolConfigMapValidator) Handle(_ context.Context, req admission.Request) admission.Response
Handle validates the ConfigMap
func (*MultipoolConfigMapValidator) InjectDecoder ¶
func (v *MultipoolConfigMapValidator) InjectDecoder(d *admission.Decoder) error
InjectDecoder injects the decoder
type PoolConfig ¶
type PoolConfig struct {
Name string `yaml:"name"`
Description string `yaml:"description,omitempty"`
Attributes map[string]string `yaml:"attributes,omitempty"`
BindReplicas int32 `yaml:"bindReplicas"`
NSRecords []NSRecord `yaml:"nsRecords,omitempty"`
}
PoolConfig represents a pool configuration from the ConfigMap
type StubZoneTmplRec ¶
StubZoneTmplRec represents a stub zone template record configuration
type UnboundReconciler ¶
UnboundReconciler -
func (*UnboundReconciler) GetLogger ¶
func (r *UnboundReconciler) GetLogger(ctx context.Context) logr.Logger
GetLogger returns a logger object with a prefix of "controller.name" and additional controller context fields
func (*UnboundReconciler) Reconcile ¶
func (r *UnboundReconciler) Reconcile(ctx context.Context, req ctrl.Request) (result ctrl.Result, _err error)
Reconcile implementation for designate's Unbound resolver
func (*UnboundReconciler) SetupWithManager ¶
func (r *UnboundReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager for setting up the reconciler for the unbound resolver.
Source Files
¶
- designate_common.go
- designate_controller.go
- designateapi_controller.go
- designatebackendbind9_controller.go
- designatebackendbind9_multipool.go
- designatecentral_controller.go
- designatemdns_controller.go
- designateproducer_controller.go
- designateunbound_controller.go
- designateworker_controller.go
- multipool_configmap_webhook.go