Skip to content

How to contribute to Spinnaker Operator

German Muzquiz edited this page Sep 25, 2019 · 3 revisions

We welcome all contributions that make deploying Spinnaker with the operator easier and more fully featured. If your change is a bug fix, just submit a pull request. To propose a deeper change, feel free to open an issue to discuss its impact. In any case, don’t forget to tag contributors.

Setting up your development environment

You’ll need the following to set up your environment:

  • Golang (1.12+)
  • Operator-sdk (0.8.0+ - optional): Used to invoke code generation tools)
  • Delve (optional) to debug
  • A Kubernetes cluster (optional) to try out the operator

Types of contributions

We’re currently focusing on these areas:

  • Bug fixes
  • Templatizing the operator itself as well as Spinnaker configuration (Kustomize, Helm)
  • Validations

Usually, to add functionality to the operator, you add new modifications to the manifest files that deploy Spinnaker.

There are four main extension points that allow for adding functionality:

  • SpinnakerService struct
  • ChangeDetector interface
  • Transformer interface
  • SpinnakerValidator interface

SpinnakerService SpinnakerService CRD can be modified by changing the corresponding go code in spinnakerservice_types.go. After doing that, make generate needs to be run to auto generate the manifest definition and update all auto generated code.

ChangeDetector This is used to add new criteria for comparing the desired Spinnaker state to the current status and actual running services.

Transformer Before Spinnaker configurations are processed by Halyard, the Transformer can modify them on the fly. It is also used to modify service manifests generated by Halyard before they are applied.

SpinnakerValidator Before being accepted by Kubernetes, config must be validated by the SpinnakerValidator. This is where checks like account preflight checks, connectivity, … can be added.