kubectl apply silently fails if type
is omitted from a condition spec (misleads the user)
#96
Labels
type
is omitted from a condition spec (misleads the user)
#96
Description
When attempting to apply an
AlertsPolicy
configuration that includes an alert condition that omits the condition'stype
field, runningkubectl apply
silently fails and makes it seem like the apply was successful.Example that causes a silent fail
Run
kubectl apply
for the above configuration and the user will still see the "success" outputGo Version
1.14.3
Expected behavior
With the provided invalid configuration mentioned above,
kubectl apply
should end up with a hard fail and kill the process, then display an error message letting the user know they are missing the requiredtype
field on the condition spec.Steps To Reproduce
Steps to reproduce the behavior:
kubectl apply -f ./the_policy.yaml
type
field)The text was updated successfully, but these errors were encountered: