Skip to content

feat: aws_ec2_fleet resource - #1405

Merged
turkenf merged 3 commits into
crossplane-contrib:mainfrom
teabot:resource/fleet
Aug 7, 2024
Merged

feat: aws_ec2_fleet resource#1405
turkenf merged 3 commits into
crossplane-contrib:mainfrom
teabot:resource/fleet

Conversation

@teabot

@teabot teabot commented Jul 18, 2024

Copy link
Copy Markdown
Contributor

Description of your changes

Added aws_ec2_fleet resource to the provider.

Fixes #

I have:

  • Read and followed Crossplane's contribution process.
  • Run make reviewable to ensure this PR is ready for review.
  • Added backport release-x.y labels to auto-backport this PR if necessary.

How has this code been tested

Local run of uptest:

> export UPTEST_EXAMPLE_LIST=examples/ec2/v1beta1/fleetrequest.yaml
> make e2e
...
=== CONT  kuttl
    harness.go:402: run tests finished
    harness.go:511: cleaning up
    harness.go:553: skipping cluster tear down
    harness.go:554: to connect to the cluster, run: export KUBECONFIG="/Users/elliot.west/git/provider-upjet-aws/kubeconfig"
--- PASS: kuttl (50.59s)
    --- PASS: kuttl/harness (0.00s)
        --- PASS: kuttl/harness/case (49.81s)
PASS
19:26:45 [ OK ] running automated tests

@jeanduplessis

Copy link
Copy Markdown
Collaborator

/test-examples="examples/ec2/v1beta1/fleetrequest.yaml"

@turkenf turkenf left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thank you for your effort @teabot, I left a few comments for you to consider.

Comment thread examples/ec2/v1beta1/fleetrequest.yaml Outdated
Comment thread examples/ec2/v1beta1/fleetrequest.yaml Outdated
Comment thread examples/ec2/v1beta1/fleetrequest.yaml Outdated
Comment thread examples/ec2/v1beta1/fleetrequest.yaml Outdated
@teabot

teabot commented Jul 25, 2024

Copy link
Copy Markdown
Contributor Author

Thanks for the feedback @turkenf. I have applied the changes requested. Note that in this providers, the existing spot fleet nomeclature includes a Request suffix. That may also be considered to be erroneous, but I'll consider it outside of the scope of this ticket.

@jeanduplessis

Copy link
Copy Markdown
Collaborator

/test-examples="examples/ec2/v1beta1/fleetrequest.yaml"

Comment thread examples/ec2/v1beta1/fleetrequest.yaml Outdated
Comment thread examples/ec2/v1beta1/fleetrequest.yaml Outdated
@teabot

teabot commented Jul 25, 2024

Copy link
Copy Markdown
Contributor Author

/test-examples="examples/ec2/v1beta1/fleet.yaml"

@turkenf

turkenf commented Jul 25, 2024

Copy link
Copy Markdown
Collaborator

/test-examples="examples/ec2/v1beta1/fleet.yaml"

@teabot

teabot commented Jul 25, 2024

Copy link
Copy Markdown
Contributor Author

This example passes local upsets, however I notice the following issues, and would appreciate help solving them:

  1. forProvider.launchTemplateConfig.launchTemplateSpecification.versionSelector does not function properly and returns null despite all launch templates having a version (ec2: Fleet missing reference to launch template version #118). Please advise where I might look to fix this. I bypass this by setting a value of (string)"1", when we might also reasonably expect this to be an integer. Note that this does't affect my use-case, and so I'd been keen for this PR to move forward regardless, however I would prefer to fix this.
  2. In TF, --no-terminate-instances seems to be set by default to true for fleet type instant, which is not allowed. This is perhaps a TF issue, but if there is a way to manage this behaviour in this provider then please let me know.
  3. Some properties, that we might know to accept only integers or booleans, require a string type. Presumably this is erroneously defined/resolved from TF and enforced in the CRD. If there is a way to correct this behaviour locally in this provider, please let me know.

cc. @turkenf

@teabot
teabot marked this pull request as ready for review July 25, 2024 18:55
@teabot teabot changed the title ec2_fleet feat: aws_ec2_fleet resource Jul 25, 2024
@turkenf

turkenf commented Jul 27, 2024

Copy link
Copy Markdown
Collaborator

/test-examples="examples/ec2/v1beta1/fleet.yaml"

@teabot

teabot commented Aug 1, 2024

Copy link
Copy Markdown
Contributor Author

@turkenf Is anything else required here?

@teabot
teabot requested a review from turkenf August 1, 2024 12:13
Comment thread examples/ec2/v1beta1/fleet.yaml
@turkenf

turkenf commented Aug 1, 2024

Copy link
Copy Markdown
Collaborator

Thank you very much for your interest @teabot.

About the issues and solutions you noticed in this comment, let's open the issues and discuss them there. There is already an issue with missing reference, you can open issues for other ones. I think these issues are not a blocker for us to move this PR forward.

@turkenf

turkenf commented Aug 1, 2024

Copy link
Copy Markdown
Collaborator

@teabot

teabot commented Aug 6, 2024

Copy link
Copy Markdown
Contributor Author

@teabot
teabot force-pushed the resource/fleet branch 2 times, most recently from fe8ee30 to a57a3d4 Compare August 7, 2024 08:28
@teabot
teabot requested a review from turkenf August 7, 2024 08:46
@turkenf

turkenf commented Aug 7, 2024

Copy link
Copy Markdown
Collaborator

/test-examples="examples/ec2/v1beta1/fleet.yaml"

Uptest run: https://github.com/crossplane-contrib/provider-upjet-aws/actions/runs/10283336838

teabot added 3 commits August 7, 2024 14:43
Signed-off-by: Elliot West <elliot.west@dremio.com>

Update examples/ec2/v1beta1/fleetrequest.yaml

Co-authored-by: Fatih Türken <103541666+turkenf@users.noreply.github.com>
Signed-off-by: Elliot West <elliot.west@dremio.com>

Update examples/ec2/v1beta1/fleetrequest.yaml

Co-authored-by: Fatih Türken <103541666+turkenf@users.noreply.github.com>
Signed-off-by: Elliot West <elliot.west@dremio.com>

Update examples/ec2/v1beta1/fleetrequest.yaml

Co-authored-by: Fatih Türken <103541666+turkenf@users.noreply.github.com>
Signed-off-by: Elliot West <elliot.west@dremio.com>

Passing fleet

Signed-off-by: Elliot West <elliot.west@dremio.com>
Signed-off-by: Elliot West <elliot.west@dremio.com>
Signed-off-by: Elliot West <elliot.west@dremio.com>

@turkenf turkenf left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM 🙌

@turkenf
turkenf merged commit 34f77c2 into crossplane-contrib:main Aug 7, 2024
@teabot
teabot deleted the resource/fleet branch August 7, 2024 16:16
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.

3 participants