Namespaces
This page describes how to configure namespaces in the context of Kubernetes .
A namespace is a way to divide cluster resources between multiple users (via resource quota) or between multiple projects (via resource isolation).
Kannika Armory resources (Backup, Restore, …) will generate other resources in the same namespace. For example, when running a Backup, a Deployment will be created in the same namespace as the Backup.
Configuring the namespaces for the API
The API can be configured to view and create resources in a certain namespace.
By default, the API will use the default
namespace.
The following configuration options are available in our Helm charts to configure the API:
Chart | Parameter |
---|---|
oci://quay.io/kannika/charts/kannika | global.kubernetes.namespace |
oci://quay.io/kannika/charts/kannika | api.config.kubernetes.namespace |
oci://quay.io/kannika/charts/kannika-api | config.kubernetes.namespace |
Note that the specific API configuration option takes precedence over the global configuration option.
The KANNIKA_K8S_NAMESPACE
environment variable is set on the API container with the configured value.
Configuring the namespaces for the Operator
The operator is currently not namespace aware. It will watch for changes in all namespaces it has access to.
In the near future, we will add the ability to configure the operator to only watch specific namespaces.