Documentation
¶
Index ¶
- Constants
- func GenerateConfigsGeneric(ctx context.Context, helper *helper.Helper, instance client.Object, ...) error
- func GetLastAppliedTopologyRef(t topologyHandler, ns string) *topologyv1.TopoRef
- type Manageable
- type Reconciler
- type ReconcilerBase
- type Reconcilers
- type WatcherAPIReconciler
- type WatcherApplierReconciler
- type WatcherDecisionEngineReconciler
- type WatcherReconciler
Constants ¶
const ( // TransportURLSelector is the name of key in the secret created by TransportURL TransportURLSelector = "transport_url" // NotificationURLSelector is the name of key in the secret created by the notification TransportURL NotificationURLSelector = "notification_url" // DatabaseAccount is the name of key in the secret for the name of the Database Acount object DatabaseAccount = "database_account" // DatabaseUsername is the name of key in the secret for the user name used to login to the database DatabaseUsername = "database_username" // DatabaseUsername is the name of key in the secret for the password used to login to the database DatabasePassword = "database_password" // DatabaseUsername is the name of key in the secret for the database // hostname DatabaseHostname = "database_hostname" // Prometheus configuration keys in prometheusSecret PrometheusHost = "host" PrometheusPort = "port" PrometheusCaCertSecret = "ca_secret" PrometheusCaCertKey = "ca_key" // WatcherAPILabelPrefix - a unique, service binary specific prefix for the // labels the WatcherAPI controller uses on children objects WatcherAPILabelPrefix = "watcher-api" // WatcherApplierLabelPrefix - a unique, service binary specific prefix for the // labels the WatcherApplier controller uses on children objects WatcherApplierLabelPrefix = "watcher-applier" // WatcherDecisionEngineLabelPrefix - a unique, service binary specific prefix // for the labels the WatcherDecisionEngine controller uses on child objects WatcherDecisionEngineLabelPrefix = "watcher-decision-engine" )
Variables ¶
This section is empty.
Functions ¶
func GenerateConfigsGeneric ¶
func GetLastAppliedTopologyRef ¶
func GetLastAppliedTopologyRef(t topologyHandler, ns string) *topologyv1.TopoRef
GetLastAppliedTopologyRef - Returns a TopoRef object that can be passed to the Handle topology logic
Types ¶
type Manageable ¶
Manageable all types that conform to this interface can be setup with a controller-runtime manager.
type Reconciler ¶
type Reconciler interface { Manageable SetRequeueTimeout(timeout time.Duration) }
Reconciler represents a generic interface for all Reconciler objects in watcher
type ReconcilerBase ¶
type ReconcilerBase struct { Client client.Client Kclient kubernetes.Interface Scheme *runtime.Scheme RequeueTimeout time.Duration }
ReconcilerBase provides a common set of clients scheme and loggers for all reconcilers.
func NewReconcilerBase ¶
func NewReconcilerBase( mgr ctrl.Manager, kclient kubernetes.Interface, ) ReconcilerBase
NewReconcilerBase constructs a ReconcilerBase given a manager and Kclient.
func (*ReconcilerBase) GetLogger ¶
func (r *ReconcilerBase) GetLogger(ctx context.Context) logr.Logger
GetLogger returns a logger object with a prefix of "controller.name" and additional controller context fields
func (*ReconcilerBase) SetRequeueTimeout ¶
func (r *ReconcilerBase) SetRequeueTimeout(timeout time.Duration)
SetRequeueTimeout overrides the default RequeueTimeout of the Reconciler
type Reconcilers ¶
type Reconcilers struct {
// contains filtered or unexported fields
}
Reconcilers holds all the Reconciler objects of the watcher-operator to allow generic management of them.
func NewReconcilers ¶
func NewReconcilers(mgr ctrl.Manager, kclient *kubernetes.Clientset) *Reconcilers
NewReconcilers constructs all watcher Reconciler objects
func (*Reconcilers) OverrideRequeueTimeout ¶
func (r *Reconcilers) OverrideRequeueTimeout(timeout time.Duration)
OverrideRequeueTimeout overrides the default RequeueTimeout of our reconcilers
type WatcherAPIReconciler ¶
type WatcherAPIReconciler struct {
ReconcilerBase
}
WatcherAPIReconciler reconciles a WatcherAPI object
func (*WatcherAPIReconciler) GetLogger ¶
func (r *WatcherAPIReconciler) GetLogger(ctx context.Context) logr.Logger
GetLogger returns a logger object with a prefix of "controller.name" and additional controller context fields
func (*WatcherAPIReconciler) Reconcile ¶
func (r *WatcherAPIReconciler) 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.
For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.17.3/pkg/reconcile
func (*WatcherAPIReconciler) SetupWithManager ¶
func (r *WatcherAPIReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type WatcherApplierReconciler ¶
type WatcherApplierReconciler struct {
ReconcilerBase
}
WatcherApplierReconciler reconciles a WatcherApplier object
func (*WatcherApplierReconciler) GetLogger ¶
func (r *WatcherApplierReconciler) GetLogger(ctx context.Context) logr.Logger
GetLogger returns a logger object with a prefix of "controller.name" and additional controller context fields
func (*WatcherApplierReconciler) Reconcile ¶
func (r *WatcherApplierReconciler) 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 WatcherApplier 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.14.1/pkg/reconcile
func (*WatcherApplierReconciler) SetupWithManager ¶
func (r *WatcherApplierReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type WatcherDecisionEngineReconciler ¶
type WatcherDecisionEngineReconciler struct {
ReconcilerBase
}
WatcherDecisionEngineReconciler reconciles a WatcherDecisionEngine object
func (*WatcherDecisionEngineReconciler) GetLogger ¶
func (r *WatcherDecisionEngineReconciler) GetLogger(ctx context.Context) logr.Logger
GetLogger returns a logger object with a prefix of "controller.name" and additional controller context fields
func (*WatcherDecisionEngineReconciler) Reconcile ¶
func (r *WatcherDecisionEngineReconciler) 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 WatcherDecisionEngine 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.14.1/pkg/reconcile
func (*WatcherDecisionEngineReconciler) SetupWithManager ¶
func (r *WatcherDecisionEngineReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type WatcherReconciler ¶
type WatcherReconciler struct {
ReconcilerBase
}
WatcherReconciler reconciles a Watcher object
func (*WatcherReconciler) GetLogger ¶
func (r *WatcherReconciler) GetLogger(ctx context.Context) logr.Logger
GetLogger returns a logger object with a prefix of "controller.name" and additional controller context fields
func (*WatcherReconciler) Reconcile ¶
func (r *WatcherReconciler) 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.
For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.14.1/pkg/reconcile
func (*WatcherReconciler) SetupWithManager ¶
func (r *WatcherReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.