Skip to content

Commit d23383b

Browse files
author
Gustavo Diaz
committed
Ready condition migration for cloudwatch controller
1 parent 7cf6592 commit d23383b

13 files changed

+33
-31
lines changed

apis/v1alpha1/ack-generate-metadata.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
ack_generate_info:
2-
build_date: "2025-09-19T16:55:33Z"
3-
build_hash: 6b4211163dcc34776b01da9a18217bac0f4103fd
4-
go_version: go1.24.6
5-
version: v0.52.0
2+
build_date: "2025-09-25T05:17:06Z"
3+
build_hash: 9c388d9668ea19d0b1b65566d492c4f67c6e64c8
4+
go_version: go1.24.7
5+
version: 9c388d9
66
api_directory_checksum: 96da551bae0f7145461817315244bfb60d5fa4ab
77
api_version: v1alpha1
88
aws_sdk_go_version: 1.32.6

config/crd/bases/cloudwatch.services.k8s.aws_metricalarms.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
33
kind: CustomResourceDefinition
44
metadata:
55
annotations:
6-
controller-gen.kubebuilder.io/version: v0.16.2
6+
controller-gen.kubebuilder.io/version: v0.19.0
77
name: metricalarms.cloudwatch.services.k8s.aws
88
spec:
99
group: cloudwatch.services.k8s.aws

config/crd/bases/cloudwatch.services.k8s.aws_metricstreams.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
33
kind: CustomResourceDefinition
44
metadata:
55
annotations:
6-
controller-gen.kubebuilder.io/version: v0.16.2
6+
controller-gen.kubebuilder.io/version: v0.19.0
77
name: metricstreams.cloudwatch.services.k8s.aws
88
spec:
99
group: cloudwatch.services.k8s.aws

go.mod

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,3 +88,5 @@ require (
8888
sigs.k8s.io/structured-merge-diff/v4 v4.4.2 // indirect
8989
sigs.k8s.io/yaml v1.4.0 // indirect
9090
)
91+
92+
replace github.com/aws-controllers-k8s/runtime => github.com/gustavodiaz7722/ack-runtime v0.57.0

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
github.com/aws-controllers-k8s/runtime v0.52.0 h1:Q5UIAn6SSBr60t/DiU/zr6NLBlUuK2AG3yy2ma/9gDU=
2-
github.com/aws-controllers-k8s/runtime v0.52.0/go.mod h1:OkUJN+Ds799JLYZsMJrO2vDJ4snxUeHK2MgrQHbU+Qc=
31
github.com/aws/aws-sdk-go v1.49.0 h1:g9BkW1fo9GqKfwg2+zCD+TW/D36Ux+vtfJ8guF4AYmY=
42
github.com/aws/aws-sdk-go v1.49.0/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk=
53
github.com/aws/aws-sdk-go-v2 v1.36.0 h1:b1wM5CcE65Ujwn565qcwgtOTT1aT4ADOHHgglKjG7fk=
@@ -84,6 +82,8 @@ github.com/google/pprof v0.0.0-20241029153458-d1b30febd7db h1:097atOisP2aRj7vFgY
8482
github.com/google/pprof v0.0.0-20241029153458-d1b30febd7db/go.mod h1:vavhavw2zAxS5dIdcRluK6cSGGPlZynqzFM8NdvU144=
8583
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
8684
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
85+
github.com/gustavodiaz7722/ack-runtime v0.57.0 h1:85zJyvdPpzOTaWE0icljJcMRf0qlP0oWdOT05hMZ6Z0=
86+
github.com/gustavodiaz7722/ack-runtime v0.57.0/go.mod h1:OkUJN+Ds799JLYZsMJrO2vDJ4snxUeHK2MgrQHbU+Qc=
8787
github.com/itchyny/gojq v0.12.6 h1:VjaFn59Em2wTxDNGcrRkDK9ZHMNa8IksOgL13sLL4d0=
8888
github.com/itchyny/gojq v0.12.6/go.mod h1:ZHrkfu7A+RbZLy5J1/JKpS4poEqrzItSTGDItqsfP0A=
8989
github.com/itchyny/timefmt-go v0.1.3 h1:7M3LGVDsqcd0VZH2U+x393obrzZisp7C0uEe921iRkU=

helm/crds/cloudwatch.services.k8s.aws_metricalarms.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
33
kind: CustomResourceDefinition
44
metadata:
55
annotations:
6-
controller-gen.kubebuilder.io/version: v0.16.2
6+
controller-gen.kubebuilder.io/version: v0.19.0
77
name: metricalarms.cloudwatch.services.k8s.aws
88
spec:
99
group: cloudwatch.services.k8s.aws

helm/crds/cloudwatch.services.k8s.aws_metricstreams.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
33
kind: CustomResourceDefinition
44
metadata:
55
annotations:
6-
controller-gen.kubebuilder.io/version: v0.16.2
6+
controller-gen.kubebuilder.io/version: v0.19.0
77
name: metricstreams.cloudwatch.services.k8s.aws
88
spec:
99
group: cloudwatch.services.k8s.aws

helm/crds/services.k8s.aws_adoptedresources.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
33
kind: CustomResourceDefinition
44
metadata:
55
annotations:
6-
controller-gen.kubebuilder.io/version: v0.16.2
6+
controller-gen.kubebuilder.io/version: v0.19.0
77
name: adoptedresources.services.k8s.aws
88
spec:
99
group: services.k8s.aws

helm/crds/services.k8s.aws_fieldexports.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
33
kind: CustomResourceDefinition
44
metadata:
55
annotations:
6-
controller-gen.kubebuilder.io/version: v0.16.2
6+
controller-gen.kubebuilder.io/version: v0.19.0
77
name: fieldexports.services.k8s.aws
88
spec:
99
group: services.k8s.aws

test/e2e/condition.py

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
from acktest.k8s import resource as k8s
2323

2424
CONDITION_TYPE_ADOPTED = "ACK.Adopted"
25-
CONDITION_TYPE_RESOURCE_SYNCED = "ACK.ResourceSynced"
25+
CONDITION_TYPE_READY = "Ready"
2626
CONDITION_TYPE_TERMINAL = "ACK.Terminal"
2727
CONDITION_TYPE_RECOVERABLE = "ACK.Recoverable"
2828
CONDITION_TYPE_ADVISORY = "ACK.Advisory"
@@ -31,11 +31,11 @@
3131

3232
def assert_type_status(
3333
ref: k8s.CustomResourceReference,
34-
cond_type_match: str = CONDITION_TYPE_RESOURCE_SYNCED,
34+
cond_type_match: str = CONDITION_TYPE_READY,
3535
cond_status_match: bool = True,
3636
):
3737
"""Asserts that the supplied resource has a condition of type
38-
ACK.ResourceSynced and that the Status of this condition is True.
38+
Ready and that the Status of this condition is True.
3939
4040
Usage:
4141
from acktest.k8s import resource as k8s
@@ -50,7 +50,7 @@ def assert_type_status(
5050
k8s.wait_resource_consumed_by_controller(ref)
5151
condition.assert_type_status(
5252
ref,
53-
condition.CONDITION_TYPE_RESOURCE_SYNCED,
53+
condition.CONDITION_TYPE_READY,
5454
False)
5555
5656
Raises:
@@ -75,7 +75,7 @@ def assert_synced_status(
7575
cond_status_match: bool,
7676
):
7777
"""Asserts that the supplied resource has a condition of type
78-
ACK.ResourceSynced and that the Status of this condition is True.
78+
Ready and that the Status of this condition is True.
7979
8080
Usage:
8181
from acktest.k8s import resource as k8s
@@ -91,15 +91,15 @@ def assert_synced_status(
9191
condition.assert_synced_status(ref, False)
9292
9393
Raises:
94-
pytest.fail when ACK.ResourceSynced condition is not found or is not in
94+
pytest.fail when Ready condition is not found or is not in
9595
a True status.
9696
"""
97-
assert_type_status(ref, CONDITION_TYPE_RESOURCE_SYNCED, cond_status_match)
97+
assert_type_status(ref, CONDITION_TYPE_READY, cond_status_match)
9898

9999

100-
def assert_synced(ref: k8s.CustomResourceReference):
100+
def assert_ready(ref: k8s.CustomResourceReference):
101101
"""Asserts that the supplied resource has a condition of type
102-
ACK.ResourceSynced and that the Status of this condition is True.
102+
Ready and that the Status of this condition is True.
103103
104104
Usage:
105105
from acktest.k8s import resource as k8s
@@ -112,18 +112,18 @@ def assert_synced(ref: k8s.CustomResourceReference):
112112
)
113113
k8s.create_custom_resource(ref, resource_data)
114114
k8s.wait_resource_consumed_by_controller(ref)
115-
condition.assert_synced(ref)
115+
condition.assert_ready(ref)
116116
117117
Raises:
118-
pytest.fail when ACK.ResourceSynced condition is not found or is not in
118+
pytest.fail when Ready condition is not found or is not in
119119
a True status.
120120
"""
121121
return assert_synced_status(ref, True)
122122

123123

124-
def assert_not_synced(ref: k8s.CustomResourceReference):
124+
def assert_not_ready(ref: k8s.CustomResourceReference):
125125
"""Asserts that the supplied resource has a condition of type
126-
ACK.ResourceSynced and that the Status of this condition is False.
126+
Ready and that the Status of this condition is False.
127127
128128
Usage:
129129
from acktest.k8s import resource as k8s
@@ -136,10 +136,10 @@ def assert_not_synced(ref: k8s.CustomResourceReference):
136136
)
137137
k8s.create_custom_resource(ref, resource_data)
138138
k8s.wait_resource_consumed_by_controller(ref)
139-
condition.assert_not_synced(ref)
139+
condition.assert_not_ready(ref)
140140
141141
Raises:
142-
pytest.fail when ACK.ResourceSynced condition is not found or is not in
142+
pytest.fail when Ready condition is not found or is not in
143143
a False status.
144144
"""
145145
return assert_synced_status(ref, False)

0 commit comments

Comments
 (0)