-
Notifications
You must be signed in to change notification settings - Fork 60
Add support for ManagedPrefixLists in EC2 controller #295
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?
Conversation
|
Hi @alexcristi. Thanks for your PR. I'm waiting for a aws-controllers-k8s member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: alexcristi The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/ok-to-test |
|
@alexcristi: It looks like there's some compilation issues with these changes. Any chance there's some un-pushed commits? |
|
Thank you for taking time to look at this @knottnt, really appreciate it! |
|
Hold on, I need to test it again |
templates/hooks/managed_prefix_list/sdk_update_pre_build_request.go.tpl
Outdated
Show resolved
Hide resolved
templates/hooks/managed_prefix_list/sdk_read_many_post_build_request.go.tpl
Outdated
Show resolved
Hide resolved
templates/hooks/managed_prefix_list/sdk_create_post_set_output.go.tpl
Outdated
Show resolved
Hide resolved
|
/retest |
|
@knottnt - Also, what do you want me to do with |
@alexcristi That's a new optional PR check that we're testing out. Right now it's just informational for the reviewer. Since, the ec2-controller hasn't been rebuilt with |
|
/retest |
2 similar comments
|
/retest |
|
/retest |
|
/test ec2-kind-e2e |
|
@alexcristi: The following tests 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. |
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.
Sorry I missed this earlier, but checking the git diff from the ec2-verify-code-gen CI job it looks like the Helmrole-writer.yaml, role-reader.yaml, and helm/values.yalm files haven't been updated to include the managedprefixlists in resources list. These files should normally be updated when running make build-controller SERVICE=ec2 in the code-generator repo.
diff --git a/helm/templates/role-reader.yaml b/helm/templates/role-reader.yaml
index 1bab6b2..cfe2b49 100644
--- a/helm/templates/role-reader.yaml
+++ b/helm/templates/role-reader.yaml
@@ -23,6 +23,7 @@ rules:
- instances
- internetgateways
- launchtemplates
+ - managedprefixlists
- natgateways
- networkacls
- routetables
diff --git a/helm/templates/role-writer.yaml b/helm/templates/role-writer.yaml
index 162cc85..ba9465f 100644
--- a/helm/templates/role-writer.yaml
+++ b/helm/templates/role-writer.yaml
@@ -23,6 +23,7 @@ rules:
- instances
- internetgateways
- launchtemplates
+ - managedprefixlists
- natgateways
- networkacls
- routetables
@@ -52,6 +53,7 @@ rules:
- instances
- internetgateways
- launchtemplates
+ - managedprefixlists
- natgateways
- networkacls
- routetables
diff --git a/helm/values.yaml b/helm/values.yaml
index beac9dc..ad35f4c 100644
--- a/helm/values.yaml
+++ b/helm/values.yaml
@@ -152,6 +152,7 @@ reconcile:
- Instance
- InternetGateway
- LaunchTemplate
+ - ManagedPrefixList
- NATGateway
- NetworkACL
- RouteTable | type: string | ||
| - jsonPath: .status.version | ||
| name: VERSION | ||
| type: string |
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.
Double checking the verify-code-gen job I noticed that there are some differences in the ManagedPrefixList CRD being generated by that ProwJob. Tested building locally with controller-gen v0.16.2 and I still see these diffs (minus the controller-gen.kubebuilder.io/version annotation). Normally, changes to CRD field descriptions come from using a different version of the AWS SDK. Are you overriding this value when building the controller?
diff --git a/helm/crds/ec2.services.k8s.aws_managedprefixlists.yaml b/helm/crds/ec2.services.k8s.aws_managedprefixlists.yaml
index ce097b8..c6b3b53 100644
--- a/helm/crds/ec2.services.k8s.aws_managedprefixlists.yaml
+++ b/helm/crds/ec2.services.k8s.aws_managedprefixlists.yaml
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
- controller-gen.kubebuilder.io/version: v0.16.2
+ controller-gen.kubebuilder.io/version: v0.19.0
name: managedprefixlists.ec2.services.k8s.aws
spec:
group: ec2.services.k8s.aws
@@ -26,7 +26,7 @@ spec:
type: string
- jsonPath: .status.version
name: VERSION
- type: string
+ type: integer
name: v1alpha1
schema:
openAPIV3Schema:
@@ -57,12 +57,11 @@ spec:
properties:
addressFamily:
description: |-
- The IP address version.
+ The IP address type.
Valid Values: IPv4 | IPv6
type: string
entries:
- description: One or more entries for the prefix list.
items:
description: An entry for a prefix list.
properties:
@@ -80,8 +79,7 @@ spec:
description: |-
A name for the prefix list.
- Constraints: Up to 255 characters in length. The name cannot start with
- com.amazonaws.
+ Constraints: Up to 255 characters in length. The name cannot start with com.amazonaws.
type: string
tags:
description: |-
@@ -173,13 +171,13 @@ spec:
description: The ID of the owner of the prefix list.
type: string
prefixListARN:
- description: The Amazon Resource Name (ARN) of the prefix list.
+ description: The Amazon Resource Name (ARN) for the prefix list.
type: string
prefixListID:
description: The ID of the prefix list.
type: string
state:
- description: The state of the prefix list.
+ description: The current state of the prefix list.
type: string
stateMessage:
description: The state message.
Issue #, if available: aws-controllers-k8s/community#2665
Description of changes:
Added support for ManagedPrefixLists. This was validated with a KIND local cluster, and here are the results: