-
Notifications
You must be signed in to change notification settings - Fork 3
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
Add support for IPSet CRD #4
Conversation
Skipping CI for Draft Pull Request. |
5ebfe8a
to
2aa478d
Compare
/test all |
2aa478d
to
9cc7f04
Compare
/retest |
1 similar comment
/retest |
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.
Thank you @TiberiuGC ! I left a few comments in line
go_version: go1.22.5 | ||
version: v0.35.0 |
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 you please pull code-gen v0.35.0?
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.
if resp.IPSet != nil { | ||
if resp.IPSet.Description != nil { | ||
ko.Spec.Description = resp.IPSet.Description | ||
} | ||
if resp.IPSet.Addresses != nil { | ||
ko.Spec.Addresses = resp.IPSet.Addresses | ||
} | ||
} |
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.
Instead, you can use https://github.com/aws-controllers-k8s/code-generator/blob/main/pkg/config/operation.go#L38-L40 to target resp.IPSet
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.
// A token used for optimistic locking. WAF returns a token to your get and | ||
// list requests, to mark the state of the entity at the time of the request. | ||
// To make changes to the entity associated with the token, you provide the | ||
// token to operations like update and delete. WAF uses the token to ensure | ||
// that no changes have been made to the entity since you last retrieved it. | ||
// If a change has been made, the update fails with a WAFOptimisticLockException. | ||
// If this happens, perform another get, and use the new token returned by that | ||
// operation. | ||
// +kubebuilder:validation:Optional | ||
LockToken *string `json:"lockToken,omitempty"` |
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.
Do we need the LockToken in the status?
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.
LockToken is required input for both SDK update and delete, so I believe we do need it? I am not aware of a better practice, lmk if there's one.
apis/v1alpha1/ip_set.go
Outdated
Description *string `json:"description,omitempty"` | ||
// The version of the IP addresses, either IPV4 or IPV6. | ||
// +kubebuilder:validation:Required | ||
IPAddressVersion *string `json:"iPAddressVersion"` |
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.
This is a bug in https://github.com/aws-controllers-k8s/pkg/tree/main/names - needs to be ipAddressVersion
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.
fixed in aws-controllers-k8s/pkg#31
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.
c1809a7
to
7f614c3
Compare
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.
Neat, thank you!
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: a-hilaly, TiberiuGC 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 |
Issue #, if available: aws-controllers-k8s/community#1300 Description of changes: - on top of, and to be reviewed after merging: #4 - adds support for RuleGroup CRD - adds integration tests for above By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Issue #, if available: aws-controllers-k8s/community#1300
Description of changes:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.