Skip to content
This repository has been archived by the owner on Jun 3, 2024. It is now read-only.

grupoboticario/plat-eng-alquimia-crossplane-provider-sonar

Repository files navigation

provider-sonar

provider-sonar is a minimal Crossplane Provider that is meant to be used as a sonar for implementing new Providers. It comes with the following features that are meant to be refactored:

  • A ProviderConfig type that only points to a credentials Secret.
  • A MyType resource type that serves as an example managed resource.
  • A managed resource controller that reconciles MyType objects and simply prints their configuration in its Observe method.

Developing

  1. Use this repository as a sonar to create a new one.
  2. Run make submodules to initialize the "build" Make submodule we use for CI/CD.
  3. Rename the provider by running the follwing command:
  make provider.prepare provider={PascalProviderName}
  1. Add your new type by running the following command:
make provider.addtype provider={PascalProviderName} group={group} kind={type}
  1. Replace the sample group with your new group in apis/{provider}.go
  2. Replace the mytype type with your new type in internal/controller/{provider}.go
  3. Replace the default controller and ProviderConfig implementations with your own
  4. Run make reviewable to run code generation, linters, and tests.
  5. Run make build to build the provider.

Run locally

  1. kubectl apply -f package/crds
  2. make run

Refer to Crossplane's CONTRIBUTING.md file for more information on how the Crossplane community prefers to work. The Provider Development guide may also be of use.