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

deprecate use_journal - add lookup_from_k8s_field - detect input #154

Closed
wants to merge 1 commit into from

Conversation

richm
Copy link
Contributor

@richm richm commented Sep 26, 2018

Make the plugin able to detect the source of the metadata,
either from the journal with CONTAINER_NAME or from in_tail
with the tag. Add a new source of metadata - if
lookup_from_k8s_field true, then the user may pass in
metadata in the fields
docker.container_id, kubernetes.namespace_name,
kubernetes.pod_name, kubernetes.container_name

(j_metadata = get_metadata_for_journal_record(record, time, batch_miss_cache))
metadata = j_metadata
end
if @lookup_from_k8s_field && record.has_key?('kubernetes') && record.has_key?('docker') &&
Copy link
Contributor

@ewolinetz ewolinetz Sep 26, 2018

Choose a reason for hiding this comment

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

this is really messy to look at. can we refactor the key checks into a method?

maybe something where we can pass the map and the key names to check for

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok - can we do that as a separate PR? This PR is just a cherrypick of 83436cb

Update to kubeclient 4.4.latest - make dependency now on versions
between 4 and 5.  The new api makes a discovery call to
/api/v1 - I had to refactor the tests to take that into consideration.
I've tested this with fluentd with ocp 4.2 logging - tests pass.
I'm bumping the version to 2.3.0 from 2.2.x due to the big change
in the kubeclient version.  I also got rid of the dependency on
activesupport.
@richm
Copy link
Contributor Author

richm commented Aug 26, 2019

closed in favor of 33b403f

@richm richm closed this Aug 26, 2019
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