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

✨ feat: add EKS addon support #2202

Merged
merged 1 commit into from
Jan 21, 2021
Merged

✨ feat: add EKS addon support #2202

merged 1 commit into from
Jan 21, 2021

Conversation

richardcase
Copy link
Member

@richardcase richardcase commented Jan 13, 2021

What this PR does / why we need it:
This change adds support for installing/managing EKS addons as part of the control plane reconciliation.

It includes:

  • EKS Addon reconciliation
  • New clusterawsadm commands to list installed/available addons
  • Additional permissions to the controller policy
  • Webhook check to make sure we have a supported k8s version
  • Updated e2e tests

Additionally a number of minor bugs have been fixed with the e2e tests/

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #2139

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Jan 13, 2021
@k8s-ci-robot k8s-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Jan 13, 2021
@richardcase richardcase changed the title WIP ✨ feat: add EKS addon support ✨ feat: add EKS addon support Jan 15, 2021
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 15, 2021
@richardcase
Copy link
Member Author

/test ?

@k8s-ci-robot
Copy link
Contributor

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

  • /test pull-cluster-api-provider-aws-test
  • /test pull-cluster-api-provider-aws-build
  • /test pull-cluster-api-provider-aws-verify
  • /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
  • /test pull-cluster-api-provider-aws-e2e-eks

Use /test all to run the following jobs:

  • pull-cluster-api-provider-aws-test
  • pull-cluster-api-provider-aws-build
  • 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/test-infra repository.

@richardcase
Copy link
Member Author

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

cmd/clusterawsadm/cmd/eks/addons/list-available.go Outdated Show resolved Hide resolved
cmd/clusterawsadm/cmd/eks/addons/list-installed.go Outdated Show resolved Hide resolved
cmd/clusterawsadm/cmd/eks/addons/list-installed.go Outdated Show resolved Hide resolved
docs/book/src/topics/eks/addons.md Show resolved Hide resolved
pkg/cloud/services/eks/addons.go Outdated Show resolved Hide resolved
@randomvariable
Copy link
Member

Would you want to control addons declaratively in the future? If so, might want to move the commands to underneath alpha if it's not going to be longterm.

@richardcase
Copy link
Member Author

Would you want to control addons declaratively in the future? If so, might want to move the commands to underneath alpha if it's not going to be longterm.

I think we'll want a utility for users to help them see what addons are available (and installed) for the longterm. This would be purely read and any operations have to be via the AWSManagedControlPlane

@richardcase
Copy link
Member Author

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

@randomvariable
Copy link
Member

Need #2216 to let the e2e-image build correctly

controlplane/eks/api/v1alpha3/types.go Outdated Show resolved Hide resolved
for _, procedure := range procedures {
s.scope.V(2).Info("Executing addon procedure", "name", procedure.Name())
if err := procedure.Do(ctx); err != nil {
s.scope.Error(err, "failed executing addon procedure", "name", procedure.Name())
Copy link
Contributor

Choose a reason for hiding this comment

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

could the addon status be set to failed in this case?

Copy link
Member Author

Choose a reason for hiding this comment

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

I've added the status to the state of the addon and this will be set via the state returned by the API. So I don't want to manually set a status.

In the scenario where there are multiple addons and one fails do you think we should carry on with the others or stop processing? At the moment we stop processing but I'm thinking we should continue on after reporting the error.

pkg/cloud/services/eks/addons.go Outdated Show resolved Hide resolved
pkg/eks/addons/procedures.go Outdated Show resolved Hide resolved
@richardcase richardcase changed the title ✨ feat: add EKS addon support WIP ✨ feat: add EKS addon support Jan 18, 2021
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 18, 2021
@richardcase
Copy link
Member Author

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

2 similar comments
@richardcase
Copy link
Member Author

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

@richardcase
Copy link
Member Author

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

@richardcase
Copy link
Member Author

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

3 similar comments
@richardcase
Copy link
Member Author

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

@richardcase
Copy link
Member Author

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

@richardcase
Copy link
Member Author

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

@richardcase richardcase changed the title WIP ✨ feat: add EKS addon support ✨ feat: add EKS addon support Jan 19, 2021
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 19, 2021
@richardcase
Copy link
Member Author

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

1 similar comment
@richardcase
Copy link
Member Author

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

@richardcase
Copy link
Member Author

e2e test are passing.

cmd/clusterawsadm/cmd/eks/addons/list-available.go Outdated Show resolved Hide resolved
pkg/cloud/converters/eks.go Show resolved Hide resolved
This change adds support for installing/managing EKS addons
as part of the control plane reconciliation.

It includes:

* EKS Addon reconciliation
* New clusterawsadm commands to list installed/available addons
* Additional permissions to the controller policy
* Webhook check to make sure we have a supported k8s version
* Updated e2e tests
* New cluster flavor using the VPC CNI addon
@MarcusNoble
Copy link
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 21, 2021
@randomvariable
Copy link
Member

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: randomvariable

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 k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 21, 2021
@k8s-ci-robot k8s-ci-robot merged commit ea42418 into kubernetes-sigs:master Jan 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support EKS Addons
5 participants