Openshift Origin 1.1 REST API是否允许基于模板创建新的应用程序? [英] Does Openshift Origin 1.1 REST API allow to create new applications based on templates?

查看:109
本文介绍了Openshift Origin 1.1 REST API是否允许基于模板创建新的应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在开发一个自定义控制台来管理开发环境.我们在openshift中预装了几个应用程序模板,每当开发人员想要创建新环境时,我们都需要告诉openshift(通过REST API)基于其中一个模板(例如oc new-app模板)创建一个新应用程序.

We are developing a custom console to manage development environments. We have several application templates preloaded in openshift, and whenever a developer wants to create a new environment, we would need to tell openshift (via REST API) to create a new application based on one of those templates (oc new-app template).

我在REST API规范中找不到任何内容.有其他替代方法吗?

I can't find anything in the REST API specification. Is there any alternative way to do this?

谢谢

推荐答案

目前没有单个API一次性创建所有API.原因是创建流程旨在跨越多个不相交的API服务器(今天,可以一次创建Kube和OpenShift资源,将来可以创建单个Kube扩展).我们希望保留对每个单独的API组进行身份验证的客户端的可能性.但是,这使得编写这样的简单客户端变得更加困难,因此我们计划添加该对象.

There is no single API that today creates all of that in one go. The reason is that the create flow is intended to span multiple disjoint API servers (today, Kube and OpenShift resources can be created at once, and in the future, individual Kube extensions). We wanted to preserve the possibility that a client was authenticated to each individual API group. However, it makes it harder to write easy clients like this, so it is something we plan on adding.

今天,来自CLI和WebUI的流程是:

Today the flow from the CLI and WebUI is:

  • 获取模板
  • 调用POST/processedtemplates端点
  • 对于返回的每个对象",调用正确的create调用.

这篇关于Openshift Origin 1.1 REST API是否允许基于模板创建新的应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆