- Clone the repository.
- Run
make submodulesto initialize the submodules. - Run
make create-secret-yamlto create the secret yaml file. - Fix the configuration of
./examples/providerconfig/secret.yamlmanifest. - Run
make k-apply-requiresto apply the required resources.
- Run
make run-allto run the local DigitalOcean provider.
- Run
make helm-install-crossplaneto install Crossplane.
- Open
config/provider.gofile.- Find
ExternalNameConfigsvariable. - Add new resource terraform resource name to the
ExternalNameConfigsmap. - Find
GetProviderfunction. - Add a new
AddResourceConfiguratorfunction call with the new resource name using- Add the
r.ShortGroupto the resource. - Add (if any) all the
r.Referencesto the resource.
- Add the
- Find
- Run
make generateto generate the new resource configuration. - Run
make k-apply-crdsto apply the new CRDS.
- Add Kubernetes resources under
./tmp/manifestsdirectory. - Run
make k-apply-tmpto apply all the resources under./tmp/manifestsdirectory.
Or to be safe, you call apply all the required resources at once:
k-apply-all
- Create Release Branch or Patch a Release Branch the Release Branch.
- Visit Tag Workflow Action
and click on the
Run workflowbutton. Make sure the "Branch" is set to the release branch, e.g.,release-0.2. Enter the version number in the "Release version" field, e.g.,v0.2.1, and a sensible value for the "Tag message" field. Verify the information and click the "Run workflow" button. - Wait for the Tag Workflow Action to complete.
- Run the CI Workflow Action
by clicking on the "Run workflow" button. Make sure the "Branch" is set to the release branch, e.g.,
release-0.2. - Create a new GitHub Release
at New Release.
Select the tag that was created by the Tag Workflow Action, e.g.,
v0.0.1, and enter the release notes. Make sure the Target branch is set to the release branch, e.g.,release-0.2. Click the "Publish release" button.
Release branches are prefixed with release- followed by the version number, e.g., release-0.2. The version number
should be composed by the major and minor version numbers, e.g., 0.2. The patch version number should never be part
of the release branch name.
Reuse the existing release branch, backport fixes to the existing major/minor branch.
Create or patch the Release Branch from the main branch. You could use visit Branches
and click on the New branch button, or use the following commands:
git checkout -b release-<MAJOR>.<MINOR>
git push origin release-<MAJOR>.<MINOR>To apply a patch to a release branch, you should tag the pull request with the
backport label, eg. Backport release-0.2. The pull request will be merged into
the release branch.
Run code-generation pipeline:
go run cmd/generator/main.go "$PWD"Run against a Kubernetes cluster:
make runBuild, push, and install:
make allBuild binary:
make buildWhen developing locally with IntelliJ IDEA, verify that the following environment variables are set:
TERRAFORM_PROVIDER_SOURCE=<copy values from Makefile>
TERRAFORM_PROVIDER_VERSION=<copy values from Makefile>
TERRAFORM_VERSION=<copy values from Makefile>
UPBOUND_CONTEXT=local