Discovery info for processedtemplates & templates both have kind: Template
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 8.7k
- Forks
- 4.8k
- Avg merge
- 4d 10h
- Merged PRs (30d)
- 53
Description
This might not be a bug, but creates complications for dynamic clients parsing discovery info:
Both oapi/v1 and apis/template.openshift.io/v1 have 2 different paths with same kind:
"name": "templates",
"namespaced": true,
"kind": "Template",
"verbs": ["create", "delete", "deletecollection", "get", "list", "patch", "update", "watch"],
...
"name": "processedtemplates",
"namespaced": true,
"kind": "Template",
"verbs": ["create"],
-
Given
kind: Templateinput, how doesocknow which of the endpoints to hit? -
Could anything be added to discovery to make this unambiguous?
-
What is the difference between
/templatesand/processedtemplatesanyway?
Do clients need both or can I just hardcode preference to/templates? -
The docs are non-helpful — don't explain the difference — and weird:
- https://docs.openshift.com/container-platform/3.11/rest_api/apis-template.openshift.io/v1.Template.html documents
"kind": "Template"for both endpoints. - https://docs.openshift.com/container-platform/3.11/rest_api/oapi/v1.Template.html documents
"kind": "ProcessedTemplate"for/templates. 🐛
Is kindProcessedTemplatea real thing? - https://docs.openshift.com/container-platform/3.11/rest_api/oapi/v1.ProcessedTemplate.html documents
"kind": "ProcessedTemplate"for/processedtemplates.
The docs are organized by
kind, could it be they're buggy as result of this collision? - https://docs.openshift.com/container-platform/3.11/rest_api/apis-template.openshift.io/v1.Template.html documents
Version
oc v3.11.0+8de5c34
kubernetes v1.10.0+d4cacc0
features: Basic-Auth GSSAPI Kerberos SPNEGO
Server https://192.168.99.103:8443
kubernetes v1.11.0+d4cacc0
Steps To Reproduce
curl $API/apis/template.openshift.io/v1/curl $API/oapi/v1/
Current Result
Duplicate entries with different name but same kind.
Expected Result
Ideally, exactly one name per kind (ignoring subresources like routes/status).
If kind ProcessedTemplate really exists, can that be reported for "name": "processedtemplates"?
If impossible, some hint in discovery info helping decide between the two?
Additional Information
FWIW, there was a similar collision up to openshift 3.6 between DeploymentConfig /generatedeploymentconfigs and DeploymentConfig /deploymentconfigs. generatedeploymentconfigs is gone in 3.7+ discovery info.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the two curl requests in the reproduction steps and compare the templates and processedtemplates entries in both discovery responses. Read the linked kubeclient discussion and the referenced OpenShift REST API documentation to establish the intended distinction. Done means the collision and ProcessedTemplate naming are resolved or clearly documented, with discovery and docs made consistent.
Written by the indexing model from the issue text.
Assessment
- Domain
- api, documentation
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100