mirror of
https://github.com/kubeshark/kubeshark.git
synced 2025-09-14 05:40:16 +00:00
⚡ Add profiling environment variables if debug
is true
This commit is contained in:
@@ -724,6 +724,14 @@ func (provider *Provider) ApplyWorkerDaemonSet(
|
|||||||
|
|
||||||
workerContainer.WithCommand(command...)
|
workerContainer.WithCommand(command...)
|
||||||
|
|
||||||
|
if debug {
|
||||||
|
workerContainer.WithEnv(
|
||||||
|
applyconfcore.EnvVar().WithName("MEMORY_PROFILING_ENABLED").WithValue("true"),
|
||||||
|
applyconfcore.EnvVar().WithName("MEMORY_PROFILING_INTERVAL_SECONDS").WithValue("10"),
|
||||||
|
applyconfcore.EnvVar().WithName("MEMORY_USAGE_INTERVAL_MILLISECONDS").WithValue("500"),
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
cpuLimit, err := resource.ParseQuantity(resources.CpuLimit)
|
cpuLimit, err := resource.ParseQuantity(resources.CpuLimit)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("invalid cpu limit for %s container", workerPodName)
|
return fmt.Errorf("invalid cpu limit for %s container", workerPodName)
|
||||||
|
Reference in New Issue
Block a user