Skip to content

Commit

Permalink
Add utils command to migrate iamidentitymappings to EKS access entr…
Browse files Browse the repository at this point in the history
…ies (eksctl-io#7710)

* Added migrate-to-access-entry cmd structure

* Fix Target Authentication  mode validation

* Added logic to get accessEntries and cmEntries from cluster

* Added logic to make unique list of configmap accessEntries, and stack creation logic

* Added UpdateAuthentication mode and aeEntries filter logic

* Add approve flag check

* Added functionality to remove awsauth after switch to API only

* Adds logic to fetch FullARN of path stripped IAMIdentityMappings

* Updates some info log text

* Adds test case and refactors code

* Removes comments

* Adds taskTree and address PR comments

* Refactors code and Adds exception handling for NoSuchEntityException

* Resolves go.mod and go.sum conflicts

* Doc update for migrate-to-access-entry feature

* Fixed minimum iam policies doc to add permission for iam:GetUser

* Updated access-entries doc at migrate-to-access-entry section

* Fixes failing Migrate To Access Entry Test & go.mod, go.sum

* Amends migrate to access entry documentation

* improve logs and simplify code logic

* add unit tests

* ensure target-auth-mode has a valid value

---------

Co-authored-by: Pankaj Walke <[email protected]>
Co-authored-by: Venkat Penmetsa <[email protected]>
Co-authored-by: Venkat Penmetsa <[email protected]>
Co-authored-by: Tibi <[email protected]>
  • Loading branch information
5 people authored and IdanShohamNetApp committed Jun 2, 2024
1 parent f5fdc69 commit af8a4b0
Show file tree
Hide file tree
Showing 11 changed files with 1,042 additions and 10 deletions.
120 changes: 120 additions & 0 deletions pkg/actions/accessentry/fakes/fake_getter.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions pkg/actions/accessentry/getter.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ import (
"github.com/weaveworks/eksctl/pkg/awsapi"
)

//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -generate
//counterfeiter:generate -o fakes/fake_getter.go . GetterInterface
type GetterInterface interface {
Get(ctx context.Context, principalARN api.ARN) ([]Summary, error)
}

type Getter struct {
clusterName string
eksAPI awsapi.EKS
Expand Down
Loading

0 comments on commit af8a4b0

Please sign in to comment.