Contributing to Azure Service Operator v2

How to contribute new resources to Azure Service Operator v2

Directory structure of the operator

Key folders of note include:

  • api contains all of our supported resources. Much (most!) of this code is generated, but handwritten code is added at various extension points for flexibility.
  • pkg contains the package genruntime which is provides infrastructure for our generated resources.
  • internal contains packages used by our generic controller.

Overview

The size of each dot reflects the size of the file; the legend in the corner shows the meaning of colour.

Submitting a pull request

Pull requests opened from forks of the azure-service-operator repository will initially have a skipped Validate Pull Request / integration-tests check which will prevent merging even if all other checks pass. Once a maintainer has looked at your PR and determined it is ready they will comment /ok-to-test sha=<sha> to kick off an integration test pass. If this check passes along with the other checks the PR can be merged.

Common problems and their solutions

Error loading schema from root

Full error:

error loading schema from root … open /azure-service-operator/v2/specs/azure-resource-manager-schemas/schemas/2019-04-01/deploymentTemplate.json no such file or directory

This git repo contains submodules. This error occurs when the submodules are missing, possibly because the repo was not cloned with --recurse-submodules.

To resolve this problem, run git submodule init and git submodule update and then try building again.