Skip to Content
Tenancy and limits

Namespaces and resource groups

Delete the resources of a resource group as one, set the defaults of a namespace with a Namespace, and reach a namespace at its own host.

This page lists the spec and status fields of Namespace and ResourceGroup, each with its type, its limits and its description. The Platform page explains the concept, and the metadata of every kind is the same.

Namespace

apiVersion: funcd.io/v1alpha1
kind: Namespace
metadata:
  name: shop
spec:
  defaultExposure: explicit
apiVersionkind
funcd.io/v1alpha1Namespace

Namespace.spec

FieldType and limitsDescription
defaultExposurestring, one of "", implicit, explicitWhether the namespace's Functions and Sites answer at their own address, such as /function/<name>, while their spec.ingress.enabled is unset: implicit, or empty, turns it on, and explicit turns it off. The namespace's other Routes, an App's included, stay on, though in the default namespace explicit refuses one with no host (HostRequired).
edgeDefaultsobject, Namespace.spec.edgeDefaultsThe namespace's edge defaults, which apply where a Route or a Function's or Site's spec.ingress sets no value of its own.
volumeBudgetstring, a size: 1 to 15 digits and an optional binary unit, Ki, Mi, Gi or Ti, with or without a B (512Ki, 2GiB)The most volume space the namespace's Functions may reserve: each local volume's size from apply until the volume is removed, and each worker's emptyDir while the worker exists. Apply refuses a local volume that does not fit (VolumeBudget), and a worker whose emptyDir does not fit is not created. Set volumeBudget or volumeBudgetBytes, not both; neither, or 0, means no budget.
volumeBudgetBytesinteger, at least 0The same budget as volumeBudget, as a number of bytes. Set volumeBudget or volumeBudgetBytes, not both; 0 means no budget.

Namespace.spec.edgeDefaults

FieldType and limitsDescription
authobject, Namespace.spec.edgeDefaults.authThe default edge authentication of the namespace's Routes and of its Functions' and Sites' own addresses, used where a rule, its Route and spec.ingress.auth set none; unset is open. It is a default, not a floor: a rule or a Route that sets open stays open.

Namespace.spec.edgeDefaults.auth

FieldType and limitsDescription
modestring, one of "", authenticated, open, oidcauthenticated admits only a caller whose token, sent as Authorization: Bearer or X-Api-Key, may get the namespace's Functions; others get 401 or 403, and every caller gets 401 while server.auth.edge is off. oidc signs callers in with the OIDCProvider that provider names. open, or empty, admits anyone. It reaches no Lake's or add-on object's address.
providerstring, a DNS-1123 labelWith mode oidc, the OIDCProvider of the namespace that signs callers in; required with oidc and refused with another mode. The namespace shows a ProviderNotFound condition while it names no OIDCProvider.
unauthenticatedstring, one of "", redirect, 401, allowWith mode oidc, what a call that is not signed in gets: redirect, the default, 401 or allow, as on a Route's auth. Refused with another mode.

Namespace.status

FieldType and limitsDescription
conditionsarray of ConditionThe conditions that explain the phase.
observedGenerationintegerThe generation of the spec that funcd last acted on.
phasestring, one of Pending, Deploying, Ready, Idle, Degraded, Failed, TerminatingWhere the object is in its lifecycle.

ResourceGroup

apiVersion: funcd.io/v1alpha1
kind: ResourceGroup
metadata:
  name: rg1
  namespace: default
  resourceGroup: rg1
spec:
  description: The resources of the guide's examples
apiVersionkind
funcd.io/v1alpha1ResourceGroup

ResourceGroup.spec

FieldType and limitsDescription
descriptionstringFree text about the group; funcd does not read it.

ResourceGroup.status

FieldType and limitsDescription
conditionsarray of ConditionThe conditions that explain the phase.
observedGenerationintegerThe generation of the spec that funcd last acted on.
phasestring, one of Pending, Deploying, Ready, Idle, Degraded, Failed, TerminatingWhere the object is in its lifecycle.

HTTP API

The table lists each described operation of these kinds, with its method and path. The operation's page in the API reference gives its parameters, its body, its authentication and every answer, with when it happens and what to do.

MethodPathOperation
GET/apis/funcd.io/v1alpha1/namespacesList the Namespaces
POST/apis/funcd.io/v1alpha1/namespacesCreate a Namespace
GET/apis/funcd.io/v1alpha1/namespaces/{name}Read a Namespace
PUT/apis/funcd.io/v1alpha1/namespaces/{name}Replace a Namespace
DELETE/apis/funcd.io/v1alpha1/namespaces/{name}Delete a Namespace
GET/apis/funcd.io/v1alpha1/namespaces/{namespace}/resourcegroupsList the ResourceGroups of a namespace
POST/apis/funcd.io/v1alpha1/namespaces/{namespace}/resourcegroupsCreate a ResourceGroup
GET/apis/funcd.io/v1alpha1/namespaces/{namespace}/resourcegroups/{name}Read a ResourceGroup
PUT/apis/funcd.io/v1alpha1/namespaces/{namespace}/resourcegroups/{name}Replace a ResourceGroup
DELETE/apis/funcd.io/v1alpha1/namespaces/{namespace}/resourcegroups/{name}Delete a ResourceGroup

On this page