Closed erikgb closed 4 years ago
We'd be happy to take a PR with a fix for this, or we'll get to it eventually.
i'm sending a workaround to fix the script, on the other hand there's a fix proposed in the upstream https://github.com/kubernetes/kubernetes/pull/92546
It seems like the api-server returns an invalid CRD List type, as commented here: https://github.com/kubernetes-client/java/issues/921#issuecomment-642178742. As a result, the API specification returned by the api-server for a CRD List type may look like this (extract):
instead of the usual:
This was compensated for in https://github.com/kubernetes-client/gen/commit/deac82ed3c868747d432a49ab20dbfb2f5941790, but https://github.com/kubernetes-client/gen/commit/d5a4e0d8ffe2e67958f4ea6eb7aa2a5d382d7c2f introduces a change that breaks the crd_mode. It works with the previous commit.
I think this is the problematic line: https://github.com/kubernetes-client/gen/blob/d5a4e0d8ffe2e67958f4ea6eb7aa2a5d382d7c2f/openapi/preprocess_spec.py#L396
Which results in the following error running
preprocess_spec.py
in crd_mode: