-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Discovery info for processedtemplates & templates both have kind: Template #21668
Comments
Openshift discovery lists both `templates` and `processedtemplates` for same kind "Template": openshift/origin#21668 `templates` is a regular stored api object. `processedtemplates` endpoint isn't, its POST is a special input (template + params) -> output function. That functionality is already covered in kubeclient by `process_template` method. It doesn't need regular create_, get_, watch_ etc methods. This is already so because in all openshift versions, `templates` comes after `processedtemplates` and replaces it in `@entities["Template"]`.
Openshift discovery lists both `templates` and `processedtemplates` for same kind "Template": openshift/origin#21668 `templates` is a regular stored api object. `processedtemplates` endpoint isn't a stored object, its POST is a special input (template + params) -> output function. That functionality is already covered in kubeclient by `process_template` method. It doesn't need regular create_, get_, watch_ etc methods. This is already so because in all openshift versions, `templates` comes after `processedtemplates` and replaces it in `@entities["template"]`.
Issues go stale after 90d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle stale |
Stale issues rot after 30d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle rotten |
Rotten issues close after 30d of inactivity. Reopen the issue by commenting /close |
@openshift-bot: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/reopen
To partially answer myself, /processedtemplates endpoint is a pseudo-collection for server-side
AFAICT kind "ProcessedTemplate" is not a thing. |
@cben: Reopened this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Such collisions have caused a bunch of ResourceNotUniqueError errors in python lib (which is also a dynamic client using discovery info): |
|
Rotten issues close after 30d of inactivity. Reopen the issue by commenting /close |
@openshift-bot: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/reopen |
@cben: Reopened this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
… by [kind, name, singularName, shortNames] * ansible/ansible#55221 * openshift/origin#21668 * ansible/ansible#58130 * ansible/ansible#49100
Hello! Any update on this? Still hitting this issue. |
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
:Given
kind: Template
input, how doesoc
know which of the endpoints to hit?Could anything be added to discovery to make this unambiguous?
What is the difference between
/templates
and/processedtemplates
anyway?Do clients need both or can I just hardcode preference to
/templates
?The docs are non-helpful — don't explain the difference — and weird:
"kind": "Template"
for both endpoints."kind": "ProcessedTemplate"
for/templates
. 🐛Is kind
ProcessedTemplate
a real thing?"kind": "ProcessedTemplate"
for/processedtemplates
.The docs are organized by
kind
, could it be they're buggy as result of this collision?Version
Steps To Reproduce
curl $API/apis/template.openshift.io/v1/
curl $API/oapi/v1/
Current Result
Duplicate entries with different
name
but samekind
.Expected Result
Ideally, exactly one
name
perkind
(ignoring subresources likeroutes/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
andDeploymentConfig
/deploymentconfigs
.generatedeploymentconfigs
is gone in 3.7+ discovery info.The text was updated successfully, but these errors were encountered: