kubernetes / cloud-provider-aws

Cloud provider for AWS
https://cloud-provider-aws.sigs.k8s.io/
Apache License 2.0
374 stars 299 forks source link

Extract fargate related code into a standalone file #917

Closed dims closed 1 month ago

dims commented 1 month ago

Fargate Node is a "variant" of regular EC2 nodes and needs special processing, originally the code for handling this variant was sprinkled across the code base. In this PR, we split it out behind the Variant interface and it also gets registered using RegisterVariant when the package is imported explicitly. For now this is good enough to inspect how the code is different for this variation of the regular code as well as make changes if/when needed. We can even figure out how to use tags to build aws-cloud-controller-manager without this variant getting registered for example for CAPA or kops etc. If in the future there is a need for something other variant, we can cleanly drop in another package if needed similar to how we do this for fargate.

NOTE: design is based on how we implemented support for different container runtimes in cadvisor: https://github.com/google/cadvisor/tree/master/container

k8s-ci-robot commented 1 month ago

This issue is currently awaiting triage.

If cloud-provider-aws contributors determine this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.
hakman commented 1 month ago

@dims You will probably need to rebase to fix govulncheck.

dims commented 1 month ago

@dims You will probably need to rebase to fix govulncheck.

thanks @hakman Done!

dims commented 1 month ago

/release-note-none

dims commented 1 month ago

/kind cleanup

dims commented 1 month ago

/assign @hakman @kmala @cartermckinnon /hold

k8s-ci-robot commented 1 month ago

@dims: GitHub didn't allow me to assign the following users: kmala.

Note that only kubernetes members with read permissions, repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time. For more information please see the contributor guide

In response to [this](https://github.com/kubernetes/cloud-provider-aws/pull/917#issuecomment-2119066901): >/assign @hakman @kmala @cartermckinnon >/hold Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.
rsumukha commented 1 month ago

Ran a prow test suite against to validate Fargate tests, it was mostly successful with an unrelated test failure. gtg from Fargate side

kmala commented 1 month ago

/lgtm

k8s-ci-robot commented 1 month ago

@kmala: changing LGTM is restricted to collaborators

In response to [this](https://github.com/kubernetes/cloud-provider-aws/pull/917#issuecomment-2126232954): >/lgtm Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.
dims commented 1 month ago

/hold cancel

hakman commented 1 month ago

/lgtm

hakman commented 1 month ago

/approve

k8s-ci-robot commented 1 month ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hakman

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: - ~~[OWNERS](https://github.com/kubernetes/cloud-provider-aws/blob/master/OWNERS)~~ [hakman] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment