-
Notifications
You must be signed in to change notification settings - Fork 11
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
Adding getters for k8s-interface #96
Conversation
Signed-off-by: David Wertenteil <dwertent@armosec.io>
PR Description updated to latest commit (556252a) |
PR Review
✨ Review tool usage guide:Overview:
With a configuration file, use the following template:
See the review usage page for a comprehensive guide on using this tool. |
PR Code Suggestions
✨ Improve tool usage guide:Overview:
With a configuration file, use the following template:
See the improve usage page for a more comprehensive guide on using this tool. |
Summary:
|
1 similar comment
Summary:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I hate getters, they're not idiomatic especially for returning a public field
Type
enhancement
Description
KubernetesApi
for accessing Kubernetes, Dynamic, and Discovery clients.KubernetesApi
instance.Changes walkthrough
k8sconfig.go
Add Getter Methods for Kubernetes Clients
k8sinterface/k8sconfig.go
GetKubernetesClient
method to return Kubernetes client.GetDynamicClient
method to return Dynamic client.GetDiscoveryClient
method to return Discovery client.k8sconfig_mock.go
Implement Mock for Kubernetes API
k8sinterface/k8sconfig_mock.go
API.
NewKubernetesApiMock
function returning aKubernetesApi
instance with fake clients.
k8sdiscovery_mock.go
Update Mock Resource List in Discovery Mock
k8sinterface/k8sdiscovery_mock.go
GetResourceListMock
to return a modified resource list.k8sdynamic_test.go
Cleanup Imports and Redundancies in Dynamic Test
k8sinterface/k8sdynamic_test.go
NewKubernetesApiMock
function.