Skip to content

Latest commit

 

History

History
80 lines (54 loc) · 2.67 KB

DEVELOPMENT.md

File metadata and controls

80 lines (54 loc) · 2.67 KB

Developing

Getting started

  1. Create a GitHub account
  2. Setup GitHub access via SSH
  3. Install requirements
  4. Set up a kubernetes cluster
  5. Configure kubectl to use your cluster

Requirements

You must install these tools:

  1. go: The language Pipeline CRD is built in
  2. git: For source control
  3. dep: For managing external Go dependencies.
  4. kubectl: For interacting with your kube cluster (also required for kubebuidler)
  5. kustomize: Required for kubebuilder
  6. kubebuilder: For generating CRD related boilerplate (see docs on iterating with kubebuilder) - Note that the installation instructions default to mac, use the tabs at the top to switch to linux

Iterating

Dependencies

This repo uses dep for dependency management:

  • Update the deps with dep ensure -update
  • dep ensure should be a no-op
  • Add a dep with dep ensure -add $MY_DEP

Changing types

When updating types, you should regenerate any generated code with:

make generate

Then test this by installing and running.

Installing and running

The skeleton for this project was generated using kubebuilder, which created our Makefile. The Makefile will call out to kubectl, so you must configure your kubeconfig to use your cluster.

Then a typical development cycle will look like this:

# Add/update CRDs in your kubernetes cluster
make install

# Run your controller locally, (stop execution with `ctrl-c`)
make run

# In another terminal, deploy tasks
kubectl apply -f config/samples

You will also want to run tests.

Running tests

Run the tests with:

make test

Where's the code?

To make changes to these CRDs, you will probably interact with: