Skip to content

Implement leaderelection type getter via restmapper#1

Closed
mszostok wants to merge 1 commit intomasterfrom
alternative-ver
Closed

Implement leaderelection type getter via restmapper#1
mszostok wants to merge 1 commit intomasterfrom
alternative-ver

Conversation

@mszostok
Copy link
Copy Markdown
Owner

@mszostok mszostok commented Sep 21, 2019

Description

This PR is just draft to show the implementation of leaderelection type getter via restmapper. With such implementation we are not calling the api-sever to get all supported groups


// TODO(mszostok): here we have useful info about all supported groups and resource
// in api-server
gr, err := restmapper.GetAPIGroupResources(dc)
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

here we have info about all supported groups that we could use for checking if Lease is available, but it's not exposed, so I decided to use the RESTMapping method from mapper and assert error via IsNoMatchError

@mszostok mszostok force-pushed the alternative-ver branch 2 times, most recently from b671ff2 to 1fe47fc Compare September 21, 2019 14:04
@mszostok mszostok closed this May 8, 2020
mszostok pushed a commit that referenced this pull request Jan 9, 2025
⚒️ add additional controller tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant