简体   繁体   English

如何使用 manifest.yml 在 cloudfoundry 上删除默认路由

[英]How can the default route be removed on cloudfoundry using the manifest.yml

I define a route for my cloudfoundry app in its manifest file:我在其清单文件中为我的 cloudfoundry 应用程序定义了一个路由:

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

My route gets successfully created during 'cf push' but unfortunately the default route gets created as well, ie I have two routes and I want only the one I defined in my manifest.我的路由在“cf push”期间成功创建,但不幸的是,默认路由也被创建了,即我有两条路由,我只想要我在清单中定义的一条。

Any ideas how to get rid of the default route?任何想法如何摆脱默认路由?

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.我知道可以删除路由,但是在我的情况下,由于“cf push”是通过 jenkins 管道触发的,所以我想在配置中提前定义所有内容。 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.如果我可以将路由的定义移动到清单变量文件中,那就更好了,但我现在直接在清单文件中尝试它,以确保这不是我的问题的根源,因为我没有还没有太多经验。

Thanks and beste regards, Yvonne谢谢和最好的问候, 伊冯娜

This should work, I just tried this against Pivotal Web Services, for which CAPI is always kept pretty up to date (currently API version 2.142.0) and it worked just fine, only creating the route I specified.应该可行,我刚刚针对 Pivotal Web 服务进行了尝试,CAPI 始终保持最新(当前 API 版本 2.142.0)并且它工作得很好,只创建了我指定的路线。 Which version of Cloud Foundry are you using?您使用的是哪个版本的 Cloud Foundry? Also, I haven't checked if there is such a configuration but maybe your Cloud Foundry instance is configured to always create a route on the default shared domain.此外,我还没有检查是否有这样的配置,但也许您的 Cloud Foundry 实例配置为始终在默认共享域上创建路由。

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.另一种可能性是使用命令unmap-routemap-route to map 并取消映射特定应用程序的路由。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 CloudFoundry manifest.yml,对象作为环境变量 - CloudFoundry manifest.yml with objects as env variables 如何使用外部manifest.yml打包战争 - How to package a war with an external manifest.yml cloud Foundry:manifest.yml服务设置 - cloud foundry : manifest.yml services setting 在云代工厂 cf push 命令中有没有办法让 manifest.yml 有几个“配置文件”? - Is there a way in cloud foundry cf push command to have a manifest.yml with several "profiles"? 如何使用扩展清单设置浏览器主页? - How can you set the browser homepage using the extension manifest? 找不到清单,从Travis CI部署到IBM Bluemix(CloudFoundry) - Manifest not found deploying from Travis CI to IBM Bluemix (CloudFoundry) Visual Studio 2010:如何使用默认设置嵌入清单 - Visual Studio 2010: How embed manifest with default settings 在Scala中,如何在上下文中隐式地对清单进行标题处理? - In Scala, How can Manifest implicitly be caputured in context? 如何使用VS2008将应用程序清单嵌入到应用程序中? - How can I embed an application manifest into an application using VS2008? 如何在Java中制作或更改清单? - how can I make or change a manifest in java?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM