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

Get kube client during HTTP request #1345

Merged
merged 1 commit into from Jan 26, 2022
Merged

Get kube client during HTTP request #1345

merged 1 commit into from Jan 26, 2022

Conversation

yiannistri
Copy link
Contributor

@yiannistri yiannistri commented Jan 25, 2022

Part of: #1092

What changed?
To get an instance of kube.Kube a Factory was used that was initialised during application startup with a *rest.Config. The responsibility of getting a kube.Kube instance now lies with the KubeGetter which reads the *rest.Config during an HTTP request and uses it to impersonate the call to the Kubernetes API.

Why?
The end goal is to execute calls to the Kubernetes API on behalf of the authenticated user.

How did you test it?
Updated existing unit tests + manually

Release notes
Not yet, still behind a feature flag.

Documentation Changes
Not yet, still behind a feature flag.

@yiannistri yiannistri force-pushed the kube-refactoring branch 3 times, most recently from c81a415 to 7ef3668 Compare January 25, 2022 14:07
@yiannistri yiannistri marked this pull request as ready for review January 25, 2022 14:39
Copy link
Contributor

@jpellizzari jpellizzari left a comment

Choose a reason for hiding this comment

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

LGTM

test/integration/server/remove_test.go Show resolved Hide resolved
Copy link
Contributor

@foot foot left a comment

Choose a reason for hiding this comment

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

Wicked this.

@yiannistri yiannistri merged commit 8a9c186 into main Jan 26, 2022
@yiannistri yiannistri deleted the kube-refactoring branch January 26, 2022 09:11
joshri pushed a commit that referenced this pull request Jan 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants