A template for building @crossplane providers.
Go to file
Chuan-Yen Chiang c2fb955118
Merge pull request #129 from jbw976/gomodcache
build: add go.mod.cachedir target
2025-06-22 18:09:45 +03:00
.github Merge pull request #95 from crossplane/renovate/fkirc-skip-duplicate-actions-5.x 2025-05-27 22:39:23 +02:00
apis Commit changes 2025-04-30 22:32:27 +08:00
build@1ed19332b9 * Bump up crossplane-runtime to v1.18.0 2024-12-30 09:41:46 +01:00
cluster Merge pull request #116 from crossplane/renovate/gcr.io-distroless-static 2025-05-27 22:38:24 +02:00
cmd/provider Inject noop logger by default to ctrl-runtime to avoid warnings 2025-05-08 13:56:07 +02:00
examples
hack Update 2025-04-30 22:28:50 +08:00
internal Update templates 2025-04-30 22:01:59 +08:00
package * Bump up crossplane-runtime to v1.19.0 2025-04-19 01:08:58 +08:00
.gitignore
.gitmodules
.golangci.yml Bump up golangci-lint to v2.1.2, and workflow to v7 2025-04-19 02:04:30 +08:00
CODE_OF_CONDUCT.md
DCO
LICENSE
Makefile build: add go.mod.cachedir target 2025-06-04 09:48:05 +02:00
OWNERS.md chore: Update OWNERS.md for new maintainers jbw976 and cychiang 2025-04-21 18:54:55 +02:00
PROVIDER_CHECKLIST.md
README.md
go.mod chore: bump up crossplane-runtime to 1.20.0 2025-05-27 21:21:51 +02:00
go.sum chore: bump up crossplane-runtime to 1.20.0 2025-05-27 21:21:51 +02:00
renovate.json

README.md

provider-template

provider-template is a minimal Crossplane Provider that is meant to be used as a template 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 template 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 following command:
  export provider_name=MyProvider # Camel case, e.g. GitHub
  make provider.prepare provider=${provider_name}
  1. Add your new type by running the following command:
  export group=sample # lower case e.g. core, cache, database, storage, etc.
  export type=MyType # Camel casee.g. Bucket, Database, CacheCluster, etc.
  make provider.addtype provider=${provider_name} 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.

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.