sigsci-module-envoy
Originally the envoy module was baked into the sigsci-agent codebase.
It was moved here so that it is easier to version, document, and experiment with alternate means such as Wasm filters.
It's now module dependency for the sigsci-agent.
Versioning and Vendoring into the Sigsci-Agent
Run make upgrade-module-golang and confirm the module-golang versions in (go.mod and go.sum) are in sync with those found in sigsci-agent.
Edit VERSION, update the CHANGELOG.md and commit along with any associated changes. Create a newly tagged release via the github UI.
After a newly tagged version of sigsci-module-envoy is available, run the following make target within the agent codebase, make upgrade-envoy, to vendor the changes into the sigsci-agent repo.
Unit Testing
Run make test
Module Testing
Run make module-testing
Development Integration
Make the following edits in the sigsci-agent repo to point locally to the sigsci-module-envoy directory.
diff --git a/go.mod b/go.mod
index 80ec4d16..3aeef2fc 100644
--- a/go.mod
+++ b/go.mod
@@ -59,3 +59,7 @@ require (
)
replace github.com/vulcand/oxy => github.com/signalsciences/oxy v1.1.0-sigsci
+
+replace github.com/signalsciences/sigsci-module-envoy => /Users/<path_to_src>/sigsci-module-envoy
Now run make upgrade-envoy in the sigsci-agent repo to pull in the latest envoy changes to build the agent with.
Istio
For testing Istio configurations see the Istio lab README for info.
Github workflows
If you want to test in github actions with a branch in module-testing you can use the following yaml to replace what's in test.yml. You will need to create a private access token and add that as a secret to the envoy github repo. The token will need read access to Metadata and read and write access to the contents of the Repository. The token name should match the value in the github actions, i.e. REPO_PAT in this case.
name: Test sigsci-module-envoy
on:
push:
pull_request:
permissions:
id-token: write
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
with:
fetch-depth: 100
path: go/src/github.com/signalsciences/sigsci-module-envoy
token: ${{ secrets.REPO_PAT }}
- name: Checkout module-testing
uses: actions/checkout@v1
with:
fetch-depth: 0
path: go/src/github.com/signalsciences/module-testing
ref: ci-fixes
repository: signalsciences/module-testing
token: ${{ secrets.REPO_PAT }}
- uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::669843297275:role/gh-actions-sigsci-module-envoy
role-session-name: build-sigsci-module-envoy
aws-region: us-west-2
- name: Install Docker Compose
run: |
sudo apt-get update && sudo apt-get install docker-compose -y
- name: Login to AWS ECR
env:
PROD_ID: ${{ secrets.SIGSCI_PROD_CANONICAL_ID }}
run: |
aws ecr get-login-password --region us-west-2 | docker login --username AWS --password-stdin 803688608479.dkr.ecr.us-west-2.amazonaws.com
- name: Build module-testing
run: cd ../module-testing && make docker-build
- name: Run module tests
working-directory: ./module_testing
run: ./test.sh