kubernetes pod fail scenario fails trying to update the resource
Issue Description
Type: bug report , feature request or question
pod fail scenario that was applied with yaml fails with error
`` resStatuses:
- error: >
update: k8s exec failed, err: Pod "descheduler-315bb44774-5psaa"
is invalid: spec: Forbidden: pod updates may not change fields other
than
spec.containers[*].image,spec.initContainers[*].image,spec.activeDeadlineSeconds,spec.tolerations
(only additions to existing
tolerations),spec.terminationGracePeriodSeconds (allow it to be
set to 1 if it was previously negative)
core.PodSpec{
... // 22 identical fields
Priority: &2000000000,
PreemptionPolicy: &"PreemptLowerPriority",
- DNSConfig: nil,
+ DNSConfig: &core.PodDNSConfig{Options: []core.PodDNSConfigOption{{Name: "ndots", Value: &"2"}}},
ReadinessGates: nil,
RuntimeClassName: nil,
... // 7 identical fields
}``I suspect the reason for this is somewhere between the code gets the pod and updates it , the resource is updated so sending full update fails. only patching the fileds we update would be better in my opinion.
Source: chaosblade-io/chaosblade