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

查看:30
本文介绍了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 服务器(现在,可以同时创建 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 端点
  • 对于返回的每个对象",调用正确的创建调用.

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

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