Skip to content

Commit 8629f0c

Browse files
authored
Support Describe Events (#49)
Issue #, if available: Resources don't have `Events` field in MemoryDB controller. Description of changes: 1. Support MemoryDB DescribeEvents for `ACL`, `Cluster`, `User`. Add `Events` field to those resources and add function to sync `Events` from service resource. 2. Add a custom logic into test framework to validate present of `Events`, and add e2e yaml test file for each resource to validate `Events`. 3. Fix resource name errors in document. By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
1 parent 06a8b26 commit 8629f0c

30 files changed

+387
-19
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
ack_generate_info:
2-
build_date: "2023-03-03T20:58:18Z"
2+
build_date: "2023-03-07T06:28:37Z"
33
build_hash: d0f3d78cbea8061f822cbceac3786128f091efe6
44
go_version: go1.19
55
version: v0.24.2
6-
api_directory_checksum: 321c79032b9f73aba90926b35167e224f577ecd6
6+
api_directory_checksum: 863961569e4c45d940e482713a85bac302b37d66
77
api_version: v1alpha1
88
aws_sdk_go_version: v1.44.93
99
generator_config_info:
10-
file_checksum: c1d34ab8fe5fc4fa9f0fcc7098afa04a4701e675
10+
file_checksum: c6f69226d010aa15f4ed3ac9f2b619bbdcdf798b
1111
original_file_name: generator.yaml
1212
last_modification:
1313
reason: API generation

apis/v1alpha1/acl.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.

apis/v1alpha1/cluster.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.

apis/v1alpha1/generator.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,11 @@ resources:
4242
from:
4343
operation: ListAllowedNodeTypeUpdates
4444
path: ScaleDownNodeTypes
45+
Events:
46+
is_read_only: true
47+
from:
48+
operation: DescribeEvents
49+
path: Events
4550
ParameterGroupName:
4651
references:
4752
resource: ParameterGroup
@@ -138,6 +143,11 @@ resources:
138143
- InvalidParameterValueException
139144
- InvalidParameterCombinationException
140145
fields:
146+
Events:
147+
is_read_only: true
148+
from:
149+
operation: DescribeEvents
150+
path: Events
141151
UserNames:
142152
references:
143153
resource: User
@@ -185,6 +195,11 @@ resources:
185195
is_secret: true
186196
compare:
187197
is_ignored: true
198+
Events:
199+
is_read_only: true
200+
from:
201+
operation: DescribeEvents
202+
path: Events
188203
hooks:
189204
sdk_create_post_set_output:
190205
code: "rm.setAnnotationsFields(desired, ko)"

apis/v1alpha1/types.go

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apis/v1alpha1/user.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.

apis/v1alpha1/zz_generated.deepcopy.go

Lines changed: 38 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/crd/bases/memorydb.services.k8s.aws_acls.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,25 @@ spec:
152152
- type
153153
type: object
154154
type: array
155+
events:
156+
description: A list of events. Each element in the list contains detailed
157+
information about one event.
158+
items:
159+
description: Represents a single occurrence of something interesting
160+
within the system. Some examples of events are creating a cluster
161+
or adding or removing a node.
162+
properties:
163+
date:
164+
format: date-time
165+
type: string
166+
message:
167+
type: string
168+
sourceName:
169+
type: string
170+
sourceType:
171+
type: string
172+
type: object
173+
type: array
155174
minimumEngineVersion:
156175
description: The minimum engine version supported for the ACL
157176
type: string

config/crd/bases/memorydb.services.k8s.aws_clusters.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,25 @@ spec:
322322
enginePatchVersion:
323323
description: The Redis engine patch version used by the cluster
324324
type: string
325+
events:
326+
description: A list of events. Each element in the list contains detailed
327+
information about one event.
328+
items:
329+
description: Represents a single occurrence of something interesting
330+
within the system. Some examples of events are creating a cluster
331+
or adding or removing a node.
332+
properties:
333+
date:
334+
format: date-time
335+
type: string
336+
message:
337+
type: string
338+
sourceName:
339+
type: string
340+
sourceType:
341+
type: string
342+
type: object
343+
type: array
325344
numberOfShards:
326345
description: The number of shards in the cluster
327346
format: int64

config/crd/bases/memorydb.services.k8s.aws_users.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,25 @@ spec:
176176
- type
177177
type: object
178178
type: array
179+
events:
180+
description: A list of events. Each element in the list contains detailed
181+
information about one event.
182+
items:
183+
description: Represents a single occurrence of something interesting
184+
within the system. Some examples of events are creating a cluster
185+
or adding or removing a node.
186+
properties:
187+
date:
188+
format: date-time
189+
type: string
190+
message:
191+
type: string
192+
sourceName:
193+
type: string
194+
sourceType:
195+
type: string
196+
type: object
197+
type: array
179198
minimumEngineVersion:
180199
description: The minimum engine version supported for the user
181200
type: string

0 commit comments

Comments
 (0)