-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
feat(new transform): Inital kubernetes_pod_metadata
transform
#1888
Conversation
Signed-off-by: Kruno Tomola Fabro <[email protected]>
Signed-off-by: Kruno Tomola Fabro <[email protected]>
Signed-off-by: Kruno Tomola Fabro <[email protected]>
Signed-off-by: Kruno Tomola Fabro <[email protected]>
Signed-off-by: Kruno Tomola Fabro <[email protected]>
Signed-off-by: Kruno Tomola Fabro <[email protected]>
c7bdc51
to
707f86b
Compare
Yes, this two:
|
@ktff would you mind adding docs? Also, do we have a setting that controls the refresh rate against the k8s API? I ask because I have spoken to users that have experienced issues with this with fluent*. For example, very large clusters (5000+ pods) effectively DDOS'd the k8s API. A configuration option should allow users to reduce the refresh rate. |
@binarylogic good question. We are currently only proactively asking for metadata once and then passively waiting for api server to send us changes, so we don't have refresh rate, but we have something similar. We are using watch endpoint to listen for metadata changes for pods on local node, so there are basically two states:
It sounds reasonable to me to add this as it's a small change with great benefits. @LucioFranco what do you think? |
Signed-off-by: Kruno Tomola Fabro <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good I left a few comments inline.
Signed-off-by: Kruno Tomola Fabro <[email protected]>
So I have two main questions:
I think this follow closely to what you said @ktff, what do you think? Note: we may want to add jitter to our retry policy as well so that our other sinks can benefit from the same. |
Yep, we are thinking the same thing. I'll add the jitter. And we could open an issue for adding it to the retry policy, and possibly extract this implementation. I suspect poll is useful for usecases when the used portion of metadata won't be changing, so only fetching it once makes sense. Other than that, I think we would need to wait and see. I also didn't found any Fluent issue regarding watch vs poll. |
Signed-off-by: Kruno Tomola Fabro <[email protected]>
@binarylogic do you have anymore info you cold provide us about the issues you were describing? |
This PR adds everything we need tn order to go with Vector in EKS! Thanks a ton! |
@Alexx-G Great! If you are using Kubernetes v1.14 or higher, the |
@ktff Thanks for update! |
Thanks for all of your help @Alexx-G
@ktff if that is the case, woudl you mind updating https://github.com/timberio/vector/issues/1450 to include details on that. I'm working on the k8s docs now. |
@binarylogic Thank you for your effort! I'd gladly offer more help. |
@Alexx-G
This transform yes, and its clusterrole binding is in this PRs yaml.
RBAC authorization is documented in this transforms documentation as it's the one using it. |
Thank you. That makes sense. |
…rnetes_transform Signed-off-by: Kruno Tomola Fabro <[email protected]>
Signed-off-by: Kruno Tomola Fabro <[email protected]>
Signed-off-by: Kruno Tomola Fabro <[email protected]>
@binarylogic could you review the docs, and also I'm not sure how to fix the error in |
Yep. I'm on it today. Once I finish the docs this is good to merge, correct? |
Signed-off-by: binarylogic <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Docs are done! Looks really good.
Signed-off-by: binarylogic <[email protected]>
I am making a few more documentation changes and will merge afterwards. |
@ktff can we add a test around verifying labels are inserted correctly and all other values are inserted as we expect? |
Signed-off-by: binarylogic <[email protected]>
Nice work @ktff and @LucioFranco. |
Did this get removed from master because of performance issues? |
Hi @marcbachmann . This was removed since it is implemented by the |
Closes #1072
Ref #1867
Implemetation notes:
name
namespace
creation_timestamp
deletion_timestamp
labels
annotations
node_name
hostname
priority
priority_class_name
service_account_name
subdomain
host_ip
ip
kubernetes_key
. Which has default valuekubernetes
.Open questions
Is default value
kubernetes
best for log schemakubernetes_key
?Is this a breaking change because log schema has been changed ? (Edit: Will not be with fix(config): Partial
LogSchema
#1923)How to deal with
Event
interpreting label/annotation keys like "app.kubernetes.io/name" as nested?Todo
After this is merged, open an issue to update
kubernetes_source
naming scheme to use kubernetes_key. This will be a breaking change.Add delete timeout.
Add jitter.