Skip to content

Commit

Permalink
Add Kubernetes section to the CONTRIBUTING.md
Browse files Browse the repository at this point in the history
Signed-off-by: MOZGIII <mike-n@narod.ru>
  • Loading branch information
MOZGIII committed Jun 15, 2020
1 parent 9529df2 commit c0f2131
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ expanding into more specifics.
1. [Tips and Tricks](#tips-and-tricks)
1. [Benchmarking](#benchmarking)
1. [Profiling](#profiling)
1. [Kubernetes](#kubernetes)
1. [Humans](#humans)
1. [Documentation](#documentation)
1. [Changelog](#changelog)
Expand Down Expand Up @@ -585,6 +586,43 @@ cat stacks.folded | inferno-flamegraph > flamegraph.svg
And that's it! You now have a flamegraph SVG file that can be opened and
navigated in your favorite web browser.

### Kubernetes

There is a special flow for when you develop portions of Vector that are
designed to work with Kubernetes, like `kubernetes_logs` source or the
`deployment/kubernetes/*.yaml` configs.

This flow facilitates building Vector and deploying it into a cluster.

There are some extra requirements:

- `linux` system (create an issue if you want to work with another OS and we'll
help);
- [`skaffold`](https://skaffold.dev/)
- [`kustomize`](https://kustomize.io/)
- [`minikube`](https://minikube.sigs.k8s.io/)-powered or other k8s cluster

Once you have the requirements, use the `scripts/skaffold.sh dev` command.

It will

1. build the `vector` binary in development mode,
2. build a docker image from this binary via `skaffold/docker/Dockerfile`,
3. deploy `vector` into the Kubernetes cluster at your current kubectl context
using the built docker image and a mix of our production deployment
configuration from the `distribution/kubernetes/*.yaml` and the special
dev-flow configuration at `skaffold/manifests/*.yaml`.

As the result of invoking the `scripts/skaffold.sh dev`, you should see
a `skaffold` process running on your local machine, printing the logs from the
deployed `vector` instance.

To stop the process, press `Ctrl+C`, and wait for `skaffold` to clean up
the cluster state and exit.

`scripts/skaffold.sh` wraps `skaffold`, you can use other `skaffold` subcommands
if it fits you better.

## Humans

After making your change, you'll want to prepare it for Vector's users
Expand Down

0 comments on commit c0f2131

Please sign in to comment.