Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into yuval-k/dev-doc
Browse files Browse the repository at this point in the history
  • Loading branch information
yuval-k committed Mar 8, 2025
2 parents 262c3a1 + 07c0dfc commit 3495db3
Show file tree
Hide file tree
Showing 54 changed files with 3,038 additions and 1,218 deletions.
42 changes: 34 additions & 8 deletions .github/actions/prep-go-runner/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,45 @@ runs:
run: |
echo "Before clearing disk space:"
df -h
docker system df -v
# https://github.com/actions/virtual-environments/issues/709
sudo apt-get clean
# https://github.com/actions/runner-images/discussions/3242 github runners are bad at cleanup
echo "Removing large packages"
sudo apt-get remove -y '^dotnet-.*' || true
sudo apt-get remove -y '^llvm-.*' || true
sudo apt-get remove -y 'php.*' || true
sudo apt-get remove -y '^mongodb-.*' || true
sudo apt-get remove -y '^mysql-.*' || true
sudo apt-get remove -y azure-cli google-chrome-stable firefox powershell mono-devel libgl1-mesa-dri || true
sudo apt-get autoremove -y || true
sudo apt-get clean -y || true
echo "Done removing large packages"
# Clean up pre-installed tools
# https://github.com/actions/virtual-environments/issues/1918
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf /usr/local/share/boost
sudo rm -rf $AGENT_TOOLSDIRECTORY
sudo rm -rf /usr/local/lib/android || true
sudo rm -rf /usr/share/dotnet || true
sudo rm -rf /usr/local/graalvm || true
sudo rm -rf /opt/ghc || true
sudo rm -rf /usr/local/.ghcup || true
sudo rm -rf /usr/local/share/boost || true
sudo rm -rf /usr/local/share/powershell || true
sudo rm -rf /usr/local/share/chromium || true
sudo rm -rf $AGENT_TOOLSDIRECTORY || true
# Clean up images
docker image rm node:16 || true
docker image rm node:16-alpine || true
docker image rm node:18 || true
docker image rm node:18-alpine || true
docker image rm node:20 || true
docker image rm node:20-alpine || true
# remove the dangling images and containers
docker images | tail -n +2 | awk '$1 == "<none>" {print $3}' | xargs --no-run-if-empty docker rmi
docker ps -a | tail -n +2 | awk '$2 ~ "^[0-9a-f]+$" {print $1}' | xargs --no-run-if-empty docker rm --volumes=true
echo "After clearing disk space:"
df -h
docker system df -v
- name: Set up Go
id: setup-go
uses: actions/setup-go@v5
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/pr-kubernetes-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ jobs:
- cluster-name: 'cluster-one'
go-test-args: '-v -timeout=25m'
go-test-run-regex: '^TestKgateway$$/^BasicRouting$$|^TestKgateway$$/^Deployer$$|^TestKgateway$$/^HTTPRouteServices$$|^TestKgateway$$/^TCPRouteServices$$|^TestKgateway$$/^TLSRouteServices$$|^TestKgateway$$/^Backends$$'
# Mar 4, 2025: TODO minutes
- cluster-name: 'cluster-two'
go-test-args: '-v -timeout=25m'
go-test-run-regex: '^TestKgateway$$/^Transformation$$'


# # Dec 4, 2024: 23 minutes
# - cluster-name: 'cluster-two'
Expand Down
19 changes: 8 additions & 11 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set the release related variables
id: set_vars
run: |
Expand Down Expand Up @@ -79,6 +78,9 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Prep Go Runner
uses: ./.github/actions/prep-go-runner

- name: Helm login to ${{ env.IMAGE_REGISTRY }}
if: ${{ github.event_name != 'pull_request' }}
run: echo "${{ secrets.GITHUB_TOKEN }}" | helm registry login ${{ env.IMAGE_REGISTRY }} -u ${{ github.repository_owner }} --password-stdin
Expand All @@ -105,11 +107,8 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-go@v5
with:
go-version-file: "go.mod"
cache: true
- name: Prep Go Runner
uses: ./.github/actions/prep-go-runner

# We publish a rolling main release for every commit to main. Deleting the release
# ensures that the tagged commit is not stale. Goreleaser will create a new tag
Expand Down Expand Up @@ -151,10 +150,8 @@ jobs:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4

- uses: actions/setup-go@v5
with:
go-version-file: "go.mod"
- name: Prep Go Runner
uses: ./.github/actions/prep-go-runner

- name: Login to ghcr.io
if: ${{ github.event_name != 'pull_request' }}
Expand All @@ -173,7 +170,7 @@ jobs:
- name: Install the released chart
run: |
helm install --create-namespace --namespace kgateway-system kgateway \
oci://${{ env.IMAGE_REGISTRY }}/kgateway-dev/charts/kgateway \
oci://${{ env.IMAGE_REGISTRY }}/charts/kgateway \
--set image.registry=${{ env.IMAGE_REGISTRY }} \
--version ${{ needs.setup.outputs.version }} \
--wait --timeout 5m
Expand Down
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,10 @@ istio-*/*
.bin/
# Added by goreleaser init:
dist/

*.o
*.d
*-build


internal/envoyinit/rustformations/target/*
4 changes: 4 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,10 @@ dockers:
- "--build-arg=GOARCH=arm64"
- "--build-arg=ENTRYPOINT_SCRIPT=/internal/envoyinit/cmd/docker-entrypoint.sh"
- "--build-arg=ENVOY_IMAGE={{ .Env.ENVOY_IMAGE }}"
- "--build-arg=RUSTFORMATIONS_DIR=/internal/envoyinit/rustformations"
extra_files:
- internal/envoyinit/cmd/docker-entrypoint.sh
- internal/envoyinit/rustformations
- image_templates:
- &envoyinit_amd_image "{{ .Env.IMAGE_REGISTRY }}/{{ .Env.ENVOYINIT_IMAGE_REPO }}:{{ .Env.VERSION }}-amd64"
use: buildx
Expand All @@ -121,8 +123,10 @@ dockers:
- "--build-arg=GOARCH=amd64"
- "--build-arg=ENTRYPOINT_SCRIPT=/internal/envoyinit/cmd/docker-entrypoint.sh"
- "--build-arg=ENVOY_IMAGE={{ .Env.ENVOY_IMAGE }}"
- "--build-arg=RUSTFORMATIONS_DIR=/internal/envoyinit/rustformations"
extra_files:
- internal/envoyinit/cmd/docker-entrypoint.sh
- internal/envoyinit/rustformations
docker_manifests:
- name_template: "{{ .Env.IMAGE_REGISTRY }}/{{ .Env.CONTROLLER_IMAGE_REPO }}:{{ .Env.VERSION }}"
image_templates:
Expand Down
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ envoyversion: ENVOY_VERSION_TAG ?= $(shell echo $(ENVOY_IMAGE) | cut -d':' -f2)
envoyversion:
echo "Version is $(ENVOY_VERSION_TAG)"
echo "Commit for envoyproxy is $(shell curl -s https://raw.githubusercontent.com/solo-io/envoy-gloo/refs/tags/v$(ENVOY_VERSION_TAG)/bazel/repository_locations.bzl | grep "envoy =" -A 4 | grep commit | cut -d'"' -f2)"
echo "Current ABI in envoyinit can be found in the cargo.toml's envoy-proxy-dynamic-modules-rust-sdk"
#----------------------------------------------------------------------------------
# Ginkgo Tests
#----------------------------------------------------------------------------------
Expand Down Expand Up @@ -312,7 +313,10 @@ generated-code: update-licenses
generated-code: fmt

.PHONY: go-generate-all
go-generate-all: ## Run all go generate directives in the repo, including codegen for protos, mockgen, and more
go-generate-all: go-generate-apis go-generate-mocks

.PHONY: go-generate-apis
go-generate-apis: ## Run all go generate directives in the repo, including codegen for protos, mockgen, and more
GO111MODULE=on go generate ./hack/...

.PHONY: go-generate-mocks
Expand Down Expand Up @@ -459,6 +463,7 @@ envoyinit: $(ENVOYINIT_OUTPUT_DIR)/envoyinit-linux-$(GOARCH)

# TODO(nfuden) cheat the process for now with -r but try to find a cleaner method
$(ENVOYINIT_OUTPUT_DIR)/Dockerfile.envoyinit: internal/envoyinit/Dockerfile.envoyinit
cp -r ${ENVOYINIT_DIR}/rustformations $(ENVOYINIT_OUTPUT_DIR)
cp $< $@

$(ENVOYINIT_OUTPUT_DIR)/docker-entrypoint.sh: internal/envoyinit/cmd/docker-entrypoint.sh
Expand Down
36 changes: 36 additions & 0 deletions api/applyconfiguration/api/v1alpha1/bodytransformation.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

38 changes: 38 additions & 0 deletions api/applyconfiguration/api/v1alpha1/headertransformation.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 12 additions & 3 deletions api/applyconfiguration/api/v1alpha1/routepolicyspec.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

62 changes: 62 additions & 0 deletions api/applyconfiguration/api/v1alpha1/transform.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 32 additions & 0 deletions api/applyconfiguration/api/v1alpha1/transformationpolicy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 3495db3

Please sign in to comment.