You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For kubernetes-validate module run from ansible, kubernetes version: v1.23.5
validation for size/number of Images and ImageSources on LimitRanges is not under definitions
"Image streams: You can set limits on the number of images and tags in an ImageStream object"
"Images: You can limit the size of images that can be pushed to an internal registry."
Defining those two limits and apply using ansible fails validation with error message: "msg": "LimitRange core-resource-limits: resource definition validation error at spec.limits.2.type: 'openshift.io/Images' is not one of ['Container', 'PersistentVolumeClaim', 'Pod']"
Check with manual update under _definitions.json "type": { "enum": [ "Container", "PersistentVolumeClaim", "Pod", "openshift.io/Images", "openshift.io/ImageStream" ]}
Results in proper validation and therefore object is created on the cluster. localhost : ok=3 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
Alternative to bypass validate using "strict: no"
Thanks!
Mihai
The text was updated successfully, but these errors were encountered:
Hi,
For kubernetes-validate module run from ansible, kubernetes version: v1.23.5
validation for size/number of Images and ImageSources on LimitRanges is not under definitions
https://docs.openshift.com/container-platform/4.10/nodes/clusters/nodes-cluster-limit-ranges.html
Defining those two limits and apply using ansible fails validation with error message:
"msg": "LimitRange core-resource-limits: resource definition validation error at spec.limits.2.type: 'openshift.io/Images' is not one of ['Container', 'PersistentVolumeClaim', 'Pod']"
Validation process LimitRangeItem does not include these (or should be case for Openshift only)
https://github.com/willthames/kubernetes-validate/blob/main/src/kubernetes_validate/kubernetes-json-schema/v1.23.0-local-strict/_definitions.json#L7209
Check with manual update under _definitions.json
"type": { "enum": [ "Container", "PersistentVolumeClaim", "Pod", "openshift.io/Images", "openshift.io/ImageStream" ]}
Results in proper validation and therefore object is created on the cluster.
localhost : ok=3 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
Alternative to bypass validate using "strict: no"
Thanks!
Mihai
The text was updated successfully, but these errors were encountered: