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

心已入冬 提交于 2019-12-11 14:46:49

问题


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

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

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?

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.

Thanks and beste regards, Yvonne


回答1:


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. Which version of Cloud Foundry are you using? 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.




回答2:


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.



来源:https://stackoverflow.com/questions/58698916/how-can-the-default-route-be-removed-on-cloudfoundry-using-the-manifest-yml

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!