Documentation ¶
Index ¶
- Constants
- func GetConfigMapName(cb *cerebrocrd.Cerebro) (configMapName string)
- func GetContainerImage(cb *cerebrocrd.Cerebro) string
- func GetDeploymentName(cb *cerebrocrd.Cerebro) (name string)
- func GetIngressName(cb *cerebrocrd.Cerebro) (ingressName string)
- func GetLoadBalancerName(cb *cerebrocrd.Cerebro) (serviceName string)
- func GetSecretNameForApplication(cb *cerebrocrd.Cerebro) (secretName string)
- func GetServiceName(cb *cerebrocrd.Cerebro) (serviceName string)
- func NewCerebroReconciler(client client.Client, logger *logrus.Entry, recorder record.EventRecorder) (multiPhaseReconciler controller.Controller)
- type CerebroReconciler
- func (h *CerebroReconciler) Delete(ctx context.Context, o object.MultiPhaseObject, data map[string]any) (err error)
- func (h *CerebroReconciler) OnError(ctx context.Context, o object.MultiPhaseObject, data map[string]any, ...) (res ctrl.Result, err error)
- func (h *CerebroReconciler) OnSuccess(ctx context.Context, r object.MultiPhaseObject, data map[string]any) (res ctrl.Result, err error)
- func (r *CerebroReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (h *CerebroReconciler) SetupWithManager(mgr ctrl.Manager) error
Constants ¶
const ( ConfigmapCondition shared.ConditionName = "ConfigmapReady" ConfigmapPhase shared.PhaseName = "Configmap" )
const ( DeploymentCondition shared.ConditionName = "DeploymentReady" DeploymentPhase shared.PhaseName = "Deployment" )
const ( IngressCondition shared.ConditionName = "IngressReady" IngressPhase shared.PhaseName = "Ingress" )
const ( LoadBalancerCondition shared.ConditionName = "LoadBalancerReady" LoadBalancerPhase shared.PhaseName = "LoadBalancer" )
const ( ApplicationSecretCondition shared.ConditionName = "ApplicationSecretReady" ApplicationSecretPhase shared.PhaseName = "ApplicationSecret" )
const ( ServiceCondition shared.ConditionName = "ServiceReady" ServicePhase shared.PhaseName = "Service" )
Variables ¶
This section is empty.
Functions ¶
func GetConfigMapName ¶
func GetConfigMapName(cb *cerebrocrd.Cerebro) (configMapName string)
GetConfigMapName permit to get the configMap name that store the config
func GetContainerImage ¶
func GetContainerImage(cb *cerebrocrd.Cerebro) string
GetContainerImage permit to get the image name
func GetDeploymentName ¶
func GetDeploymentName(cb *cerebrocrd.Cerebro) (name string)
GetDeploymentName permit to get the deployement name
func GetIngressName ¶
func GetIngressName(cb *cerebrocrd.Cerebro) (ingressName string)
GetIngressName permit to get the ingress name
func GetLoadBalancerName ¶
func GetLoadBalancerName(cb *cerebrocrd.Cerebro) (serviceName string)
GetLoadBalancerName permit to get the load balancer name
func GetSecretNameForApplication ¶
func GetSecretNameForApplication(cb *cerebrocrd.Cerebro) (secretName string)
GetSecretNameForApplication permit to get the secret name for application
func GetServiceName ¶
func GetServiceName(cb *cerebrocrd.Cerebro) (serviceName string)
GetServiceName permit to get the service name
func NewCerebroReconciler ¶
func NewCerebroReconciler(client client.Client, logger *logrus.Entry, recorder record.EventRecorder) (multiPhaseReconciler controller.Controller)
Types ¶
type CerebroReconciler ¶
type CerebroReconciler struct { controller.Controller controller.MultiPhaseReconcilerAction controller.MultiPhaseReconciler controller.BaseReconciler // contains filtered or unexported fields }
CerebroReconciler reconciles a Cerebro objectFHost
func (*CerebroReconciler) Delete ¶
func (h *CerebroReconciler) Delete(ctx context.Context, o object.MultiPhaseObject, data map[string]any) (err error)
func (*CerebroReconciler) OnSuccess ¶
func (h *CerebroReconciler) OnSuccess(ctx context.Context, r object.MultiPhaseObject, data map[string]any) (res ctrl.Result, err error)
func (*CerebroReconciler) 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 Cerebro 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.13.0/pkg/reconcile
func (*CerebroReconciler) SetupWithManager ¶
func (h *CerebroReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
Source Files ¶
- cerebro_controller.go
- cerebro_watcher.go
- configmap_builder.go
- configmap_reconciler.go
- deployment_builder.go
- deployment_reconciler.go
- helper.go
- ingress_builder.go
- ingress_reconciler.go
- loadbalancer_builder.go
- loadbalancer_reconciler.go
- secret_application_builder.go
- secret_application_reconciler.go
- service_builder.go
- service_reconciler.go