Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to Istio 1.19.0 and implement Gateway API support #717

Open
wants to merge 55 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
a0b1392
feat: Upgrade istio to 1.18 and envoy to 1.26
CH3CHO Aug 27, 2023
b9aba7f
Move submodules to the external folder
CH3CHO Sep 22, 2023
689e1e7
Update code files for new istio and envoy versions
CH3CHO Sep 19, 2023
a7fbbe6
Remove unnecessary replace statements in go.mod
CH3CHO Sep 23, 2023
dacf0bb
Run "go mod tidy"
CH3CHO Sep 23, 2023
9564c11
Fix panics after starting up
CH3CHO Sep 24, 2023
9d08ee8
Fix the MCP cache syncing issue
CH3CHO Sep 24, 2023
da45f4e
Update to istio 1.19.0 and envoy 1.27.0
CH3CHO Sep 24, 2023
42720d7
Run "go mod tidy"
CH3CHO Sep 24, 2023
dfaec59
Fix compilation errors
CH3CHO Sep 25, 2023
d9a1f40
Fix unit tests
CH3CHO Sep 25, 2023
b5d8947
fix: Add back URI rewrite support via regex
CH3CHO Oct 12, 2023
69586f1
Merge remote-tracking branch 'upstream/main' into feat/istio-1.19.0
CH3CHO Oct 12, 2023
9fae3a4
fix: Re-generate files from wasm.proto
CH3CHO Oct 12, 2023
e777294
Merge remote-tracking branch 'origin/main' into feat/istio-1.19.0
CH3CHO Oct 26, 2023
82b60c6
fix: Fix image building targets
CH3CHO Oct 27, 2023
12d9dc8
Move submodules to its respective folders
CH3CHO Oct 27, 2023
e63997d
Fix local image building targets
CH3CHO Oct 27, 2023
df8c814
Switch to Higress tagged build tools to improve image loading speed
CH3CHO Oct 31, 2023
a28f76d
Save the built envoy.tar.gz file in external/proxy/out folder
CH3CHO Oct 31, 2023
4c29550
fix: Use patches to normalize envoy building process
CH3CHO Nov 2, 2023
be77c59
Merge remote-tracking branch 'upstream/main' into feat/istio-1.19.0
CH3CHO Dec 7, 2023
672174f
Fix some compilation errors introduced by merging
CH3CHO Dec 7, 2023
11c612f
fix: Fix envoy building process
CH3CHO Nov 4, 2023
5a808ec
Fix more compilation errors introduced by merging
CH3CHO Dec 8, 2023
6d48138
feat: Support Gateway API with Istio Gateway Controller
CH3CHO Nov 11, 2023
32800f6
Migrate istio gateway controller code files
CH3CHO Dec 9, 2023
a592112
Update Istio codebase for Higress
CH3CHO Dec 9, 2023
5d3190a
feat: Update data plane service matching logic
CH3CHO Dec 16, 2023
e94aa35
feat: Support keeping labels and annotations by converting Gateway co…
CH3CHO Dec 16, 2023
e53a418
Fix "The sharedIndexInformer has started, run more than once is not a…
CH3CHO Dec 9, 2023
e2ff6ce
Update the base image used when building pilot and gateway images
CH3CHO Dec 10, 2023
c776175
Merge remote-tracking branch 'upstream/main' into feat/istio-1.19.0
CH3CHO Dec 20, 2023
909a735
Fix an outdated build script
CH3CHO Dec 20, 2023
85a4ad7
fix: License issues
CH3CHO Dec 26, 2023
6477f6c
fix: Unit test errors
CH3CHO Dec 26, 2023
4faa86b
fix: Fix errors occurred when building hgctl (#761)
CH3CHO Jan 7, 2024
9bd34ec
Merge remote-tracking branch 'upstream/main' into feat/istio-1.19.0
CH3CHO Jan 7, 2024
0ba8cd2
Fix go module dependencies
CH3CHO Jan 7, 2024
89fe086
Execute GitLab actions with Go 1.21.5
CH3CHO Jan 8, 2024
d19c59f
Update envoy version
CH3CHO Jan 16, 2024
f6f4e81
Downgrade to go 1.20
CH3CHO Jan 23, 2024
c13728e
Move hgctl into a sub-module
CH3CHO Jan 23, 2024
d97854a
Remove redundant replaces
CH3CHO Jan 23, 2024
e29820f
Merge remote-tracking branch 'upstream/main' into feat/istio-1.19.0
CH3CHO Jan 23, 2024
0d93813
support multi-arch building (#748)
rinfx Jan 31, 2024
cba2218
Apply 20231104-gatewayapi-catchall.patch
CH3CHO Jan 23, 2024
9cda5e3
Integrate 20230925-gateway-httproute.patch
CH3CHO Feb 1, 2024
e327cd9
Merge remote-tracking branch 'upstream/main' into feat/istio-1.19.0
CH3CHO Feb 1, 2024
1aaeb85
Fix some compilation errors
CH3CHO Feb 2, 2024
12a1c74
Uncomment the entry of Higress CRD controllers
CH3CHO Feb 2, 2024
3e5d3c9
Merge remote-tracking branch 'upstream/main' into feat/istio-1.19.0
CH3CHO Mar 9, 2024
ee3ee63
Fix a compilation error
CH3CHO Mar 9, 2024
8009db3
Exclude hgctl manifest and testdata from license check
CH3CHO Mar 9, 2024
c93c565
feat: Support collecting gateway access logs with Promtail (#846)
CH3CHO Apr 23, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
10 changes: 5 additions & 5 deletions .github/workflows/build-and-test-plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.19
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.21.5
# There are too many lint errors in current code bases
# uncomment when we decide what lint should be addressed or ignored.
# - run: make lint
Expand All @@ -46,7 +46,7 @@ jobs:
- name: "Setup Go"
uses: actions/setup-go@v3
with:
go-version: 1.19
go-version: 1.21.5

- name: Setup Golang Caches
uses: actions/cache@v3
Expand Down
20 changes: 9 additions & 11 deletions .github/workflows/build-and-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.19
go-version: 1.21.5
# There are too many lint errors in current code bases
# uncomment when we decide what lint should be addressed or ignored.
# - run: make lint
Expand All @@ -23,14 +23,10 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Setup Golang Caches
uses: actions/cache@v3
- name: "Setup Go"
uses: actions/setup-go@v3
with:
path: |-
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ github.run_id }}
restore-keys: ${{ runner.os }}-go
go-version: 1.21.5

- name: Setup Submodule Caches
uses: actions/cache@v3
Expand All @@ -44,7 +40,9 @@ jobs:

# test
- name: Run Coverage Tests
run: GOPROXY="https://proxy.golang.org,direct" make go.test.coverage
run: |-
go version
GOPROXY="https://proxy.golang.org,direct" make go.test.coverage
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
Expand All @@ -65,7 +63,7 @@ jobs:
- name: "Setup Go"
uses: actions/setup-go@v3
with:
go-version: 1.19
go-version: 1.21.5

- name: Setup Golang Caches
uses: actions/cache@v3
Expand Down Expand Up @@ -110,7 +108,7 @@ jobs:
- name: "Setup Go"
uses: actions/setup-go@v3
with:
go-version: 1.19
go-version: 1.21.5

- name: Setup Golang Caches
uses: actions/cache@v3
Expand Down
28 changes: 25 additions & 3 deletions .github/workflows/build-image-and-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
- name: "Setup Go"
uses: actions/setup-go@v3
with:
go-version: 1.19
go-version: 1.21.5

- name: Setup Golang Caches
uses: actions/cache@v3
Expand Down Expand Up @@ -109,7 +109,7 @@ jobs:
- name: "Setup Go"
uses: actions/setup-go@v3
with:
go-version: 1.19
go-version: 1.21.5

- name: Setup Golang Caches
uses: actions/cache@v3
Expand All @@ -130,6 +130,17 @@ jobs:
key: ${{ runner.os }}-submodules-${{ github.run_id }}
restore-keys: ${{ runner.os }}-submodules-new

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Cache Docker layers
uses: actions/cache@v2
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-

- name: Calculate Docker metadata
id: docker-meta
uses: docker/metadata-action@v4
Expand Down Expand Up @@ -186,7 +197,7 @@ jobs:
- name: "Setup Go"
uses: actions/setup-go@v3
with:
go-version: 1.19
go-version: 1.21.5

- name: Setup Golang Caches
uses: actions/cache@v3
Expand All @@ -207,6 +218,17 @@ jobs:
key: ${{ runner.os }}-submodules-${{ github.run_id }}
restore-keys: ${{ runner.os }}-submodules-new

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Cache Docker layers
uses: actions/cache@v2
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-

- name: Calculate Docker metadata
id: docker-meta
uses: docker/metadata-action@v4
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
external
out
*.out
*.tgz
Expand All @@ -11,6 +10,7 @@ bazel-bin
bazel-out
bazel-testlogs
bazel-wasm-cpp
external/
tools/bin/
helm/**/charts/**.tgz
target/
Expand Down
43 changes: 22 additions & 21 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
[submodule "istio/1.12/api"]
path = istio/1.12/api
url = https://github.com/istio/api
[submodule "istio/1.12/istio"]
path = istio/1.12/istio
url = https://github.com/istio/istio
[submodule "istio/1.12/client-go"]
path = istio/1.12/client-go
url = https://github.com/istio/client-go
[submodule "istio/1.12/pkg"]
path = istio/1.12/pkg
url = https://github.com/istio/pkg
[submodule "istio/1.12/proxy"]
path = istio/1.12/proxy
url = https://github.com/istio/proxy
[submodule "envoy/1.20/go-control-plane"]
path = envoy/1.20/go-control-plane
url = https://github.com/envoyproxy/go-control-plane
[submodule "envoy/1.20/envoy"]
path = envoy/1.20/envoy
url = https://github.com/envoyproxy/envoy
[submodule "istio/api"]
path = istio/api
url = https://github.com/higress-group/api
[submodule "istio/istio"]
path = istio/istio
url = https://github.com/higress-group/istio
branch = dev-1.19.5
[submodule "istio/client-go"]
path = istio/client-go
url = https://github.com/higress-group/client-go
[submodule "istio/pkg"]
path = istio/pkg
url = https://github.com/higress-group/pkg
[submodule "istio/proxy"]
path = istio/proxy
url = https://github.com/higress-group/proxy
[submodule "envoy/go-control-plane"]
path = envoy/go-control-plane
url = https://github.com/higress-group/go-control-plane
[submodule "envoy/envoy"]
path = envoy/envoy
url = https://github.com/higress-group/envoy
4 changes: 2 additions & 2 deletions .licenserc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ header:
- 'tools/'
- 'test/README.md'
- 'test/README_CN.md'
- 'cmd/hgctl/config/testdata/config'
- 'pkg/cmd/hgctl/manifests'
- 'hgctl/cmd/hgctl/config/testdata/config'
- 'hgctl/pkg/manifests'

comment: on-failure
dependency:
Expand Down
58 changes: 29 additions & 29 deletions Makefile.core.mk
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
SHELL := /bin/bash -o pipefail

export BASE_VERSION ?= 2022-10-27T19-02-22
export HIGRESS_BASE_VERSION ?= 2023-07-20T20-50-43

export HUB ?= higress-registry.cn-hangzhou.cr.aliyuncs.com/higress

export CHARTS ?= higress-registry.cn-hangzhou.cr.aliyuncs.com/charts

VERSION_PACKAGE := github.com/alibaba/higress/pkg/cmd/version
VERSION_PACKAGE := github.com/alibaba/higress/pkg/cmd/lversion

GIT_COMMIT:=$(shell git rev-parse HEAD)

Expand Down Expand Up @@ -45,13 +45,15 @@ HIGRESS_DOCKER_BUILD_TOP:=${OUT_LINUX}/docker_build

HIGRESS_BINARIES:=./cmd/higress

HGCTL_PROJECT_DIR=./hgctl
HGCTL_BINARIES:=./cmd/hgctl

$(OUT):
@mkdir -p $@

submodule:
git submodule update --init
git submodule update --remote istio/istio

.PHONY: prebuild
prebuild: submodule
Expand Down Expand Up @@ -80,20 +82,20 @@ $(ARM64_OUT_LINUX)/higress:

.PHONY: build-hgctl
build-hgctl: prebuild $(OUT)
GOPROXY=$(GOPROXY) GOOS=$(GOOS_LOCAL) GOARCH=$(GOARCH_LOCAL) LDFLAGS=$(RELEASE_LDFLAGS) tools/hack/gobuild.sh $(OUT)/ $(HGCTL_BINARIES)
GOPROXY=$(GOPROXY) GOOS=$(GOOS_LOCAL) GOARCH=$(GOARCH_LOCAL) LDFLAGS=$(RELEASE_LDFLAGS) PROJECT_DIR="$(HGCTL_PROJECT_DIR)" tools/hack/gobuild.sh $(OUT)/ $(HGCTL_BINARIES)

.PHONY: build-linux-hgctl
build-linux-hgctl: prebuild $(OUT)
GOPROXY=$(GOPROXY) GOOS=linux GOARCH=$(GOARCH_LOCAL) LDFLAGS=$(RELEASE_LDFLAGS) tools/hack/gobuild.sh $(OUT_LINUX)/ $(HGCTL_BINARIES)
GOPROXY=$(GOPROXY) GOOS=linux GOARCH=$(GOARCH_LOCAL) LDFLAGS=$(RELEASE_LDFLAGS) PROJECT_DIR="$(HGCTL_PROJECT_DIR)" tools/hack/gobuild.sh $(OUT_LINUX)/ $(HGCTL_BINARIES)

.PHONY: build-hgctl-multiarch
build-hgctl-multiarch: prebuild $(OUT)
GOPROXY=$(GOPROXY) GOOS=linux GOARCH=amd64 LDFLAGS=$(RELEASE_LDFLAGS) tools/hack/gobuild.sh ./out/linux_amd64/ $(HGCTL_BINARIES)
GOPROXY=$(GOPROXY) GOOS=linux GOARCH=arm64 LDFLAGS=$(RELEASE_LDFLAGS) tools/hack/gobuild.sh ./out/linux_arm64/ $(HGCTL_BINARIES)
GOPROXY=$(GOPROXY) GOOS=darwin GOARCH=amd64 LDFLAGS=$(RELEASE_LDFLAGS) tools/hack/gobuild.sh ./out/darwin_amd64/ $(HGCTL_BINARIES)
GOPROXY=$(GOPROXY) GOOS=darwin GOARCH=arm64 LDFLAGS=$(RELEASE_LDFLAGS) tools/hack/gobuild.sh ./out/darwin_arm64/ $(HGCTL_BINARIES)
GOPROXY=$(GOPROXY) GOOS=windows GOARCH=amd64 LDFLAGS=$(RELEASE_LDFLAGS) tools/hack/gobuild.sh ./out/windows_amd64/ $(HGCTL_BINARIES)
GOPROXY=$(GOPROXY) GOOS=windows GOARCH=arm64 LDFLAGS=$(RELEASE_LDFLAGS) tools/hack/gobuild.sh ./out/windows_arm64/ $(HGCTL_BINARIES)
GOPROXY=$(GOPROXY) GOOS=linux GOARCH=amd64 LDFLAGS=$(RELEASE_LDFLAGS) PROJECT_DIR="$(HGCTL_PROJECT_DIR)" tools/hack/gobuild.sh ./out/linux_amd64/ $(HGCTL_BINARIES)
GOPROXY=$(GOPROXY) GOOS=linux GOARCH=arm64 LDFLAGS=$(RELEASE_LDFLAGS) PROJECT_DIR="$(HGCTL_PROJECT_DIR)" tools/hack/gobuild.sh ./out/linux_arm64/ $(HGCTL_BINARIES)
GOPROXY=$(GOPROXY) GOOS=darwin GOARCH=amd64 LDFLAGS=$(RELEASE_LDFLAGS) PROJECT_DIR="$(HGCTL_PROJECT_DIR)" tools/hack/gobuild.sh ./out/darwin_amd64/ $(HGCTL_BINARIES)
GOPROXY=$(GOPROXY) GOOS=darwin GOARCH=arm64 LDFLAGS=$(RELEASE_LDFLAGS) PROJECT_DIR="$(HGCTL_PROJECT_DIR)" tools/hack/gobuild.sh ./out/darwin_arm64/ $(HGCTL_BINARIES)
GOPROXY=$(GOPROXY) GOOS=windows GOARCH=amd64 LDFLAGS=$(RELEASE_LDFLAGS) PROJECT_DIR="$(HGCTL_PROJECT_DIR)" tools/hack/gobuild.sh ./out/windows_amd64/ $(HGCTL_BINARIES)
GOPROXY=$(GOPROXY) GOOS=windows GOARCH=arm64 LDFLAGS=$(RELEASE_LDFLAGS) PROJECT_DIR="$(HGCTL_PROJECT_DIR)" tools/hack/gobuild.sh ./out/windows_arm64/ $(HGCTL_BINARIES)
# Create targets for OUT_LINUX/binary
# There are two use cases here:
# * Building all docker images (generally in CI). In this case we want to build everything at once, so they share work
Expand Down Expand Up @@ -128,40 +130,38 @@ docker-build: docker.higress ## Build and push docker images to registry defined

docker-buildx-push: clean-env docker.higress-buildx

docker-build-base:
docker buildx build --no-cache --platform linux/amd64,linux/arm64 -t ${HUB}/base:${BASE_VERSION} -f docker/Dockerfile.base . --push

export PARENT_GIT_TAG:=$(shell cat VERSION)
export PARENT_GIT_REVISION:=$(TAG)

export ENVOY_TAR_PATH:=/home/package/envoy.tar.gz
export ENVOY_PACKAGE_URL_PATTERN?=https://github.com/alibaba/higress/releases/download/v1.3.4-rc.1/envoy-symbol-ARCH.tar.gz

build-envoy: prebuild
./tools/hack/build-envoy.sh

external/package/envoy-amd64.tar.gz:
# cd external/proxy; BUILD_WITH_CONTAINER=1 make test_release
cd external/package; wget -O envoy-amd64.tar.gz "https://github.com/alibaba/higress/releases/download/v1.3.4-rc.1/envoy-symbol-amd64.tar.gz"
cd external/package; wget $(subst ARCH,amd64,${ENVOY_PACKAGE_URL_PATTERN})

external/package/envoy-arm64.tar.gz:
# cd external/proxy; BUILD_WITH_CONTAINER=1 make test_release
cd external/package; wget -O envoy-arm64.tar.gz "https://github.com/alibaba/higress/releases/download/v1.3.4-rc.1/envoy-symbol-arm64.tar.gz"
cd external/package; wget $(subst ARCH,arm64,${ENVOY_PACKAGE_URL_PATTERN})

build-pilot:
cd external/istio; rm -rf out/linux_amd64; GOOS_LOCAL=linux TARGET_OS=linux TARGET_ARCH=amd64 BUILD_WITH_CONTAINER=1 make build-linux
cd external/istio; rm -rf out/linux_arm64; GOOS_LOCAL=linux TARGET_OS=linux TARGET_ARCH=arm64 BUILD_WITH_CONTAINER=1 make build-linux
build-pilot: prebuild
TARGET_ARCH=amd64 ./tools/hack/build-istio-pilot.sh
TARGET_ARCH=arm64 ./tools/hack/build-istio-pilot.sh

build-pilot-local:
cd external/istio; rm -rf out/linux_${GOARCH_LOCAL}; GOOS_LOCAL=linux TARGET_OS=linux TARGET_ARCH=${GOARCH_LOCAL} BUILD_WITH_CONTAINER=1 make build-linux
build-pilot-local: prebuild
TARGET_ARCH=${TARGET_ARCH} ./tools/hack/build-istio-pilot.sh

build-gateway: prebuild external/package/envoy-amd64.tar.gz external/package/envoy-arm64.tar.gz build-pilot
cd external/istio; BUILD_WITH_CONTAINER=1 BUILDX_PLATFORM=true DOCKER_BUILD_VARIANTS=default DOCKER_TARGETS="docker.proxyv2" make docker
build-gateway: prebuild
cd external/istio; BUILD_WITH_CONTAINER=1 BUILDX_PLATFORM=true DOCKER_BUILD_VARIANTS=default DOCKER_TARGETS="docker.proxyv2" make docker.buildx

build-gateway-local: prebuild external/package/envoy-amd64.tar.gz external/package/envoy-arm64.tar.gz
cd external/istio; rm -rf out/linux_${GOARCH_LOCAL}; GOOS_LOCAL=linux TARGET_OS=linux BUILD_WITH_CONTAINER=1 BUILDX_PLATFORM=false DOCKER_BUILD_VARIANTS=default DOCKER_TARGETS="docker.proxyv2" make docker
TARGET_ARCH=${TARGET_ARCH} DOCKER_TARGETS="docker.proxyv2" ./tools/hack/build-istio-image.sh

build-istio: prebuild build-pilot
cd external/istio; BUILD_WITH_CONTAINER=1 BUILDX_PLATFORM=true DOCKER_BUILD_VARIANTS=default DOCKER_TARGETS="docker.pilot" make docker
build-istio: prebuild
cd external/istio; BUILD_WITH_CONTAINER=1 BUILDX_PLATFORM=true DOCKER_BUILD_VARIANTS=default DOCKER_TARGETS="docker.pilot" make docker.buildx

build-istio-local: prebuild
cd external/istio; rm -rf out/linux_${GOARCH_LOCAL}; GOOS_LOCAL=linux TARGET_OS=linux BUILD_WITH_CONTAINER=1 BUILDX_PLATFORM=false DOCKER_BUILD_VARIANTS=default DOCKER_TARGETS="docker.pilot" make docker
TARGET_ARCH=${TARGET_ARCH} DOCKER_TARGETS="docker.pilot" ./tools/hack/build-istio-image.sh

build-wasmplugins:
./tools/hack/build-wasm-plugins.sh
Expand Down