feat:add node taints to cpu and memory scenarios#43
Conversation
Signed-off-by: zhoujinyu <2319109590@qq.com>
|
Changes looks good and confirmed to be working with the KrknHub runner. But seems like we are missing the Raised below changes to update the parameter in krknctl inputs json: |
|
@rh-rahulshetty Hi, I’m a bit confused about this point, krknctl runner seems to work well,so I wanted to double-check my understanding. Locally I tested both CLI_RUNNER and HUB_RUNNER, and in both cases the generated command does include the taints parameter. Concretely: runner_ctl = KrknRunner(
config=config,
output_dir=output_dir,
runner_type=KrknRunnerType.CLI_RUNNER,
)
runner_hub = KrknRunner(
config=config,
output_dir=output_dir,
runner_type=KrknRunnerType.HUB_RUNNER,
)
cpu_scenario = NodeCPUHogScenario(
cluster_components=config.cluster_components
)
test_taints = ["node-role.kubernetes.io/master:NoSchedule", "worker:NoSchedule"]
cpu_scenario.taint.value = json.dumps(test_taints)
# Use KrknRunner.runner_command to generate commands (project-standard method)
krknctl_command = runner_ctl.runner_command(cpu_scenario)
krknhub_command = runner_hub.runner_command(cpu_scenario)The outputs are: As you can see, both runners have --taints / -e TAINTS in their commands.Because of that, I’m not entirely sure what you meant by:
Is there a specific scenario or code path where --taints is not being passed through, or did I misunderstand the original comment? |
|
@FAUST-BENCHOU Krkn-AI does generate the right krknctl/krknhub commands with the This PR krkn-chaos/krkn-hub#307 helps to bring that as a input parameter to krknctl run command when executing the hog scenarios. |
|
Thanks a lot for the detailed explanation, that really helps clarify things. |
|
@FAUST-BENCHOU No worries :) and also thank you for all the contributions. |

Close #40
Support taints such as
taints=[
"node-role.kubernetes.io/master:NoSchedule",
"dedicated=workload:NoSchedule",
]
taints will be added in cpu hog and memory hog scenario