Skip to Content
ServicesAddon

Create an Addon

POST
/apis/funcd.io/v1alpha1/addons

Authorization

headerAuthorizationBearer <token>

A credential of funcd's config, sent as Authorization: Bearer followed by its token.

Query Parameters

dryRun?boolean

Admit the write and store nothing.

Request Body

application/json
  1. body
apiVersion*string
kind*string
metadata*
spec*
status?

Response Body

OK

application/json
  1. response
apiVersion*string
kind*string
metadata*
spec*
status?
Example Request
curl -X POST 'https://example.com/apis/funcd.io/v1alpha1/addons' \  -H 'Content-Type: application/json' \  -d '{  "apiVersion": "string",  "kind": "string",  "metadata": {},  "spec": {    "runtimes": [      {        "name": "string",        "workloads": [          "Function"        ]      }    ]  }}'
Example Response
{  "apiVersion": "string",  "kind": "string",  "metadata": {    "creationTimestamp": "2019-08-24T14:15:22Z",    "deletionTimestamp": "2019-08-24T14:15:22Z",    "finalizers": [      "string"    ],    "generateName": "string",    "generation": 0,    "name": "string",    "namespace": "string",    "ownerReferences": [      {        "blockOwnerDeletion": true,        "controller": true,        "kind": "string",        "name": "string",        "namespace": "string",        "uid": "string"      }    ],    "resourceGroup": "string",    "resourceVersion": "string",    "tags": {      "property1": "string",      "property2": "string"    },    "uid": "string"  },  "spec": {    "runtimes": [      {        "attributes": {          "basePath": "string",          "config": null,          "env": {            "property1": "string",            "property2": "string"          },          "function": {            "image": "string",            "ref": "string"          },          "kind": "string",          "port": 1,          "privatePaths": [            "string"          ],          "readiness": {            "path": "string"          },          "restore": {            "env": {              "property1": "string",              "property2": "string"            },            "path": "string",            "timeout": "string"          },          "resync": "string",          "secretKeys": [            "string"          ],          "settings": [            {              "constraints": {                "count": {                  "perNamespace": 0,                  "perTarget": 0                },                "immutable": [                  "string"                ],                "rules": [                  {                    "message": "string",                    "rule": "string"                  }                ],                "unique": [                  "string"                ]              },              "function": {                "image": "string",                "ref": "string"              },              "kind": "string",              "resync": "string",              "target": "string"            }          ],          "snapshot": {            "path": "string"          },          "storage": {            "gid": 0,            "path": "string",            "uid": 0          }        },        "image": "string",        "name": "string",        "workloads": [          "Function"        ]      }    ]  },  "status": {    "conditions": [      {        "lastTransitionTime": "2019-08-24T14:15:22Z",        "message": "string",        "observedGeneration": 0,        "reason": "string",        "status": "string",        "type": "string"      }    ],    "currentRevision": "string",    "observedGeneration": 0,    "phase": "Pending"  }}

Answers

StatusProblem typeWhenWhat to do
200OK
400urn:funcd:problem:invalidA field breaks a rule that the schema cannot hold, which the detail names.Correct the field that the detail names.
400about:blankThe body is missing or is not JSON.Send a JSON body.
400urn:funcd:problem:invalidThe Addon's kind or a settings kind is a kind of funcd's, another kind of the Addon or a path that funcd serves, whatever the case; a replace changes or drops the kind, or changes a settings kind's target; or a runtime's name is one of funcd's runtimes or a key of runtime.containerd.imageOverride.Choose another kind or runtime name. A new kind needs a new Addon, and a new target a new settings kind.
400urn:funcd:problem:invalidThe registry of a runtime's image, or of a kind's function.image, is not one that addons.registries lists.Use an image from a listed registry, or ask the operator to list its registry.
400urn:funcd:problem:invalidThe kind entry's config is not a JSON Schema in funcd's contract profile, or an env value is not a literal or a single ${{ }} expression that the schema types.Correct the field that the detail names.
401urn:funcd:problem:unauthorizedThe request carries no bearer token or API key, or one that funcd does not know.Send a credential of funcd's config as a bearer token in the Authorization header, or in X-Api-Key.
403urn:funcd:problem:forbiddenThe credential's role does not allow it to create an Addon.Use an admin's credential.
409urn:funcd:problem:conflictAn Addon of that name already exists.Choose another name, or replace the existing Addon.
409urn:funcd:problem:conflictAnother Addon registers the same kind or the same plural, whatever the case, or ships a runtime of the same name.Choose another kind or runtime name, or change the other Addon.
413urn:funcd:problem:payload-too-largeThe body is larger than 1 MiB.Send a smaller body.
415about:blankThe Content-Type of the body is not JSON.Send the body as application/json.
422about:blankThe query holds a parameter that the operation does not take.Send only the parameters that the operation lists.
422about:blankThe dryRun parameter is neither true nor false.Send dryRun=true, or leave it out.
422about:blankThe body breaks the schema: a field that it does not know, of the wrong type or past its limits.Correct the field at the location that the detail gives.