kubernetes-client / c

Official C client library for Kubernetes
Apache License 2.0
141 stars 45 forks source link

Both Custom Resource Definitions and Custom Resources strip the spec from their object. #223

Closed homer6 closed 4 months ago

homer6 commented 4 months ago

As you can see here:

        "spec": {
            "conversion": {
                "strategy": "None"
            },
            "group": "stable.example.com",
            "names": {
                "kind": "CronTab",
                "listKind": "CronTabList",
                "plural": "crontabs",
                "shortNames": [
                    "ct"
                ],
                "singular": "crontab"
            },
            "scope": "Namespaced",
            "versions": [
                {
                    "name": "v1",
                    "schema": {
                        "openAPIV3Schema": {
                            "type": "object"
                        }
                    },
                    "served": true,
                    "storage": true
                }
            ]
        },

The openAPIV3Schema object is truncated.

This happens on write and on read. The above output truncated the response after the full object was written via a different client and was verified to not truncate it when reading from those clients.

Likewise, when the openAPIV3Schema object is entact, Custom Resource writes fail to send the spec for that CR. This happens after successfull CR writes with other clients.

homer6 commented 4 months ago

While this is not resolved, there is a successful workaround: https://github.com/kubernetes-client/c/issues/224#issuecomment-1970240528

Thanks @ityuhui !