Skip to content

Commit

Permalink
Merge pull request kubernetes#43312 from deads2k/cli-08-discovery
Browse files Browse the repository at this point in the history
Automatic merge from submit-queue (batch tested with PRs 43429, 43416, 43312, 43141, 43421)

add singular resource names to discovery

Adds the singular resource name to our resource for discovery.  This is something we've discussed to remove our pseudo-pluralization library which is unreliable even for english and really has no hope of properly handling other languages or variations we can expect from TPRs and aggregated API servers.

This pull simply adds the information to discovery, it doesn't not re-wire any RESTMappers.

@kubernetes/sig-cli-misc  @kubernetes/sig-apimachinery-misc @kubernetes/api-review


```release-note
API resource discovery now includes the `singularName` used to refer to the resource.
```
  • Loading branch information
Kubernetes Submit Queue authored Mar 26, 2017
2 parents 944131d + 36cb9ed commit bc0171c
Show file tree
Hide file tree
Showing 54 changed files with 783 additions and 365 deletions.
7 changes: 6 additions & 1 deletion api/openapi-spec/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -36855,6 +36855,7 @@
"description": "APIResource specifies the name of a resource and whether it is namespaced.",
"required": [
"name",
"singularName",
"namespaced",
"kind",
"verbs"
Expand All @@ -36865,7 +36866,7 @@
"type": "string"
},
"name": {
"description": "name is the name of the resource.",
"description": "name is the plural name of the resource.",
"type": "string"
},
"namespaced": {
Expand All @@ -36879,6 +36880,10 @@
"type": "string"
}
},
"singularName": {
"description": "singularName is the singular name of the resource. This allows clients to handle plural and singular opaquely. The singularName is more correct for reporting status on a single item and both singular and plural are allowed from the kubectl CLI interface.",
"type": "string"
},
"verbs": {
"description": "verbs is a list of supported kube verbs (this includes get, list, watch, create, update, patch, delete, deletecollection, and proxy)",
"type": "array",
Expand Down
7 changes: 6 additions & 1 deletion api/swagger-spec/apps_v1beta1.json
Original file line number Diff line number Diff line change
Expand Up @@ -4925,14 +4925,19 @@
"description": "APIResource specifies the name of a resource and whether it is namespaced.",
"required": [
"name",
"singularName",
"namespaced",
"kind",
"verbs"
],
"properties": {
"name": {
"type": "string",
"description": "name is the name of the resource."
"description": "name is the plural name of the resource."
},
"singularName": {
"type": "string",
"description": "singularName is the singular name of the resource. This allows clients to handle plural and singular opaquely. The singularName is more correct for reporting status on a single item and both singular and plural are allowed from the kubectl CLI interface."
},
"namespaced": {
"type": "boolean",
Expand Down
7 changes: 6 additions & 1 deletion api/swagger-spec/authentication.k8s.io_v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -303,14 +303,19 @@
"description": "APIResource specifies the name of a resource and whether it is namespaced.",
"required": [
"name",
"singularName",
"namespaced",
"kind",
"verbs"
],
"properties": {
"name": {
"type": "string",
"description": "name is the name of the resource."
"description": "name is the plural name of the resource."
},
"singularName": {
"type": "string",
"description": "singularName is the singular name of the resource. This allows clients to handle plural and singular opaquely. The singularName is more correct for reporting status on a single item and both singular and plural are allowed from the kubectl CLI interface."
},
"namespaced": {
"type": "boolean",
Expand Down
7 changes: 6 additions & 1 deletion api/swagger-spec/authentication.k8s.io_v1beta1.json
Original file line number Diff line number Diff line change
Expand Up @@ -303,14 +303,19 @@
"description": "APIResource specifies the name of a resource and whether it is namespaced.",
"required": [
"name",
"singularName",
"namespaced",
"kind",
"verbs"
],
"properties": {
"name": {
"type": "string",
"description": "name is the name of the resource."
"description": "name is the plural name of the resource."
},
"singularName": {
"type": "string",
"description": "singularName is the singular name of the resource. This allows clients to handle plural and singular opaquely. The singularName is more correct for reporting status on a single item and both singular and plural are allowed from the kubectl CLI interface."
},
"namespaced": {
"type": "boolean",
Expand Down
7 changes: 6 additions & 1 deletion api/swagger-spec/authorization.k8s.io_v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -516,14 +516,19 @@
"description": "APIResource specifies the name of a resource and whether it is namespaced.",
"required": [
"name",
"singularName",
"namespaced",
"kind",
"verbs"
],
"properties": {
"name": {
"type": "string",
"description": "name is the name of the resource."
"description": "name is the plural name of the resource."
},
"singularName": {
"type": "string",
"description": "singularName is the singular name of the resource. This allows clients to handle plural and singular opaquely. The singularName is more correct for reporting status on a single item and both singular and plural are allowed from the kubectl CLI interface."
},
"namespaced": {
"type": "boolean",
Expand Down
7 changes: 6 additions & 1 deletion api/swagger-spec/authorization.k8s.io_v1beta1.json
Original file line number Diff line number Diff line change
Expand Up @@ -516,14 +516,19 @@
"description": "APIResource specifies the name of a resource and whether it is namespaced.",
"required": [
"name",
"singularName",
"namespaced",
"kind",
"verbs"
],
"properties": {
"name": {
"type": "string",
"description": "name is the name of the resource."
"description": "name is the plural name of the resource."
},
"singularName": {
"type": "string",
"description": "singularName is the singular name of the resource. This allows clients to handle plural and singular opaquely. The singularName is more correct for reporting status on a single item and both singular and plural are allowed from the kubectl CLI interface."
},
"namespaced": {
"type": "boolean",
Expand Down
7 changes: 6 additions & 1 deletion api/swagger-spec/autoscaling_v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -1464,14 +1464,19 @@
"description": "APIResource specifies the name of a resource and whether it is namespaced.",
"required": [
"name",
"singularName",
"namespaced",
"kind",
"verbs"
],
"properties": {
"name": {
"type": "string",
"description": "name is the name of the resource."
"description": "name is the plural name of the resource."
},
"singularName": {
"type": "string",
"description": "singularName is the singular name of the resource. This allows clients to handle plural and singular opaquely. The singularName is more correct for reporting status on a single item and both singular and plural are allowed from the kubectl CLI interface."
},
"namespaced": {
"type": "boolean",
Expand Down
7 changes: 6 additions & 1 deletion api/swagger-spec/autoscaling_v2alpha1.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,19 @@
"description": "APIResource specifies the name of a resource and whether it is namespaced.",
"required": [
"name",
"singularName",
"namespaced",
"kind",
"verbs"
],
"properties": {
"name": {
"type": "string",
"description": "name is the name of the resource."
"description": "name is the plural name of the resource."
},
"singularName": {
"type": "string",
"description": "singularName is the singular name of the resource. This allows clients to handle plural and singular opaquely. The singularName is more correct for reporting status on a single item and both singular and plural are allowed from the kubectl CLI interface."
},
"namespaced": {
"type": "boolean",
Expand Down
7 changes: 6 additions & 1 deletion api/swagger-spec/batch_v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -3390,14 +3390,19 @@
"description": "APIResource specifies the name of a resource and whether it is namespaced.",
"required": [
"name",
"singularName",
"namespaced",
"kind",
"verbs"
],
"properties": {
"name": {
"type": "string",
"description": "name is the name of the resource."
"description": "name is the plural name of the resource."
},
"singularName": {
"type": "string",
"description": "singularName is the singular name of the resource. This allows clients to handle plural and singular opaquely. The singularName is more correct for reporting status on a single item and both singular and plural are allowed from the kubectl CLI interface."
},
"namespaced": {
"type": "boolean",
Expand Down
7 changes: 6 additions & 1 deletion api/swagger-spec/batch_v2alpha1.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,19 @@
"description": "APIResource specifies the name of a resource and whether it is namespaced.",
"required": [
"name",
"singularName",
"namespaced",
"kind",
"verbs"
],
"properties": {
"name": {
"type": "string",
"description": "name is the name of the resource."
"description": "name is the plural name of the resource."
},
"singularName": {
"type": "string",
"description": "singularName is the singular name of the resource. This allows clients to handle plural and singular opaquely. The singularName is more correct for reporting status on a single item and both singular and plural are allowed from the kubectl CLI interface."
},
"namespaced": {
"type": "boolean",
Expand Down
7 changes: 6 additions & 1 deletion api/swagger-spec/certificates.k8s.io_v1beta1.json
Original file line number Diff line number Diff line change
Expand Up @@ -1169,14 +1169,19 @@
"description": "APIResource specifies the name of a resource and whether it is namespaced.",
"required": [
"name",
"singularName",
"namespaced",
"kind",
"verbs"
],
"properties": {
"name": {
"type": "string",
"description": "name is the name of the resource."
"description": "name is the plural name of the resource."
},
"singularName": {
"type": "string",
"description": "singularName is the singular name of the resource. This allows clients to handle plural and singular opaquely. The singularName is more correct for reporting status on a single item and both singular and plural are allowed from the kubectl CLI interface."
},
"namespaced": {
"type": "boolean",
Expand Down
7 changes: 6 additions & 1 deletion api/swagger-spec/extensions_v1beta1.json
Original file line number Diff line number Diff line change
Expand Up @@ -9944,14 +9944,19 @@
"description": "APIResource specifies the name of a resource and whether it is namespaced.",
"required": [
"name",
"singularName",
"namespaced",
"kind",
"verbs"
],
"properties": {
"name": {
"type": "string",
"description": "name is the name of the resource."
"description": "name is the plural name of the resource."
},
"singularName": {
"type": "string",
"description": "singularName is the singular name of the resource. This allows clients to handle plural and singular opaquely. The singularName is more correct for reporting status on a single item and both singular and plural are allowed from the kubectl CLI interface."
},
"namespaced": {
"type": "boolean",
Expand Down
7 changes: 6 additions & 1 deletion api/swagger-spec/policy_v1beta1.json
Original file line number Diff line number Diff line change
Expand Up @@ -1474,14 +1474,19 @@
"description": "APIResource specifies the name of a resource and whether it is namespaced.",
"required": [
"name",
"singularName",
"namespaced",
"kind",
"verbs"
],
"properties": {
"name": {
"type": "string",
"description": "name is the name of the resource."
"description": "name is the plural name of the resource."
},
"singularName": {
"type": "string",
"description": "singularName is the singular name of the resource. This allows clients to handle plural and singular opaquely. The singularName is more correct for reporting status on a single item and both singular and plural are allowed from the kubectl CLI interface."
},
"namespaced": {
"type": "boolean",
Expand Down
7 changes: 6 additions & 1 deletion api/swagger-spec/rbac.authorization.k8s.io_v1alpha1.json
Original file line number Diff line number Diff line change
Expand Up @@ -3402,14 +3402,19 @@
"description": "APIResource specifies the name of a resource and whether it is namespaced.",
"required": [
"name",
"singularName",
"namespaced",
"kind",
"verbs"
],
"properties": {
"name": {
"type": "string",
"description": "name is the name of the resource."
"description": "name is the plural name of the resource."
},
"singularName": {
"type": "string",
"description": "singularName is the singular name of the resource. This allows clients to handle plural and singular opaquely. The singularName is more correct for reporting status on a single item and both singular and plural are allowed from the kubectl CLI interface."
},
"namespaced": {
"type": "boolean",
Expand Down
7 changes: 6 additions & 1 deletion api/swagger-spec/rbac.authorization.k8s.io_v1beta1.json
Original file line number Diff line number Diff line change
Expand Up @@ -3402,14 +3402,19 @@
"description": "APIResource specifies the name of a resource and whether it is namespaced.",
"required": [
"name",
"singularName",
"namespaced",
"kind",
"verbs"
],
"properties": {
"name": {
"type": "string",
"description": "name is the name of the resource."
"description": "name is the plural name of the resource."
},
"singularName": {
"type": "string",
"description": "singularName is the singular name of the resource. This allows clients to handle plural and singular opaquely. The singularName is more correct for reporting status on a single item and both singular and plural are allowed from the kubectl CLI interface."
},
"namespaced": {
"type": "boolean",
Expand Down
7 changes: 6 additions & 1 deletion api/swagger-spec/settings.k8s.io_v1alpha1.json
Original file line number Diff line number Diff line change
Expand Up @@ -2390,14 +2390,19 @@
"description": "APIResource specifies the name of a resource and whether it is namespaced.",
"required": [
"name",
"singularName",
"namespaced",
"kind",
"verbs"
],
"properties": {
"name": {
"type": "string",
"description": "name is the name of the resource."
"description": "name is the plural name of the resource."
},
"singularName": {
"type": "string",
"description": "singularName is the singular name of the resource. This allows clients to handle plural and singular opaquely. The singularName is more correct for reporting status on a single item and both singular and plural are allowed from the kubectl CLI interface."
},
"namespaced": {
"type": "boolean",
Expand Down
7 changes: 6 additions & 1 deletion api/swagger-spec/storage.k8s.io_v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -987,14 +987,19 @@
"description": "APIResource specifies the name of a resource and whether it is namespaced.",
"required": [
"name",
"singularName",
"namespaced",
"kind",
"verbs"
],
"properties": {
"name": {
"type": "string",
"description": "name is the name of the resource."
"description": "name is the plural name of the resource."
},
"singularName": {
"type": "string",
"description": "singularName is the singular name of the resource. This allows clients to handle plural and singular opaquely. The singularName is more correct for reporting status on a single item and both singular and plural are allowed from the kubectl CLI interface."
},
"namespaced": {
"type": "boolean",
Expand Down
7 changes: 6 additions & 1 deletion api/swagger-spec/storage.k8s.io_v1beta1.json
Original file line number Diff line number Diff line change
Expand Up @@ -987,14 +987,19 @@
"description": "APIResource specifies the name of a resource and whether it is namespaced.",
"required": [
"name",
"singularName",
"namespaced",
"kind",
"verbs"
],
"properties": {
"name": {
"type": "string",
"description": "name is the name of the resource."
"description": "name is the plural name of the resource."
},
"singularName": {
"type": "string",
"description": "singularName is the singular name of the resource. This allows clients to handle plural and singular opaquely. The singularName is more correct for reporting status on a single item and both singular and plural are allowed from the kubectl CLI interface."
},
"namespaced": {
"type": "boolean",
Expand Down
Loading

0 comments on commit bc0171c

Please sign in to comment.