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

adjust os exit #144

Merged
merged 2 commits into from
Jun 11, 2019
Merged

adjust os exit #144

merged 2 commits into from
Jun 11, 2019

Conversation

kimschles
Copy link
Contributor

@kimschles kimschles commented Jun 11, 2019

Fixes issue #141

What this PR does and why we need it

I updated the CreateResourceProviderFromCluster function to find the KubeConfig and return an error if there is an issue retrieving the data. I wasn't able to figure out how to return the empty ResourceProvider, so I returned nil instead. Let me know if the empty ResourceProvider is necessary and I'll figure that out.

See line 132 for the specific line I'm referring to: https://github.com/reactiveops/polaris/compare/ks/adjust-os-exit?expand=1#diff-5524e4ddda8206adfe02f6a98ed7160eR132

@rbren
Copy link
Contributor

rbren commented Jun 11, 2019

Looks great, thanks Kim!

The caller will likely just bail out if an error is returned (as currently happens in main.go and dashboard.go), so no need for an empty ResourceProvider.

@rbren
Copy link
Contributor

rbren commented Jun 11, 2019

Also, for future reference, I think you could do something like return &ResourceProvider{}. But it's probably better to return null in this context.

@kimschles kimschles merged commit e030b61 into master Jun 11, 2019
@kimschles kimschles deleted the ks/adjust-os-exit branch June 21, 2019 21:57
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.

2 participants