You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
kind: ResourceUsageapiVersion: kwok.x-k8s.io/v1alpha1metadata:
name: podnamespace: defaultspec:
usages:
- usage:
cpu: container.resources.requests.cpu || 100m# Take the value from the annotation and divide it equally between each container.# cpu: Quantity(pod.metadata["cpu_usage"]) / len(pod.spec.containers)# Each container uses one-tenth of the host node# cpu: node.status.allocatable.cpu / 10.0# Value from annotations# cpu: '"kwok.x-k8s.io/usage-cpu" in pod.metadata.annotations ? Quantity(pod.metadata.annotations["kwok.x-k8s.io/usage-cpu"]) : Quantity("1m")'memory: container.resources.requests.memory || 100Mi# Memory keeps growing# memory: Quantity(pod.SinceSecond()) * 1Mi# Value from annotations# memory: '"kwok.x-k8s.io/usage-memory" in pod.metadata.annotations ? Quantity(pod.metadata.annotations["kwok.x-k8s.io/usage-memory"]) : Quantity("1Mi")'
---
kind: ClusterResourceUsageapiVersion: kwok.x-k8s.io/v1alpha1metadata:
name: cluster-resource-usagespec:
...
What would you like to be added?
examples
Why is this needed?
Need a simple way to describe resource usage for Pod
The text was updated successfully, but these errors were encountered: