Documentation
¶
Index ¶
- func Add(mgr manager.Manager) error
- func Done() (reconcile.Result, error)
- func Requeue(err error, requeueAfter int64) (reconcile.Result, error)
- func RequeueError(err error) (reconcile.Result, error)
- func RequeueOnNotFound(err error, requeueAfter int64) (reconcile.Result, error)
- type Binder
- type Plan
- type Planner
- type Reconciler
- type Retriever
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Add ¶
Add creates a new ServiceBindingRequest Controller and adds it to the Manager. The Manager will set fields on the Controller and Start it when the Manager is Started.
func Requeue ¶
Requeue based on empty result and no error informed upstream, request will be requeued.
func RequeueError ¶
RequeueError simply requeue exposing the error.
Types ¶
type Binder ¶
type Binder struct {
// contains filtered or unexported fields
}
Binder executes the "binding" act of updating different application kinds to use intermediary secret. Those secrets should be offered as environment variables.
type Plan ¶
type Plan struct {
Ns string // namespace name
Name string // plan name, same than ServiceBindingRequest
CRDDescription *olmv1alpha1.CRDDescription // custom resource definition description
CR *ustrv1.Unstructured // custom resource object
}
Plan outcome, after executing planner.
type Planner ¶
type Planner struct {
// contains filtered or unexported fields
}
Planner plans resources needed to bind a given backend service, using OperatorLifecycleManager standards and CustomResourceDefinitionDescription data to understand which attributes are needed.
func NewPlanner ¶
func NewPlanner( ctx context.Context, client dynamic.Interface, sbr *v1alpha1.ServiceBindingRequest, ) *Planner
NewPlanner instantiate Planner type.
type Reconciler ¶
type Reconciler struct {
// contains filtered or unexported fields
}
Reconciler reconciles a ServiceBindingRequest object
func (*Reconciler) Reconcile ¶
Reconcile a ServiceBindingRequest by the following steps:
- Inspecting SBR in order to identify backend service. The service is composed by a CRD name and kind, and by inspecting "connects-to" label identify the name of service instance;
- Using OperatorLifecycleManager standards, identifying which items are intersting for binding by parsing CustomResourceDefinitionDescripton object;
- Search and read contents identified in previous step, creating an intermediary secret to hold data formatted as environment variables key/value;
- Search applications that are interested to bind with given service, by inspecting labels. The Deployment (and other kinds) will be updated in "spec" level.
type Retriever ¶
type Retriever struct {
// contains filtered or unexported fields
}
Retriever reads all data referred in plan instance, and store in a secret.