
service-provider-template
Quality Criteria

| Criterion |
Status |
Notes |
| Deletion behaviour |
❌ |
|
| Status reporting & error messages |
❌ |
|
| Operation annotations |
❌ |
|
| API stability policy |
❌ |
|
| Custom CA support |
❌ |
|
| Release artifacts (image + OCM) |
❌ |
|
| Testing |
❌ |
|
| Ownership and maintenance docs |
❌ |
|
See the OpenControlPlane Quality Criteria for definitions.
About this project
A template for building @openmcp-project Service Providers.
Requirements and Setup
- Create a new repository based on this template.
- Install opencontrolplane-gen.
- Run
task template:generate-provider to generate your ServiceProvider.
- Implement your reconciler logic and run the e2e tests.
Code generation is powered by opencontrolplane-gen, which processes //go:generate opencontrolplane-gen directives in the source files. Placeholders (e.g. Foo, foo) are replaced based on environment variables set by the Task targets.
Template Taskfiles
This template contains two Taskfiles:
- Taskfile.yaml contains the tasks to use once you created a Service Provider based on this template.
- Taskfile_template.yaml contains the tasks to use while working with the template. This Taskfile can be removed once you used this template to create a Service Provider.
The following sections give a brief overview of the template specific tasks.
User tasks
To generate a Service Provider, use task template:generate-provider:
task template:generate-provider api=YourKind name=yourname module=github.com/yourorg/yourrepo
The following options are available:
| Variable |
Description |
Default |
api |
GVK kind name |
Example |
name |
Service provider name (used in folder and tasks) |
example |
module |
Go module path |
github.com/openmcp-project/service-provider-example |
workloadcluster |
Run on a workload cluster |
false |
secretwatcher |
Include secret watcher implementation |
false |
samplecode |
Include sample provider code |
false |
dryrun |
Preview the output without writing files |
false |
Then you can run the e2e test to verify that the template rendered a working Service Provider:
task test-e2e
For a detailed guide on setup and usage, please refer to the full Service Provider Development Guide.
Template Development
The following tasks are useful to test any template code changes.
template:dev:gen: Executes the template with the default values to render "service-provider-example" for local development.
template:dev:img: Builds a container image for "service-provider-example". This also includes code validating.
template:dev:e2e: Executes e2e tests for "service-provider-example".
All template:dev tasks support the following arguments:
debug: enables debug logs of opencontrolplane-gen.
workloadcluster: Run on a workload cluster.
secretwatcher: Include secret watcher implementation.
samplecode: Include sample provider code.
Service Provider Runtime Flags
The generated service provider supports the following runtime flags:
--verbosity: Logging verbosity level (see controller-runtime logging)
--environment: Name of the environment (required for operation)
--provider-name: Name of the provider resource (required for operation)
--metrics-bind-address: Address for the metrics endpoint (default: 0, use :8443 for HTTPS or :8080 for HTTP)
--health-probe-bind-address: Address for health probe endpoint (default: :8081)
--leader-elect: Enable leader election for controller manager (default: false)
--metrics-secure: Serve metrics endpoint securely via HTTPS (default: true)
--enable-http2: Enable HTTP/2 for metrics and webhook servers (default: false)
For a complete list of available flags, run the generated binary with -h or --help.
Support, Feedback, Contributing
This project is open to feature requests/suggestions, bug reports etc. via GitHub issues. Contribution and feedback are encouraged and always welcome. For more information about how to contribute, the project structure, as well as additional contribution information, see our Contribution Guidelines.
Security / Disclosure
If you find any bug that may be a security problem, please follow our instructions at in our security policy on how to report it. Please do not create GitHub issues for security-related doubts or problems.
Code of Conduct
We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone. By participating in this project, you agree to abide by its Code of Conduct at all times.
Licensing
Copyright OpenControlPlane contributors. Please see our LICENSE for copyright and license information. Detailed information including third-party components and their licensing/copyright information is available via the REUSE tool.
OpenControlPlane is part of ApeiroRA, an EU Important Project of Common European Interest (IPCEI-CIS).
Copyright Linux Foundation Europe. For web site terms of use, trademark policy and other project policies please see https://linuxfoundation.eu/en/policies.