MCPcopy Index your code
hub / github.com/crossplane/provider-template

github.com/crossplane/provider-template @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
112 symbols 233 edges 23 files 97 documented · 87%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

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. Register your new type into SetupGated function in internal/controller/register.go
  5. Run make reviewable to run code generation, linters, and tests.
  6. 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.

Core symbols most depended-on inside this repo

Setup
called by 1
internal/controller/mytype/mytype.go
Observe
called by 1
internal/controller/mytype/mytype.go
setupNamespacedProviderConfig
called by 1
internal/controller/config/config.go
setupClusterProviderConfig
called by 1
internal/controller/config/config.go
AddToScheme
called by 1
apis/template.go
SetupGated
called by 0
internal/controller/register.go
SetupGated
called by 0
internal/controller/mytype/mytype.go
Connect
called by 0
internal/controller/mytype/mytype.go

Shape

Method 77
Struct 23
Function 12

Languages

Go100%

Modules by API surface

apis/v1alpha1/zz_generated.deepcopy.go30 symbols
apis/sample/v1alpha1/zz_generated.deepcopy.go14 symbols
internal/controller/mytype/mytype.go11 symbols
apis/v1alpha1/types.go11 symbols
apis/v1alpha1/zz_generated.pcu.go8 symbols
apis/v1alpha1/zz_generated.pc.go8 symbols
apis/sample/v1alpha1/zz_generated.managed.go8 symbols
apis/sample/v1alpha1/mytype_types.go7 symbols
internal/controller/mytype/mytype_test.go4 symbols
internal/controller/config/config.go3 symbols
apis/v1alpha1/zz_generated.pculist.go2 symbols
apis/template.go2 symbols

For agents

$ claude mcp add provider-template \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact