controllers

package
v1.13.0 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2024 License: MPL-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VhostControllerName             = "vhost-controller"
	QueueControllerName             = "queue-controller"
	ExchangeControllerName          = "exchange-controller"
	BindingControllerName           = "binding-controller"
	UserControllerName              = "user-controller"
	PolicyControllerName            = "policy-controller"
	OperatorPolicyControllerName    = "operator-policy-controller"
	PermissionControllerName        = "permission-controller"
	SchemaReplicationControllerName = "schema-replication-controller"
	FederationControllerName        = "federation-controller"
	ShovelControllerName            = "shovel-controller"
	SuperStreamControllerName       = "super-stream-controller"
	TopicPermissionControllerName   = "topic-permission-controller"
)

names for each of the controllers

View Source
const (
	KubernetesInternalDomainEnvVar = "MESSAGING_DOMAIN_NAME"
	OperatorNamespaceEnvVar        = "OPERATOR_NAMESPACE"
	EnableWebhooksEnvVar           = "ENABLE_WEBHOOKS"
	ControllerSyncPeriodEnvVar     = "SYNC_PERIOD"
	ConnectUsingPlainHTTPEnvVar    = "CONNECT_USING_PLAIN_HTTP"
)

names for environment variables

View Source
const SchemaReplicationParameterName = "schema_definition_sync_upstream"

Variables

View Source
var NotFound = errors.New("not found")

NotFound is a custom error used in all controllers when deleting objects from rabbitmq server and status code is 404

Functions

This section is empty.

Types

type BindingReconciler

type BindingReconciler struct{}

func (*BindingReconciler) DeclareFunc

func (*BindingReconciler) DeleteFunc

DeleteFunc deletes binding from rabbitmq server; bindings have no name; server needs BindingInfo to delete them when server responds with '404' Not Found, it logs and does not requeue on error if no binding argument is set, generating properties key by using internal.GeneratePropertiesKey if binding arguments are set, list all bindings between source/destination to find the binding; if it failed to find corresponding binding, it assumes that the binding is already deleted and returns no error

type ExchangeReconciler

type ExchangeReconciler struct{}

func (*ExchangeReconciler) DeclareFunc

func (*ExchangeReconciler) DeleteFunc

DeleteFunc deletes exchange from rabbitmq server if server responds with '404' Not Found, it logs and does not requeue on error

type FederationReconciler

type FederationReconciler struct {
	client.Client
}

func (*FederationReconciler) DeclareFunc

func (*FederationReconciler) DeleteFunc

DeleteFunc deletes federation from rabbitmq server if server responds with '404' Not Found, it logs and does not requeue on error

type OperatorPolicyReconciler added in v1.13.0

type OperatorPolicyReconciler struct{}

func (*OperatorPolicyReconciler) DeclareFunc added in v1.13.0

DeclareFunc creates or updates a given operator policy using rabbithole client.PutOperatorPolicy

func (*OperatorPolicyReconciler) DeleteFunc added in v1.13.0

DeleteFunc deletes operator policy from rabbitmq server if server responds with '404' Not Found, it logs and does not requeue on error

type PermissionReconciler

type PermissionReconciler struct {
	client.Client
	Scheme *runtime.Scheme
}

func (*PermissionReconciler) DeclareFunc

func (*PermissionReconciler) DeleteFunc

type PolicyReconciler

type PolicyReconciler struct{}

func (*PolicyReconciler) DeclareFunc

DeclareFunc creates or updates a given policy using rabbithole client.PutPolicy

func (*PolicyReconciler) DeleteFunc

DeleteFunc deletes policy from rabbitmq server if server responds with '404' Not Found, it logs and does not requeue on error

type QueueReconciler

type QueueReconciler struct{}

func (*QueueReconciler) DeclareFunc

func (*QueueReconciler) DeleteFunc

DeleteFunc deletes queue from rabbitmq server if server responds with '404' Not Found, it logs and does not requeue on error queues could be deleted manually or gone because of AutoDelete

type ReconcileFunc

type ReconcileFunc interface {
	DeclareFunc(ctx context.Context, client rabbitmqclient.Client, resource topology.TopologyResource) error
	DeleteFunc(ctx context.Context, client rabbitmqclient.Client, resource topology.TopologyResource) error
}

type SchemaReplicationReconciler

type SchemaReplicationReconciler struct {
	client.Client
}

func (*SchemaReplicationReconciler) DeclareFunc

func (*SchemaReplicationReconciler) DeleteFunc

type ShovelReconciler

type ShovelReconciler struct {
	client.Client
}

func (*ShovelReconciler) DeclareFunc

func (*ShovelReconciler) DeleteFunc

DeleteFunc deletes shovel configuration from rabbitmq server if server responds with '404' Not Found, it logs and does not requeue on error

type SuperStreamReconciler

type SuperStreamReconciler struct {
	client.Client
	Log                     logr.Logger
	Scheme                  *runtime.Scheme
	Recorder                record.EventRecorder
	RabbitmqClientFactory   rabbitmqclient.Factory
	KubernetesClusterDomain string
}

SuperStreamReconciler reconciles a RabbitMQ Super Stream, and any resources it comprises of

func (*SuperStreamReconciler) Reconcile

func (r *SuperStreamReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

func (*SuperStreamReconciler) SetReconcileSuccess

func (r *SuperStreamReconciler) SetReconcileSuccess(ctx context.Context, superStream *topologyv1alpha1.SuperStream, condition topology.Condition) error

func (*SuperStreamReconciler) SetupWithManager

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

type TopicPermissionReconciler

type TopicPermissionReconciler struct {
	client.Client
	Scheme *runtime.Scheme
}

func (*TopicPermissionReconciler) DeclareFunc

func (*TopicPermissionReconciler) DeleteFunc

type TopologyReconciler

type TopologyReconciler struct {
	client.Client
	ReconcileFunc
	Type                    client.Object
	WatchTypes              []client.Object
	Log                     logr.Logger
	Scheme                  *runtime.Scheme
	Recorder                record.EventRecorder
	RabbitmqClientFactory   rabbitmqclient.Factory
	KubernetesClusterDomain string
	ConnectUsingPlainHTTP   bool
}

TopologyReconciler reconciles any topology rabbitmq objects

func (*TopologyReconciler) Reconcile

func (r *TopologyReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

func (*TopologyReconciler) SetupWithManager

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

type UserReconciler

type UserReconciler struct {
	client.Client
	Scheme *runtime.Scheme
}

func (*UserReconciler) DeclareFunc

func (*UserReconciler) DeleteFunc

type VhostReconciler

type VhostReconciler struct {
	client.Client
}

func (*VhostReconciler) DeclareFunc

func (*VhostReconciler) DeleteFunc

DeleteFunc deletes vhost from server if server responds with '404' Not Found, it logs and does not requeue on error

Jump to

Keyboard shortcuts

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