Skip to content
This repository was archived by the owner on Jul 27, 2023. It is now read-only.

kubernetes: Collect local pod and container state from kubelet#10

Merged
conorbranagan merged 1 commit intomasterfrom
conor/k8s-kubelet
Jul 10, 2017
Merged

kubernetes: Collect local pod and container state from kubelet#10
conorbranagan merged 1 commit intomasterfrom
conor/k8s-kubelet

Conversation

@conorbranagan
Copy link
Copy Markdown
Contributor

In an earlier change we cached the Kubernetes metadata state to avoid
additional load on a server. But this had the trade-off that we would
have out-of-date information which is definitely not great for
high-churn containers.

So as a solution this change will make is so we always query the local
kubelet (which should be a very light, local query) for pod and
container state. This local data is merged with the global data to
provide both an up-to-date view as well as data that only comes from the
master (deployments, services).

The final trade-off is that we could have pods/containers that aren't
initially attached to their deployment or service until the next global
fetch.

(Note some of this code was lifted from DataDog/datadog-agent#285
and will certainly need consolidation later on as, potentially, a more
robust kubernetes metadata provider)

@conorbranagan conorbranagan requested a review from shang-wang July 7, 2017 21:50
In an earlier change we cached the Kubernetes metadata state to avoid
additional load on a server. But this had the trade-off that we would
have out-of-date information which is definitely not great for
high-churn containers.

So as a solution this change will make is so we _always_ query the local
kubelet (which should be a very light, local query) for pod and
container state. This local data is merged with the global data to
provide both an up-to-date view as well as data that only comes from the
master (deployments, services).

The final trade-off is that we could have pods/containers that aren't
initially attached to their deployment or service until the next global
fetch.
@conorbranagan conorbranagan merged commit 1f4eca0 into master Jul 10, 2017
@conorbranagan conorbranagan deleted the conor/k8s-kubelet branch July 10, 2017 14:13
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant