Webhooks

APPUiO Cloud quota webhooks

APPUiO Cloud provides a quota system, which AppCat has to comply and integrate into. It accomplishes that, by providing nice error messages, if any of the given quotas are breached.

There are multiple quotas that need to be complied by this system: * the amount of namespaces an organization can have * the amount of resources that can be used within a namespace

The amount of namespaces is straight forward by checking if there’s a custom value set or just checking against the default of 25. The custom value is stored in an overrides-$orgname ConfigMap that resides in the namespace appuio-cloud. If the key namespaceQuota is set, it will check against that amount of namespaces. If the requested AppCat instance would tip the amount of namespaces over this threshold, it will block the creation.

Additionally, each namespace has quotas that need to comply. Via AppCat comp-functions, we set the quotas to a slightly higher value than the APPUiO Cloud default:

  • 4.5 CPU limts/requests

  • 16.5Gb Memory limits/requests

This should ensure that for each service at least one replica can be instantiated with the *-8 plans. These values are written into annotations on the namespace. To override them, simply adjust the annotations to the new value.

Due to the way that quotas are bound to a namespace it’s not possible to create a new instance that requests more resources than the default quotas allow. The instance has first to be created with a valid amount of resources. Afterward VSHN Support can adjust the quotas on the namespace.

quotas.excalidraw