Skip to content

omissis/kube-apiserver-proxy

Repository files navigation

Kubernetes Api Server Proxy

THIS PROJECT IS IN DEVELOPMENT AND IT IS NOT READY FOR PRODUCTION USE

DO NOT CONSIDER IT UNLESS YOU ARE WILLING TO CONTRIBUTE TO IT

GitHub release (latest SemVer) GitHub Workflow Status (with event) License GitHub go.mod Go version GitHub code size in bytes GitHub repo file count (file type) GitHub all releases GitHub commit activity Conventional Commits Codecov Code Climate maintainability Go Report Card

This project is a proxy for the Kubernetes API server.

It is designed to be used in a Kubernetes cluster to allow access to parts of the API server from outside the cluster in a convenient manner for other projects to use.

Contributing

Setting up the environment

In order to start developing, it is recommended to install asdf and direnv. Once those two tools are in place, you should copy the .envrc.dist file to .envrc and the tilt_config.json.dist file to tilt_config.json, they already contain sensible defaults for the development environment. Then, you can run asdf install to install the correct version of the required tools and direnv allow to load them within the context of this folder. Once that is done, you can run make dev-up CLUSTER_VERSION=1.27.1 to startup a Kubernetes cluster for the project: this will spawn a Tilt.dev process, which in turn will start a Kubernetes cluster using kind and deploy ingress-nginx and metrics-server.

In a nutshell:

# Step 1: copy the .envrc.dist and tilt_config.json.dist files
cp .envrc.dist .envrc
cp tilt_config.json.dist tilt_config.json

# Step 2: install asdf and direnv using your favorite package manager

# Step 3: install the asdf dependencies
asdf install

# Step 4: load the asdf dependencies
direnv allow

# Step 5: install the brew dependencies (MacOS only, for other OSes, please install the dependencies manually)
make tools-brew

# Step 6: install the golang dependencies
make tools-go

# Step 7: install npm dependencies
npm install

# Step 8: start the development environment
make dev-up CLUSTER_VERSION=1.27.4

# Step 9: stop the development environment
make dev-down

Development

The project offers a Makefile containing most of the commands you'll need for development. In there, you'll find targets for running several linters and formatters, for building and releasing the project, for starting and stopping the dev environment, for running tests and for generating the code and the graphql schemas. Feel free to explore it to find out more, and don't forget to have a look at the scripts/ folder for more details on the implementation.

Architecture

For more information on the architectural decisions that have been made, refer to the docs/arch/ folder.