controllers

package
v0.0.0-...-114c4a8 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2022 License: MIT Imports: 49 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CentreonServiceFinalizer = "service.monitor.k8s.webcenter.fr/finalizer"
	CentreonServiceCondition = "UpdateCentreonService"
)
View Source
const (
	CentreonServiceGroupFinalizer = "servicegroup.monitor.k8s.webcenter.fr/finalizer"
	CentreonServiceGroupCondition = "UpdateCentreonServiceGroup"
)
View Source
const (
	PlatformFinalizer = "platform.monitor.k8s.webcenter.fr/finalizer"
	PlatformCondition = "LoadConfig"
)
View Source
const (
	CertificateFinalizer = "certificate.monitor.k8s.webcenter.fr/finalizer"
)
View Source
const (
	IngressFinalizer = "ingress.monitor.k8s.webcenter.fr/finalizer"
)
View Source
const (
	NamespaceFinalizer = "namespace.monitor.k8s.webcenter.fr/finalizer"
)
View Source
const (
	NodeFinalizer = "node.monitor.k8s.webcenter.fr/finalizer"
)
View Source
const (
	RouteFinalizer = "route.monitor.k8s.webcenter.fr/finalizer"
)

Variables

This section is empty.

Functions

func ComputedPlatformList

func ComputedPlatformList(ctx context.Context, cd dynamic.Interface, c kubernetes.Interface, log *logrus.Entry) (platforms map[string]*ComputedPlatform, err error)

ComputedPlatformList permit to get the list of coomputed platform object It usefull to init controller with client to access on external monitoring resources

func GetItems

func GetItems(o client.ObjectList) (items []client.Object, err error)

GetItems permit to get items contend from ObjectList interface

func GetSpec

func GetSpec(o client.Object) (spec any, err error)

GetSpec permit to get the Spec field from Object interface

func IsRouteCRD

func IsRouteCRD(cfg *rest.Config) (bool, error)

IsRouteCRD check if apiGroup called "route.openshift.io" exist on cluster. It usefull to start controller that manage this ressource only if exist on cluster

func SetSpec

func SetSpec(o client.Object, spec any) (err error)

SetSpec permit to set the spec contend on Spec field from Object interface

Types

type CentreonServiceGroupReconciler

type CentreonServiceGroupReconciler struct {
	Reconciler
	client.Client
	Scheme *runtime.Scheme
	// contains filtered or unexported fields
}

CentreonServiceGroupReconciler reconciles a CentreonServiceGroup object

func NewCentreonServiceGroupReconciler

func NewCentreonServiceGroupReconciler(client client.Client, scheme *runtime.Scheme) *CentreonServiceGroupReconciler

func (*CentreonServiceGroupReconciler) Configure

func (r *CentreonServiceGroupReconciler) Configure(ctx context.Context, req ctrl.Request, resource client.Object) (meta any, err error)

Configure permit to init condition and choose the right client

func (*CentreonServiceGroupReconciler) Create

func (r *CentreonServiceGroupReconciler) Create(ctx context.Context, resource client.Object, data map[string]interface{}, meta interface{}) (res ctrl.Result, err error)

Create add new ServiceGroup on Centreon

func (*CentreonServiceGroupReconciler) Delete

func (r *CentreonServiceGroupReconciler) Delete(ctx context.Context, resource client.Object, data map[string]interface{}, meta interface{}) (err error)

Delete permit to delete serviceGroup from Centreon

func (*CentreonServiceGroupReconciler) Diff

func (r *CentreonServiceGroupReconciler) Diff(resource client.Object, data map[string]interface{}, meta interface{}) (diff controller.Diff, err error)

Diff permit to check if diff between actual and expected Centreon serviceGroup exist

func (*CentreonServiceGroupReconciler) OnError

func (r *CentreonServiceGroupReconciler) OnError(ctx context.Context, resource client.Object, data map[string]any, meta any, err error)

OnError permit to set status condition on the right state and record error

func (*CentreonServiceGroupReconciler) OnSuccess

func (r *CentreonServiceGroupReconciler) OnSuccess(ctx context.Context, resource client.Object, data map[string]any, meta any, diff controller.Diff) (err error)

OnSuccess permit to set status condition on the right state is everythink is good

func (*CentreonServiceGroupReconciler) Read

func (r *CentreonServiceGroupReconciler) Read(ctx context.Context, resource client.Object, data map[string]any, meta any) (res ctrl.Result, err error)

Read permit to get current serviceGroup from Centreon

func (*CentreonServiceGroupReconciler) Reconcile

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 CentreonServiceGroup 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.1/pkg/reconcile

func (*CentreonServiceGroupReconciler) SetupWithManager

func (r *CentreonServiceGroupReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

func (*CentreonServiceGroupReconciler) Update

func (r *CentreonServiceGroupReconciler) Update(ctx context.Context, resource client.Object, data map[string]interface{}, meta interface{}) (res ctrl.Result, err error)

Update permit to update serviceGroup on Centreon

type CentreonServiceReconciler

type CentreonServiceReconciler struct {
	Reconciler
	client.Client
	Scheme *runtime.Scheme
	// contains filtered or unexported fields
}

CentreonServiceReconciler reconciles a CentreonService object

func NewCentreonServiceReconciler

func NewCentreonServiceReconciler(client client.Client, scheme *runtime.Scheme) *CentreonServiceReconciler

func (*CentreonServiceReconciler) Configure

func (r *CentreonServiceReconciler) Configure(ctx context.Context, req ctrl.Request, resource client.Object) (meta any, err error)

Configure permit to init condition and choose the right client

func (*CentreonServiceReconciler) Create

func (r *CentreonServiceReconciler) Create(ctx context.Context, resource client.Object, data map[string]interface{}, meta interface{}) (res ctrl.Result, err error)

Create add new Service on Centreon

func (*CentreonServiceReconciler) Delete

func (r *CentreonServiceReconciler) Delete(ctx context.Context, resource client.Object, data map[string]interface{}, meta interface{}) (err error)

Delete permit to delete service from Centreon

func (*CentreonServiceReconciler) Diff

func (r *CentreonServiceReconciler) Diff(resource client.Object, data map[string]interface{}, meta interface{}) (diff controller.Diff, err error)

Diff permit to check if diff between actual and expected Centreon service exist

func (*CentreonServiceReconciler) OnError

func (r *CentreonServiceReconciler) OnError(ctx context.Context, resource client.Object, data map[string]any, meta any, err error)

OnError permit to set status condition on the right state and record error

func (*CentreonServiceReconciler) OnSuccess

func (r *CentreonServiceReconciler) OnSuccess(ctx context.Context, resource client.Object, data map[string]any, meta any, diff controller.Diff) (err error)

OnSuccess permit to set status condition on the right state is everithink is good

func (*CentreonServiceReconciler) Read

func (r *CentreonServiceReconciler) Read(ctx context.Context, resource client.Object, data map[string]any, meta any) (res ctrl.Result, err error)

Read permit to get current service from Centreon

func (*CentreonServiceReconciler) Reconcile

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 CentreonService 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.10.0/pkg/reconcile

func (*CentreonServiceReconciler) SetupWithManager

func (r *CentreonServiceReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

func (*CentreonServiceReconciler) Update

func (r *CentreonServiceReconciler) Update(ctx context.Context, resource client.Object, data map[string]interface{}, meta interface{}) (res ctrl.Result, err error)

Update permit to update service on Centreon

type CertificateReconciler

type CertificateReconciler struct {
	Reconciler
	client.Client
	Scheme *runtime.Scheme
	TemplateController
	// contains filtered or unexported fields
}

CertificateReconciler reconciles a Secret of type TLS object

func NewCertificateReconciler

func NewCertificateReconciler(client client.Client, scheme *runtime.Scheme, templateController TemplateController) *CertificateReconciler

func (*CertificateReconciler) Configure

func (r *CertificateReconciler) Configure(ctx context.Context, req ctrl.Request, resource client.Object) (meta any, err error)

Configure do nothink here

func (*CertificateReconciler) Create

func (r *CertificateReconciler) Create(ctx context.Context, resource client.Object, data map[string]interface{}, meta interface{}) (res ctrl.Result, err error)

Create add new service object

func (*CertificateReconciler) Delete

func (r *CertificateReconciler) Delete(ctx context.Context, resource client.Object, data map[string]interface{}, meta interface{}) (err error)

Delete do nothink here We add parent link, so k8s auto delete children

func (*CertificateReconciler) Diff

func (r *CertificateReconciler) Diff(resource client.Object, data map[string]interface{}, meta interface{}) (diff controller.Diff, err error)

Diff permit to check if diff between actual and expected CentreonService exist

func (*CertificateReconciler) OnError

func (r *CertificateReconciler) OnError(ctx context.Context, resource client.Object, data map[string]any, meta any, err error)

OnError permit to set status condition on the right state and record error

func (*CertificateReconciler) OnSuccess

func (r *CertificateReconciler) OnSuccess(ctx context.Context, resource client.Object, data map[string]any, meta any, diff controller.Diff) (err error)

OnSuccess permit to set status condition on the right state is everithink is good

func (*CertificateReconciler) Read

func (r *CertificateReconciler) Read(ctx context.Context, resource client.Object, data map[string]any, meta any) (res ctrl.Result, err error)

Read permit to compute expected monitoring service that reflect node

func (*CertificateReconciler) Reconcile

func (r *CertificateReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, 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 Node 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.10.0/pkg/reconcile

func (*CertificateReconciler) SetupWithManager

func (r *CertificateReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

func (*CertificateReconciler) Update

func (r *CertificateReconciler) Update(ctx context.Context, resource client.Object, data map[string]interface{}, meta interface{}) (res ctrl.Result, err error)

Update permit to update service object

type CompareResource

type CompareResource struct {
	Current  client.Object
	Expected client.Object
	Diff     *controller.Diff
}

type ComputedPlatform

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

type IngressReconciler

type IngressReconciler struct {
	Reconciler
	client.Client
	Scheme *runtime.Scheme
	TemplateController
	// contains filtered or unexported fields
}

IngressReconciler reconciles a Ingress object

func NewIngressReconciler

func NewIngressReconciler(client client.Client, scheme *runtime.Scheme, templateController TemplateController) *IngressReconciler

func (*IngressReconciler) Configure

func (r *IngressReconciler) Configure(ctx context.Context, req ctrl.Request, resource client.Object) (meta any, err error)

Configure do nothink here

func (*IngressReconciler) Create

func (r *IngressReconciler) Create(ctx context.Context, resource client.Object, data map[string]interface{}, meta interface{}) (res ctrl.Result, err error)

Create add new service object

func (*IngressReconciler) Delete

func (r *IngressReconciler) Delete(ctx context.Context, resource client.Object, data map[string]interface{}, meta interface{}) (err error)

Delete do nothink here We add parent link, so k8s auto delete children

func (*IngressReconciler) Diff

func (r *IngressReconciler) Diff(resource client.Object, data map[string]interface{}, meta interface{}) (diff controller.Diff, err error)

Diff permit to check if diff between actual and expected CentreonService exist

func (*IngressReconciler) OnError

func (r *IngressReconciler) OnError(ctx context.Context, resource client.Object, data map[string]any, meta any, err error)

OnError permit to set status condition on the right state and record error

func (*IngressReconciler) OnSuccess

func (r *IngressReconciler) OnSuccess(ctx context.Context, resource client.Object, data map[string]any, meta any, diff controller.Diff) (err error)

OnSuccess permit to set status condition on the right state is everithink is good

func (*IngressReconciler) Read

func (r *IngressReconciler) Read(ctx context.Context, resource client.Object, data map[string]any, meta any) (res ctrl.Result, err error)

Read permit to compute expected monitoring service that reflect ingress

func (*IngressReconciler) Reconcile

func (r *IngressReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, 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 Ingress 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.10.0/pkg/reconcile

func (*IngressReconciler) SetupWithManager

func (r *IngressReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

func (*IngressReconciler) Update

func (r *IngressReconciler) Update(ctx context.Context, resource client.Object, data map[string]interface{}, meta interface{}) (res ctrl.Result, err error)

Update permit to update service object

type NamespaceReconciler

type NamespaceReconciler struct {
	Reconciler
	client.Client
	Scheme *runtime.Scheme
	TemplateController
	// contains filtered or unexported fields
}

NamespaceReconciler reconciles a Namespace object

func NewNamespaceReconciler

func NewNamespaceReconciler(client client.Client, scheme *runtime.Scheme, templateController TemplateController) *NamespaceReconciler

func (*NamespaceReconciler) Configure

func (r *NamespaceReconciler) Configure(ctx context.Context, req ctrl.Request, resource client.Object) (meta any, err error)

Configure do nothink here

func (*NamespaceReconciler) Create

func (r *NamespaceReconciler) Create(ctx context.Context, resource client.Object, data map[string]interface{}, meta interface{}) (res ctrl.Result, err error)

Create add new service object

func (*NamespaceReconciler) Delete

func (r *NamespaceReconciler) Delete(ctx context.Context, resource client.Object, data map[string]interface{}, meta interface{}) (err error)

Delete do nothink here We add parent link, so k8s auto delete children

func (*NamespaceReconciler) Diff

func (r *NamespaceReconciler) Diff(resource client.Object, data map[string]interface{}, meta interface{}) (diff controller.Diff, err error)

Diff permit to check if diff between actual and expected CentreonService exist

func (*NamespaceReconciler) OnError

func (r *NamespaceReconciler) OnError(ctx context.Context, resource client.Object, data map[string]any, meta any, err error)

OnError permit to set status condition on the right state and record error

func (*NamespaceReconciler) OnSuccess

func (r *NamespaceReconciler) OnSuccess(ctx context.Context, resource client.Object, data map[string]any, meta any, diff controller.Diff) (err error)

OnSuccess permit to set status condition on the right state is everithink is good

func (*NamespaceReconciler) Read

func (r *NamespaceReconciler) Read(ctx context.Context, resource client.Object, data map[string]any, meta any) (res ctrl.Result, err error)

Read permit to compute expected monitoring service that reflect namespace

func (*NamespaceReconciler) Reconcile

func (r *NamespaceReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, 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 Namespace 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.10.0/pkg/reconcile

func (*NamespaceReconciler) SetupWithManager

func (r *NamespaceReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

func (*NamespaceReconciler) Update

func (r *NamespaceReconciler) Update(ctx context.Context, resource client.Object, data map[string]interface{}, meta interface{}) (res ctrl.Result, err error)

Update permit to update service object

type NodeReconciler

type NodeReconciler struct {
	Reconciler
	client.Client
	Scheme *runtime.Scheme
	TemplateController
	// contains filtered or unexported fields
}

NodeReconciler reconciles a Node object

func NewNodeReconciler

func NewNodeReconciler(client client.Client, scheme *runtime.Scheme, templateController TemplateController) *NodeReconciler

func (*NodeReconciler) Configure

func (r *NodeReconciler) Configure(ctx context.Context, req ctrl.Request, resource client.Object) (meta any, err error)

Configure do nothink here

func (*NodeReconciler) Create

func (r *NodeReconciler) Create(ctx context.Context, resource client.Object, data map[string]interface{}, meta interface{}) (res ctrl.Result, err error)

Create add new service object

func (*NodeReconciler) Delete

func (r *NodeReconciler) Delete(ctx context.Context, resource client.Object, data map[string]interface{}, meta interface{}) (err error)

Delete do nothink here We add parent link, so k8s auto delete children

func (*NodeReconciler) Diff

func (r *NodeReconciler) Diff(resource client.Object, data map[string]interface{}, meta interface{}) (diff controller.Diff, err error)

Diff permit to check if diff between actual and expected CentreonService exist

func (*NodeReconciler) OnError

func (r *NodeReconciler) OnError(ctx context.Context, resource client.Object, data map[string]any, meta any, err error)

OnError permit to set status condition on the right state and record error

func (*NodeReconciler) OnSuccess

func (r *NodeReconciler) OnSuccess(ctx context.Context, resource client.Object, data map[string]any, meta any, diff controller.Diff) (err error)

OnSuccess permit to set status condition on the right state is everithink is good

func (*NodeReconciler) Read

func (r *NodeReconciler) Read(ctx context.Context, resource client.Object, data map[string]any, meta any) (res ctrl.Result, err error)

Read permit to compute expected monitoring service that reflect node

func (*NodeReconciler) Reconcile

func (r *NodeReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, 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 Node 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.10.0/pkg/reconcile

func (*NodeReconciler) SetupWithManager

func (r *NodeReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

func (*NodeReconciler) Update

func (r *NodeReconciler) Update(ctx context.Context, resource client.Object, data map[string]interface{}, meta interface{}) (res ctrl.Result, err error)

Update permit to update service object

type PlatformReconciler

type PlatformReconciler struct {
	Reconciler
	client.Client
	Scheme *runtime.Scheme
	// contains filtered or unexported fields
}

PlatformReconciler reconciles a Platform object

func NewPlatformReconciler

func NewPlatformReconciler(client client.Client, scheme *runtime.Scheme) *PlatformReconciler

func (*PlatformReconciler) Configure

func (r *PlatformReconciler) Configure(ctx context.Context, req ctrl.Request, resource client.Object) (meta any, err error)

Configure permit to init condition

func (*PlatformReconciler) Create

func (r *PlatformReconciler) Create(ctx context.Context, resource client.Object, data map[string]interface{}, meta interface{}) (res ctrl.Result, err error)

Create add new Service on Centreon

func (*PlatformReconciler) Delete

func (r *PlatformReconciler) Delete(ctx context.Context, resource client.Object, data map[string]interface{}, meta interface{}) (err error)

Delete permit to delete service from Centreon

func (*PlatformReconciler) Diff

func (r *PlatformReconciler) Diff(resource client.Object, data map[string]interface{}, meta interface{}) (diff controller.Diff, err error)

Diff permit to check if diff between actual and expected Centreon service exist

func (*PlatformReconciler) OnError

func (r *PlatformReconciler) OnError(ctx context.Context, resource client.Object, data map[string]any, meta any, err error)

OnError permit to set status condition on the right state and record error

func (*PlatformReconciler) OnSuccess

func (r *PlatformReconciler) OnSuccess(ctx context.Context, resource client.Object, data map[string]any, meta any, diff controller.Diff) (err error)

OnSuccess permit to set status condition on the right state is everithink is good

func (*PlatformReconciler) Read

func (r *PlatformReconciler) Read(ctx context.Context, resource client.Object, data map[string]any, meta any) (res ctrl.Result, err error)

Read

func (*PlatformReconciler) Reconcile

func (r *PlatformReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, 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 Platform 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.11.0/pkg/reconcile

func (*PlatformReconciler) SetupWithManager

func (r *PlatformReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

func (*PlatformReconciler) Update

func (r *PlatformReconciler) Update(ctx context.Context, resource client.Object, data map[string]interface{}, meta interface{}) (res ctrl.Result, err error)

Update permit to update service on Centreon

type Reconciler

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

func (*Reconciler) SetLogger

func (r *Reconciler) SetLogger(log *logrus.Entry)

func (*Reconciler) SetPlatforms

func (r *Reconciler) SetPlatforms(p map[string]*ComputedPlatform)

SetPlatforms permit to set the platform list

func (*Reconciler) SetReconsiler

func (r *Reconciler) SetReconsiler(reconciler controller.Reconciler)

func (*Reconciler) SetRecorder

func (r *Reconciler) SetRecorder(recorder record.EventRecorder)

type RouteReconciler

type RouteReconciler struct {
	Reconciler
	client.Client
	Scheme *runtime.Scheme
	TemplateController
	// contains filtered or unexported fields
}

RouteReconciler reconciles a Route object

func NewRouteReconciler

func NewRouteReconciler(client client.Client, scheme *runtime.Scheme, templateController TemplateController) *RouteReconciler

func (*RouteReconciler) Configure

func (r *RouteReconciler) Configure(ctx context.Context, req ctrl.Request, resource client.Object) (meta any, err error)

Configure do nothink here

func (*RouteReconciler) Create

func (r *RouteReconciler) Create(ctx context.Context, resource client.Object, data map[string]interface{}, meta interface{}) (res ctrl.Result, err error)

Create add new monitoring service object

func (*RouteReconciler) Delete

func (r *RouteReconciler) Delete(ctx context.Context, resource client.Object, data map[string]interface{}, meta interface{}) (err error)

Delete do nothink here We add parent link, so k8s auto delete children

func (*RouteReconciler) Diff

func (r *RouteReconciler) Diff(resource client.Object, data map[string]interface{}, meta interface{}) (diff controller.Diff, err error)

Diff permit to check if diff between actual and expected CentreonService exist

func (*RouteReconciler) OnError

func (r *RouteReconciler) OnError(ctx context.Context, resource client.Object, data map[string]any, meta any, err error)

OnError permit to set status condition on the right state and record error

func (*RouteReconciler) OnSuccess

func (r *RouteReconciler) OnSuccess(ctx context.Context, resource client.Object, data map[string]any, meta any, diff controller.Diff) (err error)

OnSuccess permit to set status condition on the right state is everithink is good

func (*RouteReconciler) Read

func (r *RouteReconciler) Read(ctx context.Context, resource client.Object, data map[string]any, meta any) (res ctrl.Result, err error)

Read permit to compute expected monitoring service that reflect route

func (*RouteReconciler) Reconcile

func (r *RouteReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, 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 Route 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.10.0/pkg/reconcile

func (*RouteReconciler) SetupWithManager

func (r *RouteReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

func (*RouteReconciler) Update

func (r *RouteReconciler) Update(ctx context.Context, resource client.Object, data map[string]interface{}, meta interface{}) (res ctrl.Result, err error)

Update permit to update monitoring service object

type TemplateController

type TemplateController struct {
	client.Client
	Scheme *runtime.Scheme
	// contains filtered or unexported fields
}

func (*TemplateController) SetLogger

func (r *TemplateController) SetLogger(log *logrus.Entry)

SetLogger permit to set logger on Centreon controller

Jump to

Keyboard shortcuts

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