Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fallback to lowercased kinds for empty singulars #629

Merged
merged 2 commits into from
Jan 4, 2021
Merged

Conversation

nolar
Copy link
Owner

@nolar nolar commented Jan 4, 2021

K3s has all builtins with empty singulars (reasons of this are not known). To still match the selectors that use singular=... or any_name=... with a singular value, fall back to lowercased kinds (in the assumption that they are the same as singulars, but CamelCased).

$ z get --raw /api/v1 | jq
………
    {
      "name": "pods",
      "singularName": "",          <<<<<<<<<<<
      "namespaced": true,
      "kind": "Pod",
      "verbs": [
        "create",
        "delete",
        "deletecollection",
        "get",
        "list",
        "patch",
        "update",
        "watch"
      ],
      "shortNames": [
        "po"
      ],
      "categories": [
        "all"
      ],
      "storageVersionHash": "xPOwRZ+Yhw8="
    },
………
    {
      "name": "services",
      "singularName": "",          <<<<<<<<<<<
      "namespaced": true,
      "kind": "Service",
      "verbs": [
        "create",
        "delete",
        "get",
        "list",
        "patch",
        "update",
        "watch"
      ],
      "shortNames": [
        "svc"
      ],
      "categories": [
        "all"
      ],
      "storageVersionHash": "0/CO1lhkEBI="
    },
………

A follow-up for #600.

K3s has all builtins with empty singulars (reasons of this are not known). To still match the selectors that use `singular=...` or `any_name=...` with a singular value, fall back to lowercased kinds (in the assumption that they are the same as singulars, but CamelCased).
@nolar nolar added the bug Something isn't working label Jan 4, 2021
@nolar nolar merged commit 9ba0176 into master Jan 4, 2021
@nolar nolar deleted the empty-singulars branch January 4, 2021 23:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant