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 support for in-cluster auth #237

Merged
merged 4 commits into from
Nov 19, 2021
Merged

feat: Add support for in-cluster auth #237

merged 4 commits into from
Nov 19, 2021

Conversation

stepanstipl
Copy link
Contributor

This PR mainly adds support for in-cluster authentication and some minor refactoring on tests.

This func. would deserve integration test, created #236.

@stepanstipl stepanstipl added the feature New feature or request label Nov 18, 2021
@stepanstipl stepanstipl requested a review from a user November 18, 2021 18:45
@stepanstipl stepanstipl self-assigned this Nov 18, 2021
@stepanstipl stepanstipl marked this pull request as ready for review November 18, 2021 18:47
@stepanstipl
Copy link
Contributor Author

stepanstipl commented Nov 19, 2021

Btw. tested this works:

$ kubent-linux-amd64
2:23PM INF >>> Kube No Trouble `kubent` <<<
2:23PM INF version dev (git sha dev)
2:23PM INF Initializing collectors and retrieving data
2:23PM INF Target K8s version is 1.21.1
2:23PM INF Retrieved 0 resources from collector name=Cluster
2:23PM ERR Failed to retrieve data from collector error="secrets is forbidden: User \"system:serviceaccount:default:default\" cannot list resource \"secrets\" in API group \"\" at the cluster scope" name="Helm v2"
2:23PM ERR Failed to retrieve data from collector error="list: failed to list: secrets is forbidden: User \"system:serviceaccount:default:default\" cannot list resource \"secrets\" in API group \"\" at the cluster scope" name="Helm v3"
2:23PM INF Loaded ruleset name=custom.rego.tmpl
2:23PM INF Loaded ruleset name=deprecated-1-16.rego
2:23PM INF Loaded ruleset name=deprecated-1-22.rego
2:23PM INF Loaded ruleset name=deprecated-1-25.rego

(the errors are expected due to limited permissions of default account that got picked up)

And once more planning to ignore Sonar :).

@stepanstipl stepanstipl merged commit eba2e8d into master Nov 19, 2021
@stepanstipl stepanstipl deleted the feat-in-cluster branch November 19, 2021 15:37
@stepanstipl stepanstipl changed the title Add support for in-cluster auth feat: Add support for in-cluster auth Sep 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant