Skip to content

Commit 77109f0

Browse files
committed
fix: propagate shardCount to resource status
1 parent 370a60b commit 77109f0

File tree

10 files changed

+21
-7
lines changed

10 files changed

+21
-7
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
ack_generate_info:
2-
build_date: "2025-04-03T18:54:15Z"
2+
build_date: "2025-04-04T21:04:55Z"
33
build_hash: 980cb1e4734f673d16101cf55206b84ca639ec01
44
go_version: go1.24.1
55
version: v0.44.0
66
api_directory_checksum: b08fe6fcd497d00fdd4e069970d4ba14318abcb4
77
api_version: v1alpha1
88
aws_sdk_go_version: v1.32.6
99
generator_config_info:
10-
file_checksum: a99b63823035947bb9160bb5f164c925a65accd0
10+
file_checksum: 7192633fe2be3555027be5456afef2c1996457b3
1111
original_file_name: generator.yaml
1212
last_modification:
1313
reason: API generation

apis/v1alpha1/generator.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ resources:
3737
hooks:
3838
sdk_read_one_post_set_output:
3939
template_path: hooks/stream/sdk_read_one_post_set_output.go.tpl
40+
sdk_update_post_set_output:
41+
template_path: hooks/stream/sdk_update_post_set_output.go.tpl
4042
exceptions:
4143
errors:
4244
404:

config/controller/kustomization.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ kind: Kustomization
66
images:
77
- name: controller
88
newName: public.ecr.aws/aws-controllers-k8s/kinesis-controller
9-
newTag: 1.0.7
9+
newTag: 1.0.6

generator.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ resources:
3737
hooks:
3838
sdk_read_one_post_set_output:
3939
template_path: hooks/stream/sdk_read_one_post_set_output.go.tpl
40+
sdk_update_post_set_output:
41+
template_path: hooks/stream/sdk_update_post_set_output.go.tpl
4042
exceptions:
4143
errors:
4244
404:

helm/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
apiVersion: v1
22
name: kinesis-chart
33
description: A Helm chart for the ACK service controller for Amazon Kinesis (Kinesis)
4-
version: 1.0.7
5-
appVersion: 1.0.7
4+
version: 1.0.6
5+
appVersion: 1.0.6
66
home: https://github.com/aws-controllers-k8s/kinesis-controller
77
icon: https://raw.githubusercontent.com/aws/eks-charts/master/docs/logo/aws.png
88
sources:

helm/templates/NOTES.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{{ .Chart.Name }} has been installed.
2-
This chart deploys "public.ecr.aws/aws-controllers-k8s/kinesis-controller:1.0.7".
2+
This chart deploys "public.ecr.aws/aws-controllers-k8s/kinesis-controller:1.0.6".
33

44
Check its status by running:
55
kubectl --namespace {{ .Release.Namespace }} get pods -l "app.kubernetes.io/instance={{ .Release.Name }}"

helm/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
image:
66
repository: public.ecr.aws/aws-controllers-k8s/kinesis-controller
7-
tag: 1.0.7
7+
tag: 1.0.6
88
pullPolicy: IfNotPresent
99
pullSecrets: []
1010

pkg/resource/stream/sdk.go

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
if resp.TargetShardCount != nil {
2+
ko.Status.OpenShardCount = aws.Int64(int64(*resp.TargetShardCount))
3+
}

test/e2e/tests/test_stream.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,12 @@ def test_crud(self):
7575
k8s.patch_custom_resource(ref, updates)
7676
time.sleep(MODIFY_WAIT_AFTER_SECONDS)
7777

78+
cr = k8s.get_resource(ref)
79+
7880
latest = stream.get(stream_name)
7981
assert latest is not None
8082
assert int(latest['OpenShardCount']) == int(shard_count)
83+
assert int(latest["OpenShardCount"]) == int(cr["status"]["openShardCount"])
8184

8285
k8s.delete_custom_resource(ref)
8386

0 commit comments

Comments
 (0)