terraform-provider-rancher icon indicating copy to clipboard operation
terraform-provider-rancher copied to clipboard

Feature Request - Resource to Manage Catalogs

Open vikas027 opened this issue 8 years ago • 4 comments

Feature Request

It would be great to have a resource for managing (add, update, remove) a catalog.

vikas027 avatar Jun 30 '17 15:06 vikas027

I have this on my to-do list. Not sure exactly when I will implement it though, and you're welcome to beat me to it.

raphink avatar Jul 01 '17 19:07 raphink

Sure, I will try to find time for the same, adding this on my ToDo list as well :)

vikas027 avatar Jul 03 '17 09:07 vikas027

For the record, the /v1-catalog API point doesn't seem to allow creation of catalog entries. Instead, all catalog entries specifications are stored in the catalog.url setting at /v2-beta/setting/catalog.url, as a JSON hash, e.g.:

"value": "{\"catalogs\":{\"library\":{\"url\":\"https://git.rancher.io/rancher-catalog.git\",\"branch\":\"${RELEASE}\"},\"community\":{\"url\":\"https://git.rancher.io/community-catalog.git\",\"branch\":\"master\"},\"camptocamp\":{\"url\":\"https://github.com/camptocamp/camptocamp-rancher-catalog\",\"branch\":\"master\"}}}"

@cloudnautique is that where it is supposed to be notified, or am I missing something?

raphink avatar Jul 03 '17 13:07 raphink

There are now two types of catalogs, the global catalogs which are managed through the setting mentioned above, and the environment level catalogs.

A post to https://rancher/v1-catalogs/catalogs with a payload:

{
  "name":"swarm-demo",
  "branch":"master",
  "url":"https://github.com/rancher/swarmkit-catalog",
  "kind":"native",
  "isNew":true
}

Adds an environment scoped catalog.

cloudnautique avatar Sep 08 '17 16:09 cloudnautique