Skip to content
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 a new CRD to delegate vpc resource requests #210

Merged
merged 1 commit into from
May 18, 2023
Merged

Conversation

haouc
Copy link
Contributor

@haouc haouc commented Apr 29, 2023

Issue #, if available:

Description of changes:
We want to add a new CRD to delegate communications between this controller and VPC CNI, or other operators from dataplane in the future.

Design considerations

* The CRD object will be one-to-one mapping to worker node
    * one static object per node and last through the node lifespan
    * the object maps to VPC resources and EKS managed featured on the mapped node
* Instead of using v1beta1 we use v1alpha1 for easier, more compatible and conventional development iterations
* Adding Spec and Status
    * Spec: providing a description of the characteristics we want this CRD to have
        * Enabled features are listed as feature flags
            * SecurityGroupForPods
            * CustomNetworking
            * ...
    * Status: (Currently is empty) describing the current state of the VPC resources managed through this CRD, supplied and updated by the EKS networking addons.
        * Future potential use cases for VPC resources, for instance, various types of ENIs
            * list of trunk interfaces
            * list of primary interface
            * list of secondary interfaces
            * list of security groups
            * list of IP addresses to support warm target for branch interfaces
* Using name CNINode/CNINodes which are aligned with Kubernetes well adopted API extensions, such as CSI, CRI, and etc.
* Using enum for Spec and Status
* Using feature flag similar concept for Spec items
* metadata ObjectReference will be provided during creation to handle cascade deletion open node deletion events
* Will add Finalizer to control the GC process (design in process)
    * The Finalizer will refer to resources listed in Status 
* VPC RC will be responsible to CREATE/PATCH/DELET the CRD objects

Tests:

Created an object of the CRD

% k get cnd
NAME              FEATURES
cninode-example   ["SecurityGroupsForPods","CustomNetworking"]

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@haouc haouc requested a review from a team as a code owner April 29, 2023 01:11
Copy link
Contributor

@jdn5126 jdn5126 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Definition looks good to me. I'll give others a chance to review before approving

@haouc haouc requested review from M00nF1sh, jayanthvn and achevuru May 1, 2023 19:17
@haouc haouc force-pushed the pr-new-crd branch 2 times, most recently from b9e7e1d to 848e231 Compare May 17, 2023 00:31
@haouc haouc requested a review from ellistarn May 17, 2023 00:32
Copy link
Contributor

@ellistarn ellistarn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! A couple of minor optional comments.

Copy link
Contributor

@ellistarn ellistarn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! A couple of minor optional comments.

ellistarn
ellistarn previously approved these changes May 17, 2023
Copy link
Contributor

@ellistarn ellistarn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! A couple of minor optional comments.

@haouc haouc requested review from jayanthvn and jdn5126 May 17, 2023 16:30
@haouc haouc merged commit 979b2f9 into aws:master May 18, 2023
haouc added a commit that referenced this pull request May 29, 2023
* add healthz subpathes for all controllers (#201)

* support arch arg in dockerfile (#207)

* updated vpc limits to include fields for hypervisor type and bare metal status (#217)

* enable node events when instance type is not supported (#218)

* Associate primary network interface SG with the trunk ENI when SG is not specified in ENIConfig (#221)

* Associate primary network interface SG with the trunk ENI when SG is not specified in ENIConfig

* add a new CRD to delegate vpc resource requests (#210)

* upgrade controller runtime version (#227)

* rebased onto master branch

* fixed merge conflict

---------

Co-authored-by: Hao Zhou <[email protected]>
Co-authored-by: Sushmitha Ravikumar <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants