Skip to content

Commit 175fa03

Browse files
authored
Add creationTime to Status for ScalableTarget and ScalingPolicy resources (#39)
Issue #, if available: aws-controllers-k8s/community#932 Description of changes: Add creationTime to Status for ScalableTarget and ScalingPolicy resources based off of [code gen changes in this PR.](aws-controllers-k8s/code-generator#183) TODO: Add required check to the existing integration test. Testing Manually tested that the field is present in the Status of the `kubectl get` response. Kind tests pass locally By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
1 parent 46b9458 commit 175fa03

12 files changed

+67
-7
lines changed
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
ack_generate_info:
2-
build_date: "2021-09-01T20:10:23Z"
3-
build_hash: 709a1e110beb1da248c87c7738f97282d90556ba
4-
go_version: go1.16.4 linux/amd64
5-
version: v0.13.0
6-
api_directory_checksum: 8697d12182de3cc93f7263c2a5d45e480b77bf05
2+
build_date: "2021-09-07T08:45:14Z"
3+
build_hash: a866a846b883a772c4671061783ccc21a48f9412
4+
go_version: go1.14.14 darwin/amd64
5+
version: v0.13.1
6+
api_directory_checksum: bc90bf21f7a4464d61820779f0f653f2c7c6a435
77
api_version: v1alpha1
88
aws_sdk_go_version: v1.37.10
99
generator_config_info:
10-
file_checksum: 3a90c2bd1de76386b501f03f43aa7895e7d60127
10+
file_checksum: 4bf1e52543400e3d52cc745da4c1e2e518e9e1e1
1111
original_file_name: generator.yaml
1212
last_modification:
1313
reason: API generation
14-
timestamp: 2021-09-01 20:10:27.994424987 +0000 UTC
14+
timestamp: 2021-09-07 08:45:22.851379 +0000 UTC

apis/v1alpha1/generator.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,23 @@ resources:
2828
fields:
2929
ResourceID:
3030
is_name: true
31+
CreationTime:
32+
is_read_only: true
33+
from:
34+
operation: DescribeScalableTargets
35+
path: ScalableTargets..CreationTime
3136
ScalingPolicy:
3237
is_adoptable: false
3338
fields:
3439
ResourceID:
3540
is_name: true
3641
PolicyARN:
3742
is_arn: true
43+
CreationTime:
44+
is_read_only: true
45+
from:
46+
operation: DescribeScalingPolicies
47+
path: ScalingPolicies..CreationTime
3848
ignore:
3949
resource_names:
4050
- ScheduledAction

apis/v1alpha1/scalable_target.go

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

apis/v1alpha1/scaling_policy.go

Lines changed: 3 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: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/crd/bases/applicationautoscaling.services.k8s.aws_scalabletargets.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,10 @@ spec:
238238
- type
239239
type: object
240240
type: array
241+
creationTime:
242+
description: The Unix timestamp for when the scalable target was created.
243+
format: date-time
244+
type: string
241245
type: object
242246
type: object
243247
served: true

config/crd/bases/applicationautoscaling.services.k8s.aws_scalingpolicies.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,10 @@ spec:
329329
- type
330330
type: object
331331
type: array
332+
creationTime:
333+
description: The Unix timestamp for when the scaling policy was created.
334+
format: date-time
335+
type: string
332336
type: object
333337
type: object
334338
served: true

generator.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,23 @@ resources:
2828
fields:
2929
ResourceID:
3030
is_name: true
31+
CreationTime:
32+
is_read_only: true
33+
from:
34+
operation: DescribeScalableTargets
35+
path: ScalableTargets..CreationTime
3136
ScalingPolicy:
3237
is_adoptable: false
3338
fields:
3439
ResourceID:
3540
is_name: true
3641
PolicyARN:
3742
is_arn: true
43+
CreationTime:
44+
is_read_only: true
45+
from:
46+
operation: DescribeScalingPolicies
47+
path: ScalingPolicies..CreationTime
3848
ignore:
3949
resource_names:
4050
- ScheduledAction

helm/crds/applicationautoscaling.services.k8s.aws_scalabletargets.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,10 @@ spec:
238238
- type
239239
type: object
240240
type: array
241+
creationTime:
242+
description: The Unix timestamp for when the scalable target was created.
243+
format: date-time
244+
type: string
241245
type: object
242246
type: object
243247
served: true

helm/crds/applicationautoscaling.services.k8s.aws_scalingpolicies.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,10 @@ spec:
329329
- type
330330
type: object
331331
type: array
332+
creationTime:
333+
description: The Unix timestamp for when the scaling policy was created.
334+
format: date-time
335+
type: string
332336
type: object
333337
type: object
334338
served: true

0 commit comments

Comments
 (0)