-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Open
Labels
kind/documentationCategorizes issue or PR as related to documentation.Categorizes issue or PR as related to documentation.
Description
Link to the issue (please include a link to the specific documentation or example):
https://github.com/kubernetes-client/python/blob/master/kubernetes/docs/V1PodFailurePolicyOnPodConditionsPattern.md
Description of the issue (please include outputs or screenshots if possible):
The documentation states that the V1PodFailurePolicyOnPodConditionsPattern status
param defaults to True
, but there is validation that causes a V1PodFailurePolicyOnPodConditionsPattern with no defined status
to fail since it defaults to None
.
I had this for example in my code:
ignore_disruption_rule = kubernetes.client.V1PodFailurePolicyRule(
action="Ignore",
on_pod_conditions=[
kubernetes.client.V1PodFailurePolicyOnPodConditionsPattern(
type="DisruptionTarget",
)
],
)
but I got this error:
{"levelname": "ERROR", "message": "Invalid value type: Invalid value for `status`, must not be `None`",
I fixed it by adding the status="True" like so:
ignore_disruption_rule = kubernetes.client.V1PodFailurePolicyRule(
action="Ignore",
on_pod_conditions=[
kubernetes.client.V1PodFailurePolicyOnPodConditionsPattern(
type="DisruptionTarget",
status="True",
)
],
)
So I think we need to either make the default true or else remove that from the documentation and say it is a required parameter
Metadata
Metadata
Assignees
Labels
kind/documentationCategorizes issue or PR as related to documentation.Categorizes issue or PR as related to documentation.