Cluster API custom configuration
Cluster API documentation for custom configuration
Config
- GET /config
Get the custom configuration
- Response JSON Object:
[key] (undefined) –
Example response:
{ "bins": { "binary": "C:\\genvid\\main\\bin\\binsd.exe" }, "local": { "appdir": "C:\\genvid\\main\\samples\\ue4\\cube\\app", "binary": { "cube": { "path": "C:\\genvid\\main\\samples\\ue4\\cube\\app\\Archives\\WindowsNoEditor\\Cube\\Binaries\\Win64\\Cube.exe" }, "node": { "path": "C:\\Program Files\\nodejs\\node.exe" } }, "website": { "root": "C:\\genvid\\main\\samples\\ue4\\cube\\web", "script": "C:\\genvid\\main\\samples\\ue4\\cube\\web\\bin\\www" } }, "studio": { "binary": "C:\\genvid\\main\\bin\\studiod.exe", "website": "C:\\genvid\\main\\bin\\studio\\web" } }
- POST /config
Set the custom configuration
- Request JSON Object:
[key] (undefined) –
Example query:
{ "bins": { "binary": "C:\\genvid\\main\\bin\\binsd.exe" }, "local": { "appdir": "C:\\genvid\\main\\samples\\ue4\\cube\\app", "binary": { "cube": { "path": "C:\\genvid\\main\\samples\\ue4\\cube\\app\\Archives\\WindowsNoEditor\\Cube\\Binaries\\Win64\\Cube.exe" }, "node": { "path": "C:\\Program Files\\nodejs\\node.exe" } }, "website": { "root": "C:\\genvid\\main\\samples\\ue4\\cube\\web", "script": "C:\\genvid\\main\\samples\\ue4\\cube\\web\\bin\\www" } }, "studio": { "binary": "C:\\genvid\\main\\bin\\studiod.exe", "website": "C:\\genvid\\main\\bin\\studio\\web" } }
- DELETE /config
Delete the configuration
- POST /consultemplate
Render a template with consul-template in the context of the cluster.
Deprecated since version 1.33.0: Deprecated in favor of /template_renderer.
- Request JSON Object:
sources (string) – A go-getter (https://github.com/hashicorp/go-getter) compatible url accessible by the cluster that contains the template files.
templatePath (string) – The path of the template file to render in the sources archives.
content (string) – The content of the template. If this field is provided, the
templatePath
will be ignored.environment[key] (string) – the value of the environment variable
- Response JSON Object:
data (string) – The rendered template.
stderr (string) – The logs of the rendering.
Example query:
{ "sources": "s3://artifacts/templates/archive.zip", "templatePath": "template.tmpl", "environment": { "FAVORITE_COLOR": "blue", "SPEED_UNLADEN_SWALLOW": "NaN" } }
Example response:
{ "data": "127.0.0.1" }
- POST /template_renderer
Render a template with consul-template in the context of the cluster. A
GENVID_TEMPLATE_SANDBOX_PATH
is set to the location of where the sources are copied.- Request JSON Object:
sources (string) – A go-getter (https://github.com/hashicorp/go-getter) compatible url accessible by the cluster that contains the template files.
templatePath (string) – The path of the template file to render in the sources archives.
content (string) – The content of the template. If this field is provided, the
templatePath
will be ignored.environment[key] (string) – the value of the environment variable
- Response JSON Object:
data (string) – The rendered template.
stderr (string) – The logs of the rendering.
Example query:
{ "sources": "s3://artifacts/templates/archive.zip", "templatePath": "template.tmpl", "environment": { "FAVORITE_COLOR": "blue", "SPEED_UNLADEN_SWALLOW": "NaN" } }
Example response:
{ "data": "127.0.0.1" }