This change adds resourceMontior, which spawns a goroutine per node to poll the
container stats for known, relevant containers, computes the resource usage and
stores the data. Users can then examine the data in the buffer to get resource
of each individual containers.
This change adds simple utility functions to query kubelet for the resource
usage of major containers (e.g. /kubelet, /docker-daemon, etc) for the past
time interval (up to 2 minutes). This is intended for spot checking of the
recent resource usage on the node.
The test verifies that kubelet deletes the pods/containers within a reasonable
time. It queries the kubelet /runningpods endpoint to retrieve a list of
running pods directly. The outline of the test is:
- Create an RC
- Wait until all pods are running (based on the pod status)
- Verify pods are running by querying the /runningpods
- Delete the RC
- Check all pods are deleted by querying /runningpods