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
Note that this is missing the kind field. What's interesting is that I followed your plugin code and that led me to the following understanding:
CustomResourceDefinitionNames is a generate class
The KubernetesSpecPlugin generates it by reading the k8s spec based on the version supplied in the build.sbt file.
Having downloaded the spec as json, it parses and writes the details into src_managed.
So far so good. (I like how you defined the plugin to do that, btw - nice!)
The trouble is that it isn't working correctly. If you go to the spec, you can clearly see the kind field defined, and also declared as required in the JSON schema definition - but for some reason, this is being ignored.
"io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionNames": {
"description": "CustomResourceDefinitionNames indicates the names to serve this CustomResourceDefinition",
"properties": {
"categories": {
"description": "categories is a list of grouped resources this custom resource belongs to (e.g. 'all'). This is published in API discovery documents, and used by clients to support invocations like `kubectl get all`.",
"items": {
"type": "string"
},
"type": "array"
},
"kind": {
"description": "kind is the serialized kind of the resource. It is normally CamelCase and singular. Custom resource instances will use this value as the `kind` attribute in API calls.",
"type": "string"
},
"listKind": {
"description": "listKind is the serialized kind of the list for this resource. Defaults to \"`kind`List\".",
"type": "string"
},
"plural": {
"description": "plural is the plural name of the resource to serve. The custom resources are served under `/apis/<group>/<version>/.../<plural>`. Must match the name of the CustomResourceDefinition (in the form `<names.plural>.<group>`). Must be all lowercase.",
"type": "string"
},
"shortNames": {
"description": "shortNames are short names for the resource, exposed in API discovery documents, and used by clients to support invocations like `kubectl get <shortname>`. It must be all lowercase.",
"items": {
"type": "string"
},
"type": "array"
},
"singular": {
"description": "singular is the singular name of the resource. It must be all lowercase. Defaults to lowercased `kind`.",
"type": "string"
}
},
"required": [
"plural",
"kind"
],
"type": "object"
}
Note:
"kind": {
"description": "kind is the serialized kind of the resource. It is normally CamelCase and singular. Custom resource instances will use this value as the `kind` attribute in API calls.",
"type": "string"
},
Note that there are some minor breaking change to the client from other developments, so you might want to check the docs again, also feel free to ask questions and your feedback is highly appreciated as always!
Hi @hnaderi - I'm back from a long weekend, hope you're well. 😄
So I've done some more digging and the culprit is here!
Note that this is missing the
kind
field. What's interesting is that I followed your plugin code and that led me to the following understanding:CustomResourceDefinitionNames
is a generate classKubernetesSpecPlugin
generates it by reading the k8s spec based on the version supplied in thebuild.sbt
file.So far so good. (I like how you defined the plugin to do that, btw - nice!)
The trouble is that it isn't working correctly. If you go to the spec, you can clearly see the
kind
field defined, and also declared asrequired
in the JSON schema definition - but for some reason, this is being ignored.Here's the spec, search for
CustomResourceDefinitionNames
.https://raw.githubusercontent.com/kubernetes/kubernetes/v1.27.1/api/openapi-spec/swagger.json
...and you get this:
Note:
and
What do you think is going on?
Originally posted by @davesmith00sky in #96 (comment)
The text was updated successfully, but these errors were encountered: