Skip to content

ISSUE-2420 add support for additional fields #63

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions apis/v1alpha1/ack-generate-metadata.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
ack_generate_info:
build_date: "2025-05-24T00:24:32Z"
build_date: "2025-05-29T21:30:56Z"
build_hash: 66a58d259146834e61b211a9a01609beaa58ef77
go_version: go1.24.2
version: v0.47.1
api_directory_checksum: f0678a236e7f3f6ad06bc5de36a7678d0084aeac
api_directory_checksum: f4fbef519d13247aa1a915ce09b73f657b7ee2d6
api_version: v1alpha1
aws_sdk_go_version: v1.32.6
generator_config_info:
file_checksum: cbcc5b2cf42cc3de0ffa32047a95d76d5590cec6
file_checksum: ff00b2cc895d593d910cf9e686de07c6d2fcc532
original_file_name: generator.yaml
last_modification:
reason: API generation
3 changes: 0 additions & 3 deletions apis/v1alpha1/generator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ resources:
operation: DescribeStreamSummary
path: StreamDescriptionSummary.ConsumerCount
EncryptionType:
is_read_only: true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This approach, although technically correct, is breaking the CRD (removing fields).
Maybe the best thing to do would be to have new fields that go in Spec, and just mirror the ones in status..

cc: @a-hilaly @rushmash91 @knottnt

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, having a similar field in status should be okay rather than removing from read only.

from:
operation: DescribeStreamSummary
path: StreamDescriptionSummary.EncryptionType
Expand All @@ -72,7 +71,6 @@ resources:
operation: DescribeStreamSummary
path: StreamDescriptionSummary.EnhancedMonitoring
KeyId:
is_read_only: true
from:
operation: DescribeStreamSummary
path: StreamDescriptionSummary.KeyId
Expand All @@ -82,7 +80,6 @@ resources:
operation: DescribeStreamSummary
path: StreamDescriptionSummary.OpenShardCount
RetentionPeriodHours:
is_read_only: true
from:
operation: DescribeStreamSummary
path: StreamDescriptionSummary.RetentionPeriodHours
Expand Down
51 changes: 24 additions & 27 deletions apis/v1alpha1/stream.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 15 additions & 15 deletions apis/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

60 changes: 30 additions & 30 deletions config/crd/bases/kinesis.services.k8s.aws_streams.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,32 @@ spec:
spec:
description: StreamSpec defines the desired state of Stream.
properties:
encryptionType:
description: |-
The encryption type used. This value is one of the following:

* KMS

* NONE
type: string
keyID:
description: |-
The GUID for the customer-managed Amazon Web Services KMS key to use for
encryption. This value can be a globally unique identifier, a fully specified
ARN to either an alias or a key, or an alias name prefixed by "alias/".You
can also use a master key owned by Kinesis Data Streams by specifying the
alias aws/kinesis.

* Key ARN example: arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012

* Alias ARN example: arn:aws:kms:us-east-1:123456789012:alias/MyAliasName

* Globally unique key ID example: 12345678-1234-1234-1234-123456789012

* Alias name example: alias/MyAliasName

* Master key owned by Kinesis Data Streams: alias/aws/kinesis
type: string
name:
description: |-
A name to identify the stream. The stream name is scoped to the Amazon Web
Expand All @@ -50,6 +76,10 @@ spec:

Regex Pattern: `^[a-zA-Z0-9_.-]+$`
type: string
retentionPeriodHours:
description: The current retention period, in hours.
format: int64
type: integer
shardCount:
description: |-
The number of shards that the stream will use. The throughput of the stream
Expand Down Expand Up @@ -147,14 +177,6 @@ spec:
the stream.
format: int64
type: integer
encryptionType:
description: |-
The encryption type used. This value is one of the following:

* KMS

* NONE
type: string
enhancedMonitoring:
description: Represents the current enhanced monitoring settings of
the stream.
Expand All @@ -167,32 +189,10 @@ spec:
type: array
type: object
type: array
keyID:
description: |-
The GUID for the customer-managed Amazon Web Services KMS key to use for
encryption. This value can be a globally unique identifier, a fully specified
ARN to either an alias or a key, or an alias name prefixed by "alias/".You
can also use a master key owned by Kinesis Data Streams by specifying the
alias aws/kinesis.

* Key ARN example: arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012

* Alias ARN example: arn:aws:kms:us-east-1:123456789012:alias/MyAliasName

* Globally unique key ID example: 12345678-1234-1234-1234-123456789012

* Alias name example: alias/MyAliasName

* Master key owned by Kinesis Data Streams: alias/aws/kinesis
type: string
openShardCount:
description: The number of open shards in the stream.
format: int64
type: integer
retentionPeriodHours:
description: The current retention period, in hours.
format: int64
type: integer
streamCreationTimestamp:
description: The approximate time that the stream was created.
format: date-time
Expand Down
3 changes: 0 additions & 3 deletions generator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ resources:
operation: DescribeStreamSummary
path: StreamDescriptionSummary.ConsumerCount
EncryptionType:
is_read_only: true
from:
operation: DescribeStreamSummary
path: StreamDescriptionSummary.EncryptionType
Expand All @@ -72,7 +71,6 @@ resources:
operation: DescribeStreamSummary
path: StreamDescriptionSummary.EnhancedMonitoring
KeyId:
is_read_only: true
from:
operation: DescribeStreamSummary
path: StreamDescriptionSummary.KeyId
Expand All @@ -82,7 +80,6 @@ resources:
operation: DescribeStreamSummary
path: StreamDescriptionSummary.OpenShardCount
RetentionPeriodHours:
is_read_only: true
from:
operation: DescribeStreamSummary
path: StreamDescriptionSummary.RetentionPeriodHours
Expand Down
60 changes: 30 additions & 30 deletions helm/crds/kinesis.services.k8s.aws_streams.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,32 @@ spec:
spec:
description: StreamSpec defines the desired state of Stream.
properties:
encryptionType:
description: |-
The encryption type used. This value is one of the following:

- KMS

- NONE
type: string
keyID:
description: |-
The GUID for the customer-managed Amazon Web Services KMS key to use for
encryption. This value can be a globally unique identifier, a fully specified
ARN to either an alias or a key, or an alias name prefixed by "alias/".You
can also use a master key owned by Kinesis Data Streams by specifying the
alias aws/kinesis.

- Key ARN example: arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012

- Alias ARN example: arn:aws:kms:us-east-1:123456789012:alias/MyAliasName

- Globally unique key ID example: 12345678-1234-1234-1234-123456789012

- Alias name example: alias/MyAliasName

- Master key owned by Kinesis Data Streams: alias/aws/kinesis
type: string
name:
description: |-
A name to identify the stream. The stream name is scoped to the Amazon Web
Expand All @@ -50,6 +76,10 @@ spec:

Regex Pattern: `^[a-zA-Z0-9_.-]+$`
type: string
retentionPeriodHours:
description: The current retention period, in hours.
format: int64
type: integer
shardCount:
description: |-
The number of shards that the stream will use. The throughput of the stream
Expand Down Expand Up @@ -147,14 +177,6 @@ spec:
the stream.
format: int64
type: integer
encryptionType:
description: |-
The encryption type used. This value is one of the following:

* KMS

* NONE
type: string
enhancedMonitoring:
description: Represents the current enhanced monitoring settings of
the stream.
Expand All @@ -167,32 +189,10 @@ spec:
type: array
type: object
type: array
keyID:
description: |-
The GUID for the customer-managed Amazon Web Services KMS key to use for
encryption. This value can be a globally unique identifier, a fully specified
ARN to either an alias or a key, or an alias name prefixed by "alias/".You
can also use a master key owned by Kinesis Data Streams by specifying the
alias aws/kinesis.

* Key ARN example: arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012

* Alias ARN example: arn:aws:kms:us-east-1:123456789012:alias/MyAliasName

* Globally unique key ID example: 12345678-1234-1234-1234-123456789012

* Alias name example: alias/MyAliasName

* Master key owned by Kinesis Data Streams: alias/aws/kinesis
type: string
openShardCount:
description: The number of open shards in the stream.
format: int64
type: integer
retentionPeriodHours:
description: The current retention period, in hours.
format: int64
type: integer
streamCreationTimestamp:
description: The approximate time that the stream was created.
format: date-time
Expand Down
Loading