
About this project
A template for building @openmcp-project Platform Services.
Requirements and Setup
- Create a new repository based on this template.
- Install opencontrolplane-gen.
- Use
task template:generate-service to create a new Platform Service.
- Test your Platform Service with
task test-e2e.
The template generates a basic Platform Service with a Config and API CRD.
For a detailed guide on setup and usage, please refer to the full Platform Service Development Guide.
Template Taskfiles
This template contains two Taskfiles:
- Taskfile.yaml contains the tasks to use once you created a Platform Service 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 Platform Service.
The following sections give a brief overview of the template specific tasks.
User tasks
To generate a new Platform Service, use task template:generate-service:
task template:generate-service name=foo api=Foo watch=platform module=github.com/yourorg/platform-service-foo
Add dryrun=true to print the result without applying the changes to disk.
template:generate-service supports the following arguments:
dryrun: Print in-memory result to stdout without altering any files (default false)
name: Name of the platform service (default "example")
api: Name of the API to create on the watched cluster (default "Example")
watch: The cluster to watch, allowed values are "platform" or "onboarding" (default "platform")
module The go module name of your platform service (default "github.com/openmcp-project/platform-service-example")
Development tasks
The following tasks are useful to test any template code changes.
template:dev:gen: Executes the template with the default values to render "platform-service-example" for local development.
template:dev:img: Builds a container image for "platform-service-example". This also includes code validating.
template:dev:e2e: Executes e2e tests for "platform-service-example".
All template:dev tasks support the following arguments:
watch: defines where the platform service API is created. Supported values are "platform" and "onboarding" (default "platform")
debug: enables debug logs of opencontrolplane-gen.
The generated platform service 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.