Skip to content

Latest commit

 

History

History
68 lines (44 loc) · 1.47 KB

developer-guide.md

File metadata and controls

68 lines (44 loc) · 1.47 KB

Developer guide

Setup

  • Get set up with golang 1.21

  • clone this repo

     git clone git@github.com:mattfenwick/cyclonus.git
     cd cyclonus
    
  • set up a KinD cluster with a CNI that supports network policies

     pushd hack/kind/calico
       ./setup-kind.sh
     popd
    
  • run cyclonus

     go run cmd/cyclonus/main.go generate --mock --perturbation-wait-seconds 0
    
  • run format, vet, tests

     make fmt
     make vet
     make test
    

How to upgrade k8s library version

  1. go to a kubernetes repo
  2. look at the tag versions
  3. choose the latest release version
  4. update the k8s.io library versions in go.mod

How to Release Binaries

See goreleaser's requirements here.

Get a GitHub Personal Access Token and add the repo scope. Set GITHUB_TOKEN to this value:

export GITHUB_TOKEN=...

See here for more information on github tokens.

Choose a tag/release name, create and push a tag:

TAG=v0.0.1

git tag $TAG
git push origin $TAG

You'll need to be logged in to dockerhub from the command line, in order to push images: docker login

Cut a release:

goreleaser release --rm-dist

Make a test release:

goreleaser release --snapshot --rm-dist