github.com/BuxOrg/bux-kube-controller

Kubernetes controller for your BUX server deployment


Keywords
bitcoin, bitcoinsv, bsv, bux, kubernetes, kubernetes-controller
License
MIT
Install
go get github.com/BuxOrg/bux-kube-controller

Documentation

BUX: Kubernetes Controller

Manage your BUX deployments using Kubernetes

Release Build Status Report Mergify Status Go
Gitpod Ready-to-Code standard-readme compliant Makefile Included Sponsor Donate


Table of Contents


What is BUX?

Read more about BUX


Prerequisites

If you want to use redis, this controller assumed you have installed the redis operator. In addition, if you with to use MongoDB this controller assumes you have installed the mongo community operator.

In addition, if you wish to deploy bux to a domain with SSL, this controller assumes you have installed the nginx ingress controller as well as cert manager.


Installation

bux-kube-controller requires a supported release of Go.

To install the CRDs and deploy the controller to the cluster, run:

make deploy

Run controller locally

To run the controller locally for development, first install the CRDs:

make install

Then run the controller:

make run

Configuration

There is a limited set of configurable spec fields on the Bux CR. Eventually, we will enable the ability to set the entire bux config in the CR, but for now the following list are the available parameters:

Key Type Description
configuration Object Bux configuration settings
domain string Domain to deploy bux to
clusterIssuer string Name of cluster issuer object for SSL certs
console bool Enable bux-console provisioning
Repository Features

This repository was created using MrZ's go-template

Built-in Features

Package Dependencies
Library Deployment

Releases are automatically created when you create a new git tag!

If you want to manually make releases, please install GoReleaser:

goreleaser for easy binary or library deployment to GitHub and can be installed:

  • using make: make install-releaser
  • using brew: brew install goreleaser

The .goreleaser.yml file is used to configure goreleaser.


Automatic Releases on Tag Creation (recommended)

Automatic releases via GitHub Actions from creating a new tag:

make tag version=1.2.3

Manual Releases (optional)

Use make release-snap to create a snapshot version of the release, and finally make release to ship to production (manually).


Makefile Commands

View all makefile commands

make help

List of all current commands:

bench            Run all benchmarks in the Go application
build            Build manager binary.
build-go         Build the Go application (locally)
clean-mods       Remove all the Go mod cache
controller-gen   Download controller-gen locally if necessary.
coverage         Shows the test coverage
deploy           Deploy controller to the K8s cluster specified in ~/.kube/config.
diff             Show the git diff
docker-build     Build docker image with the manager.
docker-push      Push docker image with the manager.
envtest          Download envtest-setup locally if necessary.
fmt              Run go fmt against code.
generate         Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations.
generate         Runs the go generate command in the base of the repo
godocs           Sync the latest tag with GoDocs
install          Install CRDs into the K8s cluster specified in ~/.kube/config.
install-all-contributors  Installs all contributors locally
install-go       Install the application (Using Native Go)
install-releaser  Install the GoReleaser application
kustomize        Download kustomize locally if necessary.
lint             Run the golangci-lint application (install if not found)
manifests        Generate WebhookConfiguration, ClusterRole and CustomResourceDefinition objects.
release          Full production release (creates release in GitHub)
release-snap     Test the full release (build binaries)
release-test     Full production test release (everything except deploy)
replace-version  Replaces the version in HTML/JS (pre-deploy)
run              Run a controller from your host.
tag              Generate a new tag and push (tag version=0.0.0)
tag-remove       Remove a tag if found (tag-remove version=0.0.0)
tag-update       Update an existing tag to current commit (tag-update version=0.0.0)
test             Runs lint and ALL tests
test-ci          Runs all tests via CI (exports coverage)
test-ci-no-race  Runs all tests via CI (no race) (exports coverage)
test-ci-short    Runs unit tests via CI (exports coverage)
test-no-lint     Runs just tests
test-short       Runs vet, lint and tests (excludes integration tests)
test-unit        Runs tests and outputs coverage
undeploy         Undeploy controller from the K8s cluster specified in ~/.kube/config. Call with ignore-not-found=true to ignore resource not found errors during deletion.
uninstall        Uninstall CRDs from the K8s cluster specified in ~/.kube/config. Call with ignore-not-found=true to ignore resource not found errors during deletion.
update           Update all project dependencies
update-contributors  Regenerates the contributors html/list
update-linter    Update the golangci-lint package (macOS only)
update-releaser  Update the goreleaser application
vet              Run go vet against code.

Examples & Tests

All unit tests and examples run via GitHub Actions and uses Go version 1.16.x. View the configuration file.


Run all tests (including integration tests)

make test

Run tests (excluding integration tests)

make test-short

Benchmarks

Run the Go benchmarks:

make bench

Code Standards

Read more about this Go project's code standards.


Usage

Checkout all the examples!


Contributing

View the contributing guidelines and follow the code of conduct.


How can I help?

All kinds of contributions are welcome 🙌! The most basic way to show your support is to star 🌟 the project, or to raise issues 💬. You can also support this project by becoming a sponsor on GitHub 👏 or by making a bitcoin donation to ensure this journey continues indefinitely! 🚀

Stars


Contributors

Thank you to these wonderful people (emoji key):


Dylan

🚇 🚧 💻

Mr. Z

🚇 💻 🚧 🛡️

This project follows the all-contributors specification.


License

License