Add StreamConsumer resource support - #93
bjorn-stange-expel wants to merge 3 commits into
Conversation
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Adds a new StreamConsumer custom resource mapping to the Kinesis enhanced fan-out consumer APIs (RegisterStreamConsumer, DescribeStreamConsumer, DeregisterStreamConsumer), generated with code-generator v0.61.0. - consumerName is the primary key; streamARN supports resource references to Stream via streamRef - ResourceSynced condition is set once ConsumerStatus is ACTIVE - Stream consumers do not support tags, so tag ensure is ignored - Adds e2e test registering a consumer against a stream via streamRef Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: bjorn-stange-expel The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Hi @bjorn-stange-expel. Thanks for your PR. I'm waiting for a aws-controllers-k8s member to verify that this patch is reasonable to test. If it is, they should reply with Regular contributors should join the org to skip this step. Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
The Kinesis API does support tagging consumers as of a recent API update, but the SDK version this controller is generated against predates it, so tag support remains ignored rather than unsupported. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Resolves aws-controllers-k8s/community#2844
Why?
The kinesis-controller currently only manages
Streamresources. Kinesis enhanced fan-out requires registering stream consumers (RegisterStreamConsumer), which today has to be done outside Kubernetes. This PR adds aStreamConsumercustom resource so consumers can be managed declaratively alongside their streams.What changed?
All controller code is generated by ACK code-generator (v0.61.0) — the source change is in
generator.yaml, which maps a newStreamConsumerresource to the consumer APIs:RegisterStreamConsumer(create),DescribeStreamConsumer(read one),DeregisterStreamConsumer(delete). There is no update API — consumers are immutable, sosdkUpdatereturns a terminalNotImplemented.consumerNameis the primary key.streamARNsupports ACK resource references, so a consumer can point at its stream withspec.streamRef.from.nameinstead of a hard-coded ARN.ResourceSyncedcondition is set onceConsumerStatusisACTIVE.tags.ignore: true). The Kinesis API recently added consumer tagging (TagsonRegisterStreamConsumer, plusTagResource/ListTagsForResource), but those operations don't exist yet in theaws-sdk-go-v2/service/kinesisversion this controller is generated against, so tag support isn't generatable today. A natural follow-up once the SDK pin is bumped.Everything else (
apis/,pkg/resource/stream_consumer/, CRDs, RBAC, helm) is generated output. Release version was kept at v1.3.2 so no release artifacts churn.Also adds an e2e test (
test_stream_consumer.py) that creates a Stream, registers a consumer against it viastreamRef, verifies the consumer goes ACTIVE with its ARN in status, and tears both down.Verification
go build ./...passes;gofmtcleango test ./...passes (no unit test files in this repo; e2e lives intest/e2e)pytest e2e/tests/test_stream_consumer.pyagainst us-east-1. Full CRUD verified in 2m02s — Stream created, consumer registered viastreamRefreference resolution, wentACTIVEwithResourceSynced=Trueandstatus.consumerARNmatching the AWS-side ARN, then deregistered and cleaned up (no leaked resources).🤖 Generated with Claude Code