The purpose of this repository is to enhance the ease with which a developer can debug and resolve issues in the beta environment.
The approach used in this repository is to start up port-forwarding for all of a given service's dependencies (excepting databases, redis caches, etc...)
You have two approaches for utilizing this repository, and one git branch for each approach:
Branch Name: docker-compose
Using the docker-compose approach allows you to provide a docker-compose file, from which applications will be sourced and all the data needed to start port-forwarding collected. More detail on this approach is given below.
Branch Name: manual
Using the manual approach, you can define each individual application manually, tailored to your needs. This requires more work from the get go, but does allow for more customization.
In order for this to work, you must have a valid ~/.kube/config
file. If you do not have one yet, you can create one like so:
aws eks update-kubeconfig --name {cluster-name} --profile {aws-profile} --region {aws-region}
# For example, to setup your kube config file for beta cloud services, you would do this:
aws eks update-kubeconfig --name beta-cloud-services --profile dev_access --region us-east-1
As mentioned previously, there are two ways to use this service. Each approach allows the following arguments to be provided:
--app(-a)
# Usage: --app my-service-name
# Required: true
# Description: >
# port-forwarding is started for all services upon which the provided app(s) depend.
# The flag may be provided multiple times to start multiple apps, like so:
# -a app-1 -a app-2 OR -a="app-1,app-2"
--omit(-o)
# Usage: --omit app-dependency-name
# Required: false
# Description: >
# port-forwarding is not started for dependencies of app(s) with the provided omit name(s).
# The flag may be provided multiple times to omit multiple dependencies, like so:
# -o dep-1 -o dep-2 OR -o="dep-1,dep-2"
The docker-compose route allows for one more argument:
--file(-f)
# Usage: --file path/to/docker-compose.yml
# Required: false
# Description: >
# Allows the user to specify the path to the docker-compose file that should be used.
# If this flag is not provided, the docker-compose.yml file within the executable's directory is used.
- Checkout the docker-compose branch:
git checkout docker-compose
- Run
go mod tidy
- Run
go build -o forward cmd/forward/*
- Run
./forward --app {service name in docker-compose file} [--omit|--file]
- Checkout the docker-compose branch:
git checkout manual
- Run
go mod tidy
- Run
go build -o forward cmd/forward/*
- Run
./forward --app {service name in docker-compose file} [--omit]