Skip to main content

API limits

Some limits of osie-api apply to the whole installation, and you set them when you deploy it. Each has a default that suits most installations, so set a variable only to change that default.

VariableDefaultWhat it limits
OSIE_IMAGES_UPLOAD_MAX_SIZE10GBThe largest image file customers can upload to a cloud without a limit of its own
OSIE_MAIL_LOG_RETENTION_DAYS90The days the email log keeps an email
OSIE_KUBERNETES_MIN_FLAVOR_VCPUS2The vCPUs of the smallest flavor a Kubernetes node can run on
OSIE_KUBERNETES_MIN_FLAVOR_RAM_MB2048The RAM of that flavor, in MB

Set a variable​

Add the variable to the api section of your values file:

values.yaml
api:
extraEnvVars:
- name: OSIE_IMAGES_UPLOAD_MAX_SIZE
value: "50GB"

Apply it with helm upgrade, as described in Upgrading. The API pod restarts with the new value.

Set the largest image customers can upload​

OSIE_IMAGES_UPLOAD_MAX_SIZE takes a size with its unit, such as 500MB, 50GB or 1TB. The units count in multiples of 1024. The API does not start with a size of zero or less.

OSIE compares the size of the file with the limit before it reads any of the upload, and refuses a larger file with HTTP 413 IMAGE_TOO_LARGE. The client portal shows the limit in its upload dialog and refuses a larger file before it creates the image in the cloud. Administrators can give a cloud a limit of its own, which replaces this default for that cloud. See Limit the size of uploaded images.

Keep the email log for a set time​

OSIE_MAIL_LOG_RETENTION_DAYS sets how many days the email log keeps an email. MongoDB removes older emails on its own. A new value applies from the next start of the API, to the emails already in the log as well. The log holds whole emails, with your customers' names and addresses, so keep them no longer than you need them.

Set the smallest Kubernetes node flavor​

Kubernetes needs about 2 vCPUs and 2 GB of RAM on each node. On a smaller flavor, Magnum accepts the cluster and fails it later, which leaves a failed cluster without servers. OSIE therefore leaves smaller flavors out of the client portal's cluster form, for master and worker nodes alike. It also refuses them with HTTP 400 when a cluster is created through the API, before Magnum is called.

Raise OSIE_KUBERNETES_MIN_FLAVOR_VCPUS and OSIE_KUBERNETES_MIN_FLAVOR_RAM_MB when your cluster templates need larger nodes. A flavor qualifies only when it meets both.