Namespace labels to kubernetes metadata

I am working on an issue where i have assigned labels to my kubernetes namespace externally through kubectl command and wanted to get those kubernetes namespace labels in the metricbeat. I am following this I have seen that this feature is now added in the ES 7.x, but i am using ES 6.6. so is there any way to support this feature in ES 6.6 or modifying the code in my 6.6 forked branch to support this? Is there any possible solution available?

It would be great if you just give me an update or some guidance on this. Thanks, Abhishek