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

TAG: Poll AWS EKS clusters fom AWS #38984

Merged
merged 1 commit into from
Mar 7, 2024
Merged

Conversation

tigrato
Copy link
Contributor

@tigrato tigrato commented Mar 5, 2024

This PR polls the AWS EKS clusters and their AssociatedAccessPolicies and AccessEntries and syncs them into TAG.

Part of https://github.com/gravitational/access-graph/issues/459

@tigrato tigrato added the no-changelog Indicates that a PR does not require a changelog entry label Mar 5, 2024
@tigrato tigrato force-pushed the tigrato/poll-aws-eks-clusters branch 3 times, most recently from 228d360 to 20aa730 Compare March 6, 2024 12:21
@tigrato tigrato marked this pull request as ready for review March 6, 2024 16:25
@tigrato tigrato requested review from justinas and jakule March 6, 2024 16:25
@github-actions github-actions bot requested review from Joerger and rosstimothy March 6, 2024 16:25
lib/srv/discovery/fetchers/aws-sync/eks.go Outdated Show resolved Hide resolved
lib/srv/discovery/fetchers/aws-sync/eks.go Outdated Show resolved Hide resolved
Copy link
Contributor

@rosstimothy rosstimothy left a comment

Choose a reason for hiding this comment

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

Can we add some tests?

lib/srv/discovery/fetchers/aws-sync/eks.go Outdated Show resolved Hide resolved
Comment on lines 73 to 80
if err != nil {
errs = append(errs, err)
}
if cluster != nil {
clusters = append(clusters, cluster)
}
associatedPolicies = append(associatedPolicies, clusterAssociatedPolicies...)
accessEntries = append(accessEntries, clusterAccessEntries...)
Copy link
Contributor

Choose a reason for hiding this comment

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

In what cases do we expect both an error and the rest of the arguments to be non-nil?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We pull each region independently and each one shouldn't affect the other - i.e. we might miss permissions to a specific region or the api calls fails and in that case we should continue with other regions that are alive and working

lib/srv/discovery/fetchers/aws-sync/eks.go Outdated Show resolved Hide resolved
@tigrato
Copy link
Contributor Author

tigrato commented Mar 7, 2024

Can we add some tests?

Added in 4b2a6cd

proto/accessgraph/v1alpha/aws.proto Outdated Show resolved Hide resolved
@public-teleport-github-review-bot public-teleport-github-review-bot bot removed the request for review from Joerger March 7, 2024 12:44
@tigrato tigrato force-pushed the tigrato/poll-aws-eks-clusters branch from 91324c3 to f1c942e Compare March 7, 2024 18:42
@tigrato tigrato enabled auto-merge March 7, 2024 18:42
This PR polls the AWS EKS clusters and their AssociatedAccessPolicies
and AccessEntries and syncs them into TAG.

Part of gravitational/access-graph#459

Signed-off-by: Tiago Silva <[email protected]>
@tigrato tigrato force-pushed the tigrato/poll-aws-eks-clusters branch from f1c942e to b1a143d Compare March 7, 2024 18:58
@tigrato tigrato added this pull request to the merge queue Mar 7, 2024
Merged via the queue into master with commit 58ebf54 Mar 7, 2024
36 checks passed
@tigrato tigrato deleted the tigrato/poll-aws-eks-clusters branch March 7, 2024 19:33
tigrato added a commit that referenced this pull request Mar 12, 2024
This PR polls the AWS EKS clusters and their AssociatedAccessPolicies
and AccessEntries and syncs them into TAG.

Part of gravitational/access-graph#459

Signed-off-by: Tiago Silva <[email protected]>
tigrato added a commit that referenced this pull request Mar 12, 2024
This PR polls the AWS EKS clusters and their AssociatedAccessPolicies
and AccessEntries and syncs them into TAG.

Part of gravitational/access-graph#459

Signed-off-by: Tiago Silva <[email protected]>
github-merge-queue bot pushed a commit that referenced this pull request Mar 12, 2024
This PR polls the AWS EKS clusters and their AssociatedAccessPolicies
and AccessEntries and syncs them into TAG.

Part of gravitational/access-graph#459

Signed-off-by: Tiago Silva <[email protected]>
github-merge-queue bot pushed a commit that referenced this pull request Mar 12, 2024
This PR polls the AWS EKS clusters and their AssociatedAccessPolicies
and AccessEntries and syncs them into TAG.

Part of gravitational/access-graph#459

Signed-off-by: Tiago Silva <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discovery no-changelog Indicates that a PR does not require a changelog entry size/md
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants