Issues, whether bugs, tasks, or feature requests are essential for keeping astro great. We believe it should be as easy as possible to contribute changes that get things working in your environment. There are a few guidelines that we need contributors to follow so that we can keep on top of things.
This project adheres to a code of conduct. Please review this document before contributing to this project.
Astro is built using the Kubernetes Go client that makes use of the Kubernetes Api. The project consists of a collection of controllers that watch for Kubernetes object updates, and sends these updates as events to handlers, which interact with the Datadog Api to manage the lifecycle of monitors.
We label issues with the "good first issue" tag if we believe they'll be a good starting point for new contributors. If you're interested in working on an issue, please start a conversation on that issue, and we can help answer any questions as they come up.
- A properly configured Golang environment with Go 1.11 or higher
- Access to a Kubernetes cluster defined in
~/.kube/config
or$KUBECONFIG
.
- Install the project with
go get github.com/fairwindsops/astro
- Change into the astro directory which is installed at
$GOPATH/src/github.com/fairwindsops/astro
- Run the tool with
go run main.go
.
The following commands are all required to pass as part of astro testing:
golint ./...
go fmt ./...
go test -v --bench --benchmem ./pkg/...
We mock the interface for the Datadog API client library in ./pkg/datadog/datadog.go
.
If you're adding a new function to the interface there, you'll need to regenerate the
mocks using
go install github.com/golang/mock/mockgen
mockgen -source=pkg/datadog/datadog.go -destination=pkg/mocks/datadog_mock.go
If you've encountered an issue that is not already reported, please create an issue that contains the following:
- Clear description of the issue
- Steps to reproduce it
- Appropriate labels
Each new pull request should:
- Reference any related issues
- Add tests that show the issues have been solved
- Pass existing tests and linting
- Contain a clear indication of if they're ready for review or a work in progress
- Be up to date and/or rebased on the master branch
The steps are:
- Create a PR for this repo
- Bump the version number in:
- README.md
- Update CHANGELOG.md
- Merge your PR
- Bump the version number in:
- Tag the latest branch for this repo
- Pull the latest for the
master
branch - Run
git tag $VERSION && git push --tags
- Wait for CircleCI to finish the build for the tag, which pushes images to quay.io and creates a release in github
- Pull the latest for the