|
| 1 | +# Deployment Controllers |
| 2 | + |
| 3 | +An OpenMCP landscape has three controllers (called _deployment controllers_) which are responsible for deploying other controllers (called _providers_): |
| 4 | + |
| 5 | +- the **ClusterProvider Controller** is responsible for deploying cluster providers. |
| 6 | +- the **ServiceProvider Controller** is responsible for deploying service providers. |
| 7 | +- the **PlatformService Controller** is responsible for deploying platform services. |
| 8 | + |
| 9 | +The deployments are specified in kubernetes resources of the kinds `ClusterProvider`, `ServiceProvider`, and `PlatformService` respectively. |
| 10 | + |
| 11 | +## Provider Image |
| 12 | + |
| 13 | +To be deployable, each provider must have an image available in a container registry. The image must have an executable as entrypoint. It will be used twice: to initialize the provider and to run it. For the initialization, a Job is started with the executable, and the following arguments are supplied: |
| 14 | + |
| 15 | +```shell |
| 16 | +init |
| 17 | +--environment <environment> |
| 18 | +--verbosity <DEBUG, INFO, or ERROR> |
| 19 | +``` |
| 20 | + |
| 21 | +Once the initialization job has completed, a Deployment is created/updated with the same image and the following arguments: |
| 22 | + |
| 23 | +```shell |
| 24 | +run |
| 25 | +--environment <environment> |
| 26 | +--verbosity <DEBUG|INFO|ERROR> |
| 27 | +``` |
| 28 | + |
| 29 | +## Provider Resource |
| 30 | + |
| 31 | +The provider resources specify how to deploy the providers. They are of the kind `ClusterProvider`, `ServiceProvider`, or `PlatformService`. They are cluster-scoped, and have the following common structure: |
| 32 | + |
| 33 | +```yaml |
| 34 | +apiVersion: openmcp.cloud/v1alpha1 |
| 35 | +kind: <ClusterProvider|ServiceProvider|PlatformService> |
| 36 | +metadata: |
| 37 | + name: <name> |
| 38 | +spec: |
| 39 | + image: <image> |
| 40 | + imagePullSecrets: |
| 41 | + - name: <image-pull-secret-name> |
| 42 | + env: |
| 43 | + - name: <environment-variable-name> |
| 44 | + value: <environment-variable-value> |
| 45 | + verbosity: <DEBUG|INFO|ERROR> |
| 46 | +``` |
| 47 | +
|
| 48 | +- The `image` field specifies the container image to use for the init job and deployment of the provider. |
| 49 | +- The `imagePullSecrets` field specifies a list of secrets that contain the credentials to pull the image from a registry. |
| 50 | +- The `env` field specifies a list of name-value pairs that are passed as environment variables to the init job and deployment of the provider. |
| 51 | +- The `verbosity` field specifies the logging level. Supported values are DEBUG, INFO, and ERROR. The default is INFO. |
0 commit comments