Does anybody know if it is possible to add a custom catalog using Rancher’s API? I currently have scripts that use the API to create and configure a local Rancher instance with API Tokens and registries (DockerHub and Artifactory). I would also like to add in our custom Rancher Catalog.
{“id”:“0884ac22-ad11-404a-a581-2a444ff81e44”,“type”:“error”,“links”:{},“actions”:{},“status”:405,“code”:“Method not allowed”,“message”:“Method not allowed”,“detail”:null}{“id”:“91437d43-1bb5-438a-955c-c580b2cdc394”,“type”:“error”,“links”:{},“actions”:{},“status”:405,“code”:“Method not allowed”,“message”:“Method not allowed”,“detail”:null}
It seems the API token I’m using for default environment does not work with settings. I have not yet enabled any authentication. How can I generate a key pair that will work against /v1/activesettings?
With access control off you don’t need to send authentication at all, but settings are global so an environment-specific apikey doesn’t have access to change them.
I was facing a similar problem and came across your solution and it did solve my problem. However, this only creates the catalog from the Main line of the git path. Is there a way to link a specific Branch?
There’s a newer format as JSON which has a field for branch. If you setup what you want in the UI you can just GET /v2-beta/settings/catalog.url to see the right value.