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

kubernetes processor use correct os path separator #11760

Merged
merged 6 commits into from
Jun 24, 2019

Conversation

exekias
Copy link
Contributor

@exekias exekias commented Apr 11, 2019

This PR completes #9205 to support windows nodes (and log paths) when adding kubernetes metadata

Original author: @zentron
closes #9196

@exekias exekias added enhancement review :Windows containers Related to containers use case labels Apr 11, 2019
@exekias exekias requested a review from a team as a code owner April 11, 2019 09:25
@exekias exekias self-assigned this Apr 11, 2019
@exekias exekias added Team:Integrations Label for the Integrations team [zube]: In Review labels Apr 11, 2019
Copy link
Contributor

@odacremolbap odacremolbap left a comment

Choose a reason for hiding this comment

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

a couple, very opinionated glitches

other than that, LGTM

@odacremolbap
Copy link
Contributor

Not necesarily part of this review, but probably something to discuss:
Tests are kinda innovative, I would expect more table like and would dare to say that's the case for anyone hitting this piece of code.

func executeTestWithResourceType(t *testing.T, cfgLogsPath string, cfgResourceType string, source string, expectedResult string) {

@odacremolbap
Copy link
Contributor

Not necesarily part of this review, but probably something to discuss:

I don't think there might be many kubelets running at locations others than default at linux, but could happen.
Windows is a different story, by default C: is where the OS lies, some admins choose a different location for any App that runs on it. We can't take for granted C:

We to add these locations to the config file, and provide current values as defaults

@exekias
Copy link
Contributor Author

exekias commented Apr 16, 2019

tbh, I agree this whole code needs a refactor to better handle the different use cases (docker, kubernetes, OS)..., will put some time on improve it 👍

@kaiyan-sheng
Copy link
Contributor

kaiyan-sheng commented Apr 18, 2019

We to add these locations to the config file, and provide current values as defaults

I like the idea of adding default log path, pod logs path and container logs path into config. If they are missing from config, then use the default in the code 😄

Copy link
Contributor

@kaiyan-sheng kaiyan-sheng left a comment

Choose a reason for hiding this comment

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

Looks good, besides the changelog conflict 👍

@exekias exekias added the v7.3.0 label Jun 18, 2019
@exekias
Copy link
Contributor Author

exekias commented Jun 24, 2019

merging this now, we can revisit this code later, I think it needs a broader refactor

@exekias exekias merged commit d88f4f4 into elastic:master Jun 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
containers Related to containers use case enhancement review Team:Integrations Label for the Integrations team v7.3.0 :Windows
Projects
None yet
Development

Successfully merging this pull request may close these issues.

kubernetes_metadata metadata does not work on windows
5 participants