-
Notifications
You must be signed in to change notification settings - Fork 20
Add LastModifiedTime to Status for ScalableTarget and ScalingPolicy resources #40
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
ack_generate_info: | ||
build_date: "2021-09-08T23:45:08Z" | ||
build_hash: 394e8294aabf0b221c35f7a5c7bc7e4e43bc6f10 | ||
go_version: go1.16.4 linux/amd64 | ||
build_date: "2021-09-10T21:06:37Z" | ||
build_hash: a988bddaea3800999e8a548e0e7a4fd44cc00b19 | ||
go_version: go1.14.14 darwin/amd64 | ||
version: v0.13.2 | ||
api_directory_checksum: 155104e002d9c69b75fd9e85789bf7ee292b866c | ||
api_directory_checksum: a13caf20935ebb6193efdee1ab377cae33311ad7 | ||
api_version: v1alpha1 | ||
aws_sdk_go_version: v1.37.10 | ||
generator_config_info: | ||
file_checksum: 4bf1e52543400e3d52cc745da4c1e2e518e9e1e1 | ||
file_checksum: 968c7d8481a61c0299fc373cc6d1692a52b55868 | ||
original_file_name: generator.yaml | ||
last_modification: | ||
reason: API generation | ||
timestamp: 2021-09-08 23:45:13.439536495 +0000 UTC | ||
timestamp: 2021-09-10 21:06:47.280077 +0000 UTC |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"). You may | ||
// not use this file except in compliance with the License. A copy of the | ||
// License is located at | ||
// | ||
// http://aws.amazon.com/apache2.0/ | ||
// | ||
// or in the "license" file accompanying this file. This file is distributed | ||
// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either | ||
// express or implied. See the License for the specific language governing | ||
// permissions and limitations under the License. | ||
|
||
package scaling_policy | ||
|
||
import ( | ||
svcapitypes "github.com/aws-controllers-k8s/applicationautoscaling-controller/apis/v1alpha1" | ||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | ||
"time" | ||
) | ||
|
||
// customSetOutputUpdate sets the LastModifiedTime field to the current time post an update | ||
func (rm *resourceManager) customSetLastModifiedTime(ko *svcapitypes.ScalingPolicy) { | ||
currentTime := metav1.Time{Time: time.Now().UTC()} | ||
ko.Status.LastModifiedTime = ¤tTime | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need reordering