-
Notifications
You must be signed in to change notification settings - Fork 40
Add serverlesscache to elasticache #175
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
base: main
Are you sure you want to change the base?
Add serverlesscache to elasticache #175
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: rushmash91 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
4e8c424
to
23bb928
Compare
fc9cbc6
to
667b5c5
Compare
/test elasticache-kind-e2e |
1f5cf20
to
61ea0e8
Compare
unrelated test.. |
61ea0e8
to
767653a
Compare
synced: | ||
when: | ||
- path: Status.Status | ||
in: | ||
- available |
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.
The status here should be capitalized: https://github.com/aws/aws-sdk-go-v2/blob/0475b822f1f48ca746369818d51272f989c06b91/service/elasticache/types/types.go#L2019
Also, should CREATE_FAILED be a synced/terminal condition?
- ServerlessCacheAlreadyExistsFault | ||
- ServerlessCacheQuotaForCustomerExceededFault | ||
- InvalidParameterValue | ||
- InvalidParameterCombination | ||
- InvalidVPCNetworkStateFault | ||
- TagQuotaPerResourceExceeded | ||
- InvalidKMSKeyFault |
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.
maybe we should ensure these are truly terminal
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.
Should we change for all resources? havent had any customer issues reported yet.
print: | ||
add_age_column: true | ||
add_synced_column: true |
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.
these are true by default i believe
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.
No they are not, trying to have serverless cache as consistent with cache cluster as possible..
if r.ko.Status.Status == nil { | ||
return false | ||
} | ||
return *r.ko.Status.Status == "creating" |
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.
Maybe make the states Constants?
Also this one should also be capitalized
if r.ko.Status.Status == nil { | ||
return false | ||
} | ||
return *r.ko.Status.Status == "deleting" |
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.
ditto
if r.ko.Status.Status == nil { | ||
return false | ||
} | ||
return *r.ko.Status.Status == "modifying" |
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.
ditto
case delta.DifferentAt("Spec.Description"): | ||
if err := rm.syncDescription(ctx, desired); err != nil { | ||
return nil, fmt.Errorf("cannot update serverless cache: %v", err) | ||
} | ||
|
||
case delta.DifferentAt("Spec.Tags"): | ||
if err := rm.syncTags(ctx, desired, latest); err != nil { | ||
return &resource{ko}, err | ||
} | ||
|
||
case delta.DifferentAt("Spec.DailySnapshotTime"): | ||
if err := rm.syncDailySnapshotTime(ctx, desired); err != nil { | ||
return nil, fmt.Errorf("cannot update serverless cache: %v", err) | ||
} | ||
|
||
case delta.DifferentAt("Spec.SnapshotRetentionLimit"): | ||
if err := rm.syncSnapshotRetentionLimit(ctx, desired); err != nil { | ||
return nil, fmt.Errorf("cannot update serverless cache: %v", err) | ||
} | ||
|
||
case delta.DifferentAt("Spec.SecurityGroupIDs"): | ||
if err := rm.syncSecurityGroupIDs(ctx, desired); err != nil { | ||
return nil, fmt.Errorf("cannot update serverless cache: %v", err) | ||
} | ||
|
||
case delta.DifferentAt("Spec.UserGroupID"): | ||
if err := rm.syncUserGroupID(ctx, desired); err != nil { | ||
return nil, fmt.Errorf("cannot update serverless cache: %v", err) | ||
} | ||
|
||
case delta.DifferentAt("Spec.CacheUsageLimits"): | ||
if err := rm.syncCacheUsageLimits(ctx, desired); err != nil { | ||
return nil, fmt.Errorf("cannot update serverless cache: %v", err) | ||
} | ||
|
||
case delta.DifferentAt("Spec.Engine") || delta.DifferentAt("Spec.MajorEngineVersion"): | ||
if err := rm.syncEngineAndVersion(ctx, desired); err != nil { |
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.
can we not set all values in the same call (except Tags)? with this code we will be updating a single field at a time
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.
That is the point 🙂
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.
767653a
to
c18af55
Compare
@rushmash91: The following test failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
fixes aws-controllers-k8s/community#2522
Description of changes:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.