Documentation ¶
Index ¶
- Constants
- func EnsureNoQueue(ctx context.Context, cli sqsiface.SQSAPI, queueName string) error
- func EnsureNoRule(ctx context.Context, cli eventbridgeiface.EventBridgeAPI, ...) (string, error)
- func EnsureQueuePolicy(ctx context.Context, cli sqsiface.SQSAPI, queue *SQSQueue, ruleARN *apis.ARN) error
- func EnsureRule(ctx context.Context, cli eventbridgeiface.EventBridgeAPI, queue *SQSQueue) (*apis.ARN, error)
- func MakeAppEnv(o *v1alpha1.AWSEventBridgeSource) []corev1.EnvVar
- func NewController(ctx context.Context, cmw configmap.Watcher) *controller.Impl
- func SetRuleTarget(ctx context.Context, cli eventbridgeiface.EventBridgeAPI, ruleARN *apis.ARN, ...) error
- type Reconciler
- func (r *Reconciler) BuildAdapter(src commonv1alpha1.Reconcilable, sinkURI *apis.URL) (*appsv1.Deployment, error)
- func (r *Reconciler) FinalizeKind(ctx context.Context, src *v1alpha1.AWSEventBridgeSource) reconciler.Event
- func (r *Reconciler) ReconcileKind(ctx context.Context, src *v1alpha1.AWSEventBridgeSource) reconciler.Event
- type SQSQueue
Constants ¶
const ( // ReasonQueueCreated indicates that a SQS queue was created for receiving EventBridge events. ReasonQueueCreated = "QueueCreated" // ReasonQueueDeleted indicates that a SQS queue used for receiving EventBridge events was deleted. ReasonQueueDeleted = "QueueDeleted" // ReasonFailedQueue indicates a failure while synchronizing the SQS queue for receiving EventBridge events. ReasonFailedQueue = "FailedQueue" // ReasonSubscribed indicates that events from an EventBridge event bus have been successfully subscribed to via // a rule. ReasonSubscribed = "Subscribed" // ReasonUnsubscribed indicates that the subscription to an EventBridge event bus has been terminated by // removing a rule. ReasonUnsubscribed = "Unsubscribed" // ReasonFailedSubscribe indicates a failure while subscribing to events from an EventBridge event bus. ReasonFailedSubscribe = "FailedSubscribe" // ReasonFailedUnsubscribe indicates a failure while unsubscribing from events from an EventBridge event bus. ReasonFailedUnsubscribe = "FailedUnsubscribe" )
Variables ¶
This section is empty.
Functions ¶
func EnsureNoQueue ¶ added in v1.22.0
EnsureNoQueue ensures that the SQS queue used for sending EventBridge events is deleted.
func EnsureNoRule ¶ added in v1.22.0
func EnsureNoRule(ctx context.Context, cli eventbridgeiface.EventBridgeAPI, sqsCli sqsiface.SQSAPI) (string, error)
EnsureNoRule ensures that the EventBrige event rule is removed from the event bus.
Required permissions: - sqs:GetQueueUrl - sqs:GetQueueAttributes - events:ListRuleNamesByTarget - events:ListTagsForResource - events:DescribeRule - events:ListTargetsByRule - events:RemoveTargets - events:DeleteRule
func EnsureQueuePolicy ¶ added in v1.22.0
func EnsureQueuePolicy(ctx context.Context, cli sqsiface.SQSAPI, queue *SQSQueue, ruleARN *apis.ARN) error
EnsureQueuePolicy ensures that the correct access policy is applied to the given SQS queue.
func EnsureRule ¶ added in v1.22.0
func EnsureRule(ctx context.Context, cli eventbridgeiface.EventBridgeAPI, queue *SQSQueue) (*apis.ARN, error)
EnsureRule ensures that an EventBrige event rule exists for the event bus.
Required permissions: - events:ListRuleNamesByTarget - events:ListTagsForResource - events:DescribeRule - events:PutRule - events:TagResource
func MakeAppEnv ¶ added in v1.21.0
func MakeAppEnv(o *v1alpha1.AWSEventBridgeSource) []corev1.EnvVar
MakeAppEnv extracts environment variables from the object. Exported to be used in external tools for local test environments.
func NewController ¶
NewController creates a Reconciler for the event source and returns the result of NewImpl.
func SetRuleTarget ¶ added in v1.22.0
func SetRuleTarget(ctx context.Context, cli eventbridgeiface.EventBridgeAPI, ruleARN *apis.ARN, queueARN string) error
SetRuleTarget applies a SQS target to the given rule.
Required permissions: - events:ListTargetsByRule - events:PutTargets
Types ¶
type Reconciler ¶
type Reconciler struct {
// contains filtered or unexported fields
}
Reconciler implements controller.Reconciler for the event source type.
func (*Reconciler) BuildAdapter ¶
func (r *Reconciler) BuildAdapter(src commonv1alpha1.Reconcilable, sinkURI *apis.URL) (*appsv1.Deployment, error)
BuildAdapter implements common.AdapterBuilder.
func (*Reconciler) FinalizeKind ¶
func (r *Reconciler) FinalizeKind(ctx context.Context, src *v1alpha1.AWSEventBridgeSource) reconciler.Event
FinalizeKind is called when the resource is deleted.
func (*Reconciler) ReconcileKind ¶
func (r *Reconciler) ReconcileKind(ctx context.Context, src *v1alpha1.AWSEventBridgeSource) reconciler.Event
ReconcileKind implements Interface.ReconcileKind.