如何使用manifest.yml在cloudfoundry上删除默认路由 [英] How can the default route be removed on cloudfoundry using the manifest.yml

查看:169
本文介绍了如何使用manifest.yml在cloudfoundry上删除默认路由的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在自己的清单文件中为我的cloudfoundry应用程序定义了一条路线:

I define a route for my cloudfoundry app in its manifest file:

---
  ...
  routes:
  - route: example.com

在"cf push"期间成功创建了我的路由,但是不幸的是,默认路由也被创建,即我有两条路由,我只想在清单中定义一条.

My route gets successfully created during 'cf push' but unfortunately the default route gets created as well, i.e. I have two routes and I want only the one I defined in my manifest.

有什么想法可以摆脱默认路线吗?

Any ideas how to get rid of the default route?

我知道可以删除路由,但是在我的情况下,由于通过詹金斯管道触发了"cf push",因此我想提前定义配置中的所有内容.我认为清单文件是最好的选择.

I know it is possible to remove routes, but as 'cf push' is triggered via a jenkins pipeline in my case I'd like to define everything in advance in the configuration. I assume that the manifest file is the best place to do so.

更好的是,如果我可以将路线的定义移动到清单变量文件中,但是我现在正在清单文件中直接尝试以确保这不是问题的根源我还没有很多经验.

Even better would be if I can move the definition of the route into a manifest-variables file, but I'm trying it in the manifest file directly at the moment to be sure that this is not the source of my issue as I don't have much experience with it yet.

感谢和问候, 伊冯

推荐答案

另一种可能性是使用命令 unmap-route map-route 进行映射并取消映射特定应用程序的路由.

One of the other possibilities is to use the commands unmap-route and map-route to map and unmap the routes of a specific application.

这篇关于如何使用manifest.yml在cloudfoundry上删除默认路由的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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