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

no high level end user api for primary operations like application deployment #36

Closed
izapolsk opened this issue Mar 4, 2018 · 9 comments
Labels
lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.

Comments

@izapolsk
Copy link

izapolsk commented Mar 4, 2018

Existing openshift's rest api is low level and doesn't allow to do primary operations like application deployment, status check, etc.
If I'd like to deploy some application from template thru api, I go through the following steps:

  1. create new project (oc new-project).
    Issues: when I create project thru api, I get project w/o role bindings.
  2. create necessary persistent volumes (oc process/create)
    Issues: there is no api to process templates, nfs/hostPath pvs cannot create folders
  3. process and deploy template (oc process/oc create/oc new-app)
    Issues: no processing templates, code should recognize type of each template object and create it by appropriate api call

So, it would be great to implement some end user api like it can be done using oc command.

@deads2k
Copy link
Contributor

deads2k commented Mar 5, 2018

Issues: when I create project thru api, I get project w/o role bindings.

We're adding a controller in 3.10. The pull is currently open for review.

Issues: no processing templates, code should recognize type of each template object and create it by appropriate api call

See /apis/template.openshift.io/v1/processedtemplates which accepts a template and processes it for you. It returns a list, which can then be generically handled if you want to create generic objects.

Are you actually asking for a way to issue a generic "create this" without indicating which API endpoint to use?

nfs/hostPath pvs cannot create folders

I don't understand what this is asking for.

@izapolsk
Copy link
Author

izapolsk commented Mar 5, 2018

See /apis/template.openshift.io/v1/processedtemplates which accepts a template and processes it for you. It returns a list, which can then be generically handled if you want to create generic objects.
I didn't manage to figure out how I can pass parameters to template before processing it by processedtemplates.

Are you actually asking for a way to issue a generic "create this" without indicating which API endpoint to use?
honestly, I'm rather asking for some api which would allow me to easily deploy app from template similar to oc new-app or oc process + oc create.

I don't understand what this is asking for.
This issue is rather related to persistent volumes than api. I mentioned it here just because I bump into it only when I use api. openshift/origin#18817

@deads2k
Copy link
Contributor

deads2k commented Mar 5, 2018

See /apis/template.openshift.io/v1/processedtemplates which accepts a template and processes it for you. It returns a list, which can then be generically handled if you want to create generic objects.
I didn't manage to figure out how I can pass parameters to template before processing it by processedtemplates.

You set the values inside of the template object before you submit it.

@izapolsk
Copy link
Author

izapolsk commented Mar 6, 2018

You set the values inside of the template object before you submit it.
sure, I had to add a procedure which would process template and replace default parameter values with my values. However, I woudn't say this is convenient. especially for parameters with 'generate' function.
That's the reason why I ask for high level api where I don't need to process templates by my own scripts or check its object type in order to figure out which api call I should use.

@cben
Copy link

cben commented Dec 17, 2018

Can some documentation be added for how to use /processedtemplates endpoint? Current docs are not useful, /templates and /processedtemplates endpoints as described as pretty much the same, with POST to /processedtemplates described as "Create a template". But it doesn't really create anything, just returns result of substitutions, right?
The docs also seem to have some mixup about kind.
See openshift/origin#21668 with details.

@openshift-bot
Copy link

Issues go stale after 90d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle stale

@openshift-ci-robot openshift-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Aug 31, 2020
@openshift-bot
Copy link

Stale issues rot after 30d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.
Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle rotten
/remove-lifecycle stale

@openshift-ci-robot openshift-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Sep 30, 2020
@openshift-bot
Copy link

Rotten issues close after 30d of inactivity.

Reopen the issue by commenting /reopen.
Mark the issue as fresh by commenting /remove-lifecycle rotten.
Exclude this issue from closing again by commenting /lifecycle frozen.

/close

@openshift-ci-robot
Copy link

@openshift-bot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity.

Reopen the issue by commenting /reopen.
Mark the issue as fresh by commenting /remove-lifecycle rotten.
Exclude this issue from closing again by commenting /lifecycle frozen.

/close

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.

openshift-cherrypick-robot pushed a commit to openshift-cherrypick-robot/api that referenced this issue Feb 1, 2021
…port

WebhookDesc should use containerPort field
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.
Projects
None yet
Development

No branches or pull requests

5 participants