cluster-api-provider-aws icon indicating copy to clipboard operation
cluster-api-provider-aws copied to clipboard

✨ SubnetSchema support

Open krasoffski opened this issue 1 year ago • 8 comments
trafficstars

What type of PR is this? This PR adds functionality related to Subnet schema type, more details can be found in original issue #4784.

Add one of the following kinds: /kind feature

What this PR does / why we need it: As I mentioned above, this PR adds ability to configure preferred way for subnets division with priority to private as original behavior by default or public via PreferPublic. For existing users nothing is changed because original behavior is not changed and set as default. But new parameter PreferPublic allows to use provider in more specific cases like with Google Agones where subnet division to with public subnets priority fits better.

Which issue(s) this PR fixes Fixes #4784

Special notes for your reviewer: My first PR to AWS provider =)

Checklist:

  • [x] squashed commits
  • [x] includes documentation
  • [x] includes emojis
  • [x] adds unit tests
  • [x] updates e2e tests

Release note:

New  `AWSCluster.spec.network.vpc.SubnetSchema` parameter  which allows to change preferred way of subnet division to public and private. 

krasoffski avatar May 07 '24 12:05 krasoffski

CLA Signed

The committers listed above are authorized under a signed CLA.

  • :white_check_mark: login: krasoffski / name: Yury Krasouski (9534ec4be53b36efaae6412a34b2d7ea725f953b)

Welcome @krasoffski!

It looks like this is your first PR to kubernetes-sigs/cluster-api-provider-aws 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/cluster-api-provider-aws has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. :smiley:

k8s-ci-robot avatar May 07 '24 12:05 k8s-ci-robot

Hi @krasoffski. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

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-sigs/prow repository.

k8s-ci-robot avatar May 07 '24 12:05 k8s-ci-robot

Hi, @dlipovetsky and @richardcase Despite the fact, PR marked as size/XL the code change is small and simple. Rest of 90% of change is adding new unit tests.

krasoffski avatar May 13 '24 09:05 krasoffski

Hi, @dlipovetsky and @richardcase Please approve pipeline for this PR.

krasoffski avatar Jun 06 '24 06:06 krasoffski

Hi, @dlipovetsky and @richardcase Guys, please take a look.

krasoffski avatar Jun 20 '24 14:06 krasoffski

Hi, @dlipovetsky and @richardcase Could you please review this PR? It is about 2 months since I created PR.

krasoffski avatar Jul 03 '24 09:07 krasoffski

Thank you for your patience @krasoffski. It's taken be a while to get back into things after a 6 week break away.

/ok-to-test

richardcase avatar Jul 17 '24 10:07 richardcase

/test ?

richardcase avatar Jul 17 '24 10:07 richardcase

@richardcase: The following commands are available to trigger required jobs:

  • /test pull-cluster-api-provider-aws-build
  • /test pull-cluster-api-provider-aws-build-docker
  • /test pull-cluster-api-provider-aws-test
  • /test pull-cluster-api-provider-aws-verify

The following commands are available to trigger optional jobs:

  • /test pull-cluster-api-provider-aws-apidiff-main
  • /test pull-cluster-api-provider-aws-e2e
  • /test pull-cluster-api-provider-aws-e2e-blocking
  • /test pull-cluster-api-provider-aws-e2e-clusterclass
  • /test pull-cluster-api-provider-aws-e2e-conformance
  • /test pull-cluster-api-provider-aws-e2e-conformance-with-ci-artifacts
  • /test pull-cluster-api-provider-aws-e2e-eks
  • /test pull-cluster-api-provider-aws-e2e-eks-gc
  • /test pull-cluster-api-provider-aws-e2e-eks-testing

Use /test all to run the following jobs that were automatically triggered:

  • pull-cluster-api-provider-aws-apidiff-main
  • pull-cluster-api-provider-aws-build
  • pull-cluster-api-provider-aws-build-docker
  • pull-cluster-api-provider-aws-test
  • pull-cluster-api-provider-aws-verify

In response to this:

/test ?

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-sigs/prow repository.

k8s-ci-robot avatar Jul 17 '24 10:07 k8s-ci-robot

/test pull-cluster-api-provider-aws-e2e /test pull-cluster-api-provider-aws-e2e-eks

richardcase avatar Jul 17 '24 10:07 richardcase

Thank you, @richardcase

I will take a look for test problems and come back.

krasoffski avatar Jul 17 '24 10:07 krasoffski

/retest

krasoffski avatar Jul 17 '24 15:07 krasoffski

Hi, @richardcase I fixed comments and adjusted tests to the latest main. Need confirmation from your side.

krasoffski avatar Jul 18 '24 12:07 krasoffski

/test pull-cluster-api-provider-aws-e2e /test pull-cluster-api-provider-aws-e2e-eks

richardcase avatar Jul 18 '24 13:07 richardcase

/test pull-cluster-api-provider-aws-e2e

krasoffski avatar Jul 18 '24 14:07 krasoffski

@richardcase May I ask a question.

Do these jobs have timeouts or how long it usually takes to finish?

I am asking because I see that one of them running more than an hour. image

Updated. Found, I see that pull-cluster-api-provider-aws-e2e passed yearterday, but today both of them failed due to timeout for suite precondition. image

But it usually took about 2-3h in case everything is OK.

krasoffski avatar Jul 18 '24 14:07 krasoffski

Do these jobs have timeouts or how long it usually takes to finish?

Once the actual job starts running, there is a timeout (I forget what it is off the top of my head). And there are various timeouts in the tests (configured in the e2e config). There can be a delay from the Prow side before the tests are actually executed, this doesn't feed into the test timeout, though.

richardcase avatar Jul 18 '24 15:07 richardcase

Timeout is 4 hours: https://github.com/kubernetes-sigs/cluster-api-provider-aws/blob/main/Makefile#L163

richardcase avatar Jul 18 '24 15:07 richardcase

And the prow job has a 5 hour timeout: https://github.com/kubernetes/test-infra/blob/master/config/jobs/kubernetes-sigs/cluster-api-provider-aws/cluster-api-provider-aws-presubmits.yaml#L335

richardcase avatar Jul 18 '24 15:07 richardcase

Thank you, @richardcase It seems like tests are finished without issues.

krasoffski avatar Jul 18 '24 19:07 krasoffski

/milestone v2.6.0

richardcase avatar Jul 22 '24 16:07 richardcase

The e2e tests have passed.

This change looks good to me, thanks for this @krasoffski .

/approve

richardcase avatar Jul 23 '24 16:07 richardcase

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: richardcase

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 /approve in a comment Approvers can cancel approval by writing /approve cancel in a comment

k8s-ci-robot avatar Jul 23 '24 16:07 k8s-ci-robot

Thank you, Guys. I am very appreciate this.

krasoffski avatar Jul 24 '24 06:07 krasoffski