litmuschaos / litmus

Litmus helps SREs and developers practice chaos engineering in a Cloud-native way. Chaos experiments are published at the ChaosHub (https://hub.litmuschaos.io). Community notes is at https://hackmd.io/a4Zu_sH4TZGeih-xCimi3Q
https://litmuschaos.io
Apache License 2.0
4.45k stars 698 forks source link

effect must be 'NoExecute' when 'tolerationSeconds' is set #4235

Open ctmillerlin opened 1 year ago

ctmillerlin commented 1 year ago

What happened: I get invalid errors from the kube API server when I apply yaml file xxx-chaos-litmus-chaos-enable.yml then related deployments are not created.

image

Error message below Error from server (Invalid): error when creating "resource/xxxx-chaos-litmus-chaos-enable.yml": Deployment.apps "subscriber" is invalid: spec.template.spec.tolerations [0].effect: Invalid value: "NoSchedule": effect must be 'NoExecute' when 'tolerationSe conds' is set

What you expected to happen: Apply the yaml file without any error message and related deployments are created.

Where can this issue be corrected? (optional)

image

When configuring a chaos infrastructure and setting the toleration with NoSchedule Effect, Litmus should not put the tolerationSeconds in the tolerations node in the generated xxx-chaos-enable.yml.

How to reproduce it (as minimally and precisely as possible):

  1. when creating a new chaos infrastructure in the litmus portal, configure the toleration as blow image
  2. follow up the installation steps and check results.

Anything else we need to know?: litmus installation way: helm litmus helm version: 3.0.0 kubernetes version: 1.25.6 kubernetes environment: Azure Kubernetes Service

vanshBhatia-A4k9 commented 1 year ago

This is a genuine bug, thanks for reporting @ctmillerlin I will take a look at it. Thanks!