UNCLASSIFIED - NO CUI

Skip to content
Snippets Groups Projects
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
After you've reviewed these contribution guidelines, you'll be all set to contribute to this project.
CONTRIBUTING.md 11.82 KiB

Contributing to Big Bang

Thanks for taking the time to contribute to BigBang!

Table of Contents:

Developers Guide

Big Bang is designed in such a way as to be as easily deployed locally as it is in production. In fact, most contributions begin locally.

Local Git Setup

Pre-commit hooks

We would require developers to leverage conventional commits when contributing.

In order to help enforce this we are leveraging client-side pre-commit hooks.

This is done using the following tools:

Local Setup

Prereqs
Steps

After cloning this git repo run the following command:

npm install --only=dev

This will download husky and commitlint to your local repo and modify your .git/hooks to allow husky to run pre-commit hooks. Once installed it will enforce the usage of convential-commits.

Combining Multiple Commits

If you have pushed commits that do not conform to the conventional-commit guide lines, you can combine all of the incorrectly formatted commit messages by using git rebase.

A more expansive guide of how this is done can be found here.

Here is a quick tip to squash all commits for a branch named test:

git checkout test
git reset $(git merge-base master $(git rev-parse --abbrev-ref HEAD))
git add -A
git commit -m "feat: example conventional commit"
git push --force

Iron Bank Images

Per the charter, all Big Bang packages will leverage container images from IronBank. In order to pull these images, ImagePullSecrets must be provided to BigBang. To obtain access to these images, follow the guides below. These steps should NOT be used for production since the API keys for a user are only valid when the user is logged into Registry1

  1. Register for a free Ironbank account Here
  2. Log into the Iron Bank Registry, in the top right click your Username and then User Profile to get access to your CLI secret/API keys.
  3. When installing BigBang, set the Helm Values registryCredentials.username and registryCredentials.password to match your Registry1 username and API token

Local Kubernetes cluster

Follow the steps below to get a local Kubernetes cluster for Big Bang using k3d.

# Create a local k3d cluster with the appropriate port forwards
k3d cluster create --k3s-server-arg "--disable=traefik" --k3s-server-arg "--disable=metrics-server" -p 80:80@loadbalancer -p 443:443@loadbalancer

Deploying Big Bang (Quick Start)

For development, it is quicker to test changes without having to push to Git. To do this, we can bypass Flux2 and deploy Big Bang directly with its Helm chart.

Start by creating myvalues.yaml to configure your local Big Bang. Big Bang's template repository contains a starter development values.yaml.

Configure myvalues.yaml to suit your needs.

# Deploy the latest fluxv2 with Iron Bank images
# For development, you can use flux from the internet using 'flux install`
# Be aware, the internet version is likely newer than the Iron Bank version
./hack/flux-install.sh

# Apply a local version of the umbrella chart
# NOTE: This is the alternative to deploying a HelmRelease and having flux manage it, we use a local copy to avoid having to commit every change
helm upgrade -i bigbang chart -n bigbang --create-namespace -f myvalues.yaml

# A convenience development script is provided to force fluxv2 to reconcile all helmreleases within the cluster insteading of waiting for the next polling interval.
hack/sync.sh

For more extensive development, use the Development Guide.

Testing Big Bang Development Changes

Development changes should be tested using a full GitOps environment. The Big Bang environment template should be replicated, either on a branch or new repository, to start your deployment. Follow the instructions in the template's readme and in the Big Bang docs for configuration.

Follow the Big Bang documentation for testing a full deployment of Big Bang.

DNS