Service Providers
This document outlines the ServiceProvider domain and its technical considerations within the context of the openMCP project, providing a foundation for understanding its architecture and operational aspects.
Goals
- Define clear terminology around
ServiceProviderwithin the openMCP project - Establish the scope of a
ServiceProvider, including its responsibilities and boundaries - Define a
ServiceProviderimplementation layer to implement common features and ensure consistency acrossServiceProviderinstances - Outline how a
ServiceProvidercan be validated
Non-Goals
ServiceProvidersare not required to deploy theirDomainServiceonWorkloadClusters. For now, aDomainServicecan be deployed on either aWorkloadClusterorMCPCluster. However, newly developed services should prioritize deploying their workloads onWorkloadClusters.- Define a
ServiceProvidermodel that implements a higher levelAPI/Runplatform concept (e.g., to allow flexible deployment models, e.g. withClusterProviderkcp)
Terminology
End Users: These are the consumers of services provided by an openMCP platform installation. They operate on theOnboardingClusterandMCPCluster(see deployment model).Platform Operators: These are either human users or technical systems that are responsible for managing an openMCP platform installation. While they may operate on any cluster, their primary focus is on thePlatformClusterandWorkloadCluster.
Domain
A ServiceProvider enables platform operators to offer managed DomainServices to end users. A DomainService is a third-party service that delivers its functionality to end users through a DomainServiceAPI.
For example, consider an openMCP installation that aims to provide Crossplane as a managed service to its end user. Let's assume that end users specifically want to use the Object API of provider-kubernetes, to create Kubernetes objects on their own Kubernetes clusters without the need to manage Crossplane themselves.
If we map this to the terminology of a DomainService and DomainServiceAPI:
- The
DomainServiceisCrossplane. - The
DomainServiceAPIisObject.
Note that provider-kubernetes depends on a running Crossplane installation to function properly. Therefore, provider-kubernetes itself cannot be considered a DomainService.
The following subsections describe the objects that a ServiceProvider introduces.
API
A ServiceProvider defines a ServiceProviderAPI to allow end users to request managed service. It is important to distinguish between ServiceProviderAPI and DomainServiceAPI.
While both are end user facing, they serve different purposes:
- The
ServiceProviderAPIallows end users to request aDomainServiceand gain access to itsDomainServiceAPI. - The
DomainServiceAPIdelivers direct value to end users by providing the functionality of aDomainService.
Config
A ServiceProvider defines a ServiceProviderConfig that contains provider-specific options for platform operators to specify a managed service offering. For example, service-provider-crossplane allows platform operators to decide which Crossplane providers can be installed by end user as part of the managed service.
All operator tasks may be partially or fully automated.
The ServiceProvider object itself is a higher level platform concept that is described in the corresponding PlatformService, i.e. openmcp-operator.
Service Discovery and Access Management
End users need to be aware of a) the available managed services, and b) valid input values to consume a service offering.
A) The available service offerings are made visible by installing the ServiceProviderAPI on the OnboardingCluster (see deployment model). This ensures that any platform tenant is aware of all available ServiceProviderAPIs. In other words, the platform does not hide its end-user-facing feature set, even if a user belongs to a tenant that cannot successfully consume a specific ServiceProviderAPI.
B) Valid input values are communicated through a yet-to-be-defined 'Marketplace'-like API provided by a PlatformService. Note: This is still work in progress and outside the scope of this document.
Deployment Model
A ServiceProvider runs on the PlatformCluster and reconcile its ServiceProviderAPI on the OnboardingCluster. It deploys a DomainService on either a WorkloadCluster or MCPCluster, which then reconciles the DomainServiceAPI.
The DomainServiceAPI is reconciled either on the MCPCluster or a WorkloadCluster. The following diagram illustrates two simplified DomainService examples, Landscaper and Crossplane, along with their corresponding DomainServiceAPIs, Installation and Bucket.
In the long term, the goal is to deploy every DomainService on WorkloadClusters. Newly developed services should prioritize deploying their workloads on WorkloadClusters rather than MCPClusters.
Validation
A ServiceProvider is considered healthy if both its API and Run components have been successfully synced and are ready for consumption.
The following validation flow validates that a ServiceProvider is functioning as expected:
- SETUP: Create test environment by installing any
ServiceProviderprerequisite: a) createPlatformClusterwith kind, b) install openmcp-operator and cluster-provider-kind and wait for everything to become available - ASSESS: Request
ServiceProviderand wait forServiceProviderdeployment andServiceProviderAPIto become available - ASSESS: Consume
ServiceProviderAPIto provision aDomainServiceand wait for theDomainServiceandDomainServiceAPIto become available - ASSESS: Consume the
DomainServiceAPIand validate that theDomainServiceis functioning as expected - ASSESS: Delete the
ServiceProviderAPIobject and wait for theDomainServicedeployment andDomainServiceAPIto be successfully removed - TEARDOWN: Delete the
ServiceProviderand clean up by deleting the test environment components
Runtime
A runtime is a collection of abstractions and contracts that provides an environment for executing user-defined logic. This establishes a clear separation between ServiceProvider the developer domain and the platform developer domain.
The service-provider-runtime is built on top of controller-runtime and introduces a service provider specific reconciliation loop. The design enables us as a platform to implement platform specific features around service providers, while allowing ServiceProvider developers to focus solely on DomainService specific logic without needing to understand platform internals. This approach ensures a consistent experience for both end users and developers when working with ServiceProviders.
The following table provides a simplified overview of the layers within a ServiceProvider controller:
| Layer | Description | Target Audience |
|---|---|---|
| Service Provider | Defines ServiceProviderAPI/ServiceProviderConfig and implements service-provider-runtime operations | Service provider developers |
| service-provider-runtime | Defines ServiceProvider reconciliation semantics | Platform developers |
| multicluster/controller-runtime | Defines generic reconciliation semantics | Out of scope |
| Kubernetes API machinery | Kubernetes essentials | Out of scope |
Functionality
This section outlines the main functionality implemented within the runtime. Currently, the focus is on establishing consistency across ServiceProvider implementations. However, this section can be extended in the future to include more generic ServiceProvider concepts that are handled within the runtime.
Main tasks towards MCP/Workload Clusters (based on watching the ServiceProviderAPI):
- Observe Service Deployment (Drift Detection) -> IN: context, apiObject, reconcileScope; OUT: bool[exists, drift], error
- Create Service Deployment (Init Lifecycle) -> IN: context, apiObject, reconcileScope; OUT: error
- Update Service Deployment (Reconcile Drift) -> IN: context, apiObject, reconcileScope; OUT: error
- Delete Service Deployment (End Lifecycle) -> IN: context, apiObject, reconcileScope; OUT: error
In this context, reconcileScope holds the ServiceProviderConfig and provides clients to access onboarding, mcp and workload clusters.
Main tasks towards Platform Cluster:
- Resolve
ServiceProviderConfig. If noServiceProviderConfigcan be resolved, the service request will fail.
Reconcile Sequence
The validation of a ServiceProviderConfig, if required, is part of ServiceProvider layer and not the runtime layer.
Related Artifacts
The following artifacts are derived from this document and must be continuously updated to maintain consistency:
- Service Provider Template
- Service Provider Runtime
- Service Provider Development Guide
Out of Scope
The remainder of this document contains topics that are out of scope for now.
Multicluster Execution Model
Multi-cluster functionality for ServiceProvider is a design goal for future iterations and might get integrated into service-provider-runtime. This would generally enable to run any DomainService on shared WorkloadCluster.
An approach could be to sync API objects between API and RUN clusters as a feature of service-provider-runtime.
Ideas
SoftDeleteplatform concept. Amanagedservice can transition to aunmanagedservice by soft deleting its correspondingServiceProviderConfigwithout losing theDomainService. This way a tenant could offboard itself partially or entirely from the platform without losing the provisioned infrastructure. This obviously depends on the ownership model of the infrastructure.- Distinguish between
RunandAPIartifacts on all platform layers
Terminology
Runclusters support scheduling workloads. ARuncluster may or may not also serve asAPIcluster.APIclusters serve APIs but do not support scheduling workload (note thatAPI/Runis a higher level platform concept)
References
Projects with similar concepts: