Skip to content

About

Service provider Crossplane manages the lifecycle of Crossplane instances

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

4 watching

Forks

REUSE status

service-provider-crossplane

Service provider Crossplane manages the lifecycle of Crossplane instances, Crossplane providers and Crossplane functions in a ControlPlane.

Quality Criteria

Quality: Incubating

Criterion Status Notes
Deletion behaviour ⚠️ A finalizer ensures the Service Provider managed resources like Flux' OCIRepository and HelmRelease are cleaned-up. But there is no behaviour that ensures deletion is blocked if custom resources (aka Crossplane ManagedResources) in a ControlPlane still exist.
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.

🏗️ Installation of the Service Provider Crossplane

Local Development

To run the service-provider-crossplane locally, you need to first bootstrap an OpenControlPlane environment by using openmcp-operator and cluster-provider-kind. A comprehensive guide will follow soon.

For current testing reasons, the service-provider-crossplane needs to run in the cluster. To run the latest version of your changes in your local environment, you need to run:

task build:img:build

This will build the image of the service-provider-crossplane locally and puts it into your local Docker registry.

docker images ghcr.io/openmcp-project/images/service-provider-crossplane

You can then apply the ServiceProvider resource to your openMCP Platform cluster:

apiVersion: openmcp.cloud/v1alpha1
kind: ServiceProvider
metadata:
  name: crossplane
spec:
  image: ghcr.io/openmcp-project/images/service-provider-crossplane:... # latest local docker image build

OpenControlPlane Landscape

When you already have an OpenControlPlane environment set up, you can deploy the service-provider-crossplane by applying the following manifest:

apiVersion: openmcp.cloud/v1alpha1
kind: ServiceProvider
metadata:
  name: crossplane
spec:
  image: ghcr.io/openmcp-project/images/service-provider-crossplane:<latest-version> # latest upstream version

📖 Usage

Configure a ProviderConfig

A ProviderConfig is an API where you can configure an allow-list of Crossplane, provider and function installations in your ControlPlane. The ProviderConfig is stored in the Platform cluster and therefore in the responsibility realm of the platform owner. The name of the ProviderConfig must match the --provider-name argument that is passed to the service provider crossplane operator.

apiVersion: crossplane.services.open-control-plane.io/v1alpha1
kind: ProviderConfig
metadata:
  name: crossplane
spec:
  versions:
    - version: v2.0.2
      chart:
        url: "ghcr.io/openmcp-project/openmcp/charts/crossplane:2.0.2" # example OCI regsitry URL for Crosslane helm chart
        secretRef: # optional
          name: ghcr
      image:
        url: "xpkg.crossplane.io/crossplane/crossplane:2.0.2" # currently, upstream location but can be private registry as well
        secretRef:
          name: xyz # optional
    - version: v1.20.0
      chart:
        url: "ghcr.io/openmcp-project/openmcp/charts/crossplane:1.20.0" # example OCI regsitry URL for Crosslane helm chart
        secretRef: # optional
          name: ghcr
      image:
        url: "xpkg.crossplane.io/crossplane/crossplane:1.20.0" # currently, upstream location but can be private registry as well
        secretRef: # optional
          name: xyz

  functions:
    availableFunctions:
      - name: function-patch-and-transform
        package: "xpkg.upbound.io/crossplane-contrib/function-patch-and-transform"
        versions:
          - "v0.8.0"
    imagePullSecretRefs:
      - name: secretforprivatefunctions

  providers:
    availableProviders:
      - name: provider-kubernetes
        package: xpkg.upbound.io/upbound/provider-kubernetes
        versions:
          - v0.16.0
          - v0.15.0
    imagePullSecretRefs:
      - name: secretforprivateproviders
      - name: xyz

The ProviderConfig allows you to specify secret references for private helm chart or image locations. NOTE: ProvierConfig.spec.versions[].chart.url needs to be image URL to an OCI registry.

Install a Crossplane instance

apiVersion: crossplane.services.open-control-plane.io/v1alpha1
kind: Crossplane
metadata:
  name: crossplane-sample
  namespace: default
spec:
  version: v1.20.0 # allowed version from ProviderConfig
  providers:
    - name: provider-kubernetes
      version: v0.16.0 # allowed version from ProviderConfig
  functions:
    - name: function-patch-and-transform
      version: v0.8.0 # allowed version from ProviderConfig

📚 Documentation

Extensive documentation for the service-provider-crossplane can be found in the docs folder.

Command line options

To get help for available command line options, run:

go run cmd/service-provider-crossplane/main.go help

Service Providers have two main commands: run and init. init is used to initialize the service provider (e.g. install CRDs at Onboarding API). run is used to start the service provider controller manager.

You can get help for each command individually for what command line arguments you can pass in, e.g.:

go run cmd/service-provider-crossplane/main.go init --help
go run cmd/service-provider-crossplane/main.go run --help

🧑‍💻 Development

Building the binary locally

To build the binary locally, you can use the following command:

task build

Build the image locally

To build the image locally, you can use the following command:

task build:img:build

Run unit tests locally

To run the unit tests locally, you can use the following command:

task test

Generating the CRDs, DeepCopy functions etc.

To generate the CRDs, DeepCopy functions, and other boilerplate code, you can use the following command:

task generate

Validate the generated code and formatting

To validate the generated code and formatting, you can use the following command:

task validate

❤️ 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.

🤝 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

"Crossplane" is a registered trademark of the Linux Foundation.

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.


BMWK-EU funding logo

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.

About

Service provider Crossplane manages the lifecycle of Crossplane instances

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

4 watching

Forks

Releases

Packages

Used by

Contributors

Languages