fabric8io / fluent-plugin-kubernetes_metadata_filter

Enrich your fluentd events with Kubernetes metadata
Apache License 2.0
350 stars 166 forks source link

Failure while installing fluent-plugin-kubernetes_metadata_filter plugin version 2.10.0 #361

Closed janmesh81 closed 1 year ago

janmesh81 commented 1 year ago

Hi, We are using kubernetes_metadata_filter plugin with version 2.10.0 in our dockerized fluentd. We never faced any issue while using this filter plugin, but recently we are observing one issue after 28/12/2022. We saw it was working till 21/12/2022. Below are the error details: ERROR: Error installing fluent-plugin-kubernetes_metadata_filter: The last version of kubeclient (>= 4.0.0, < 5.0.0) to support your Ruby & RubyGems was 4.10.1. Try installing it with gem install kubeclient -v 4.10.1 and then running the current command again kubeclient requires Ruby version >= 2.7.0. The current ruby version is 2.6.6.146. The command '/bin/sh -c gem install fluent-plugin-kubernetes_metadata_filter -v "2.10.0"' returned a non-zero code: 1.

Our set up information: kubernetes_metadata_filter plugin version: 2.10.0 fluentd version: 1.11.5 base image: fluent/fluentd:v1.11.5-debian-1.0 ruby version: 2.6.6.146

Note: Right now due to some legacy use, we can't upgrade base version of fluentd.

smlx commented 1 year ago

kubeclient released a new version 4.11.0 a couple of weeks ago. Probably you need to pin the older 4.10.1 version as the error message says. https://github.com/ManageIQ/kubeclient/tags

jcantrill commented 1 year ago

@smlx do you believe we need to pin the version of kubeclient in the plugin as well?

smlx commented 1 year ago

It depends on your support policy, but Ruby 2.6 is EOL so I don't think it is worth pinning versions to support it.

The fix for @janmesh81 is simple enough:

gem install kubeclient:4.10.1 fluent-plugin-kubernetes_metadata_filter:2.10.0
janmesh81 commented 1 year ago

Thanks @smlx, it worked for us, when we pin to the 4.10.1 version of kubeclient.