mirror of
https://github.com/alibaba/higress.git
synced 2026-02-25 21:21:01 +08:00
Compare commits
250 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c9f1f94130 | ||
|
|
5554189851 | ||
|
|
eb1f99391a | ||
|
|
7d4ab04030 | ||
|
|
9c112a03db | ||
|
|
9be4f7d587 | ||
|
|
50a219ed01 | ||
|
|
e55a3c0f5b | ||
|
|
e0e4fc3507 | ||
|
|
3967eec852 | ||
|
|
f537a1c3ea | ||
|
|
b652f3e666 | ||
|
|
5140372159 | ||
|
|
f277d4f6ae | ||
|
|
ae20420179 | ||
|
|
a138a037ad | ||
|
|
021387c9d3 | ||
|
|
ea0a694d81 | ||
|
|
8028fe03ca | ||
|
|
a68dde0b91 | ||
|
|
48c3db85c4 | ||
|
|
7e85065832 | ||
|
|
7967f5db70 | ||
|
|
5026973d59 | ||
|
|
7097eef6ba | ||
|
|
fae222806b | ||
|
|
c63cdb62ea | ||
|
|
e43f5d106f | ||
|
|
29c95ea557 | ||
|
|
73d5cc3f1d | ||
|
|
c1ddbcef7c | ||
|
|
dd39c87311 | ||
|
|
612c94dd8a | ||
|
|
e67ed481cf | ||
|
|
ccea33655f | ||
|
|
ad4cfdbd40 | ||
|
|
3598c21da0 | ||
|
|
a624351f84 | ||
|
|
c41264816e | ||
|
|
acd80d2528 | ||
|
|
073c10df77 | ||
|
|
90f89cf588 | ||
|
|
879192cf99 | ||
|
|
d3d000753d | ||
|
|
b8a01113e3 | ||
|
|
0bb9e6dd89 | ||
|
|
ecdd077c72 | ||
|
|
e971faeb0b | ||
|
|
77013e28b6 | ||
|
|
9faa5f37d1 | ||
|
|
665d9fa943 | ||
|
|
a71ecf41d1 | ||
|
|
b825f9176f | ||
|
|
d35d23e2d5 | ||
|
|
6d1e09c146 | ||
|
|
87c39d393f | ||
|
|
c97260c4a9 | ||
|
|
5e509e7032 | ||
|
|
c9c7df78a9 | ||
|
|
1e018770e5 | ||
|
|
53ff28c58b | ||
|
|
66f2d8980d | ||
|
|
b1e4cf9492 | ||
|
|
c250e850d5 | ||
|
|
1f7e98cef5 | ||
|
|
4273bf573a | ||
|
|
13f36856cc | ||
|
|
e84f9980a1 | ||
|
|
a2fecd59a1 | ||
|
|
89c72777e1 | ||
|
|
85df257f4e | ||
|
|
659a982496 | ||
|
|
0ae376b320 | ||
|
|
c647ab3a08 | ||
|
|
688247f4f9 | ||
|
|
10f5267b3f | ||
|
|
cec99686a0 | ||
|
|
2d5d9c095b | ||
|
|
4bd4433248 | ||
|
|
4ea85e9a35 | ||
|
|
a140f780d2 | ||
|
|
2548815667 | ||
|
|
e760b4d0ab | ||
|
|
3cc1c7877f | ||
|
|
8039b82699 | ||
|
|
f9a015e45a | ||
|
|
5fbfbe0e4a | ||
|
|
a3339a9b1c | ||
|
|
aa94412af2 | ||
|
|
817925ef39 | ||
|
|
c55a5b9bd9 | ||
|
|
518d8dfa3d | ||
|
|
d2ee6065a0 | ||
|
|
4426f18a84 | ||
|
|
17794cef2a | ||
|
|
a554ee1ceb | ||
|
|
1dbb130539 | ||
|
|
9c1684c941 | ||
|
|
bd4109e1a4 | ||
|
|
967fa3f3d1 | ||
|
|
d57ffce1dc | ||
|
|
a2d97ae98f | ||
|
|
324e0bcf91 | ||
|
|
14742705b1 | ||
|
|
b204ad4c8d | ||
|
|
34054f8c76 | ||
|
|
6803aa44ab | ||
|
|
e5cd334d5d | ||
|
|
88c0386ca3 | ||
|
|
5174397e7c | ||
|
|
cb0479510f | ||
|
|
57b8cb1d69 | ||
|
|
9f5b795a4d | ||
|
|
26654aefc0 | ||
|
|
70176cde3e | ||
|
|
7b1f538d38 | ||
|
|
344035698a | ||
|
|
9136908354 | ||
|
|
de1dd3bfbc | ||
|
|
0c1db17de6 | ||
|
|
8cbe16f77c | ||
|
|
8ed4c5609a | ||
|
|
9ea1903ce6 | ||
|
|
6835486725 | ||
|
|
265df42456 | ||
|
|
3b1b621627 | ||
|
|
901ad9619d | ||
|
|
4a5127fedc | ||
|
|
4e44e7a1bb | ||
|
|
b54a2e7387 | ||
|
|
124caf8785 | ||
|
|
754ec71d6e | ||
|
|
d8e91851d9 | ||
|
|
86b223bc75 | ||
|
|
a18879bf86 | ||
|
|
970cfd44ee | ||
|
|
f685b0353a | ||
|
|
e135789c3e | ||
|
|
3e72d4b1f0 | ||
|
|
1ded5322a5 | ||
|
|
be8563765e | ||
|
|
45c4c80a66 | ||
|
|
d8c34bb863 | ||
|
|
4e392d1cf6 | ||
|
|
5b663ae412 | ||
|
|
fcf19535f9 | ||
|
|
14e43aa921 | ||
|
|
64ccbab29c | ||
|
|
945787f7dc | ||
|
|
792b9b0ee5 | ||
|
|
26ed9a6d93 | ||
|
|
ed36a4989f | ||
|
|
f23e26374f | ||
|
|
eb2934c084 | ||
|
|
2da1c62c69 | ||
|
|
fab734d39a | ||
|
|
2393af5c85 | ||
|
|
b142f51776 | ||
|
|
587267a733 | ||
|
|
a2078711f5 | ||
|
|
dc54c581f3 | ||
|
|
b47d74bce5 | ||
|
|
8d8ad6d624 | ||
|
|
8062625d75 | ||
|
|
54a8a906ae | ||
|
|
8659895a91 | ||
|
|
dc3e496aa0 | ||
|
|
8747e1ddad | ||
|
|
2b9e3a14c2 | ||
|
|
1051201e97 | ||
|
|
8b24a20651 | ||
|
|
02b98dc4d8 | ||
|
|
e96f9a078c | ||
|
|
8e7793c470 | ||
|
|
e224df6bb4 | ||
|
|
a6444af185 | ||
|
|
8e28ae781d | ||
|
|
d58e781900 | ||
|
|
6861a78bb1 | ||
|
|
c3789416d6 | ||
|
|
1913508f5e | ||
|
|
0eaa9389c9 | ||
|
|
8048436604 | ||
|
|
ec229e69ac | ||
|
|
f8f8b41fa2 | ||
|
|
c49c8f1ec2 | ||
|
|
49269b4303 | ||
|
|
35d5669b51 | ||
|
|
1f154c59f1 | ||
|
|
8c206a6456 | ||
|
|
d307d0e755 | ||
|
|
9b88c6bb40 | ||
|
|
e5105a4d71 | ||
|
|
564c7d8193 | ||
|
|
3700ada7e6 | ||
|
|
3b78a0eb62 | ||
|
|
0620346761 | ||
|
|
aa17e9598d | ||
|
|
fa834634b7 | ||
|
|
4ff311e0fc | ||
|
|
90b7f209e2 | ||
|
|
6e1dd5bbc8 | ||
|
|
a392d0cf34 | ||
|
|
43034d7d61 | ||
|
|
8c76ae26bb | ||
|
|
c1250aec2e | ||
|
|
02bc319eef | ||
|
|
28892cf3ae | ||
|
|
bee03a37a4 | ||
|
|
2a97921d2b | ||
|
|
d4dbaba760 | ||
|
|
d718870b65 | ||
|
|
b65446fa25 | ||
|
|
3fd37abab7 | ||
|
|
81e467b624 | ||
|
|
736eea6cf9 | ||
|
|
c32e1ab69b | ||
|
|
fc05a3b256 | ||
|
|
9fc2760b7d | ||
|
|
be88647752 | ||
|
|
a56172095a | ||
|
|
f3270123ba | ||
|
|
5e2d62406b | ||
|
|
39cab9d724 | ||
|
|
89865733f6 | ||
|
|
1ccf9195b2 | ||
|
|
7d2a05ef1c | ||
|
|
32c2acefda | ||
|
|
ea7b581e26 | ||
|
|
ac2f0a5545 | ||
|
|
51d7124454 | ||
|
|
ec6a185adc | ||
|
|
f9ffda288b | ||
|
|
2dbe41324a | ||
|
|
80d6ecfddb | ||
|
|
b23fae7a12 | ||
|
|
2c19d97252 | ||
|
|
efd7ccd5fe | ||
|
|
81fd0d6386 | ||
|
|
176ddc6963 | ||
|
|
44637c2449 | ||
|
|
3e68ae75d1 | ||
|
|
18ad817edb | ||
|
|
d48e0ce773 | ||
|
|
9734ffeb3e | ||
|
|
1421ce8667 | ||
|
|
625c06e58f | ||
|
|
e4a47dfb46 | ||
|
|
6b483189ac | ||
|
|
74ad9a555a |
83
.github/workflows/build-and-test-plugin.yaml
vendored
Normal file
83
.github/workflows/build-and-test-plugin.yaml
vendored
Normal file
@@ -0,0 +1,83 @@
|
||||
name: "Build and Test Plugins"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
paths:
|
||||
- 'plugins/**'
|
||||
- 'test/**'
|
||||
pull_request:
|
||||
branches: [ "*" ]
|
||||
paths:
|
||||
- 'plugins/**'
|
||||
- 'test/**'
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: 1.19
|
||||
# There are too many lint errors in current code bases
|
||||
# uncomment when we decide what lint should be addressed or ignored.
|
||||
# - run: make lint
|
||||
|
||||
higress-wasmplugin-test:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
# TODO(Xunzhuo): Enable C WASM Filters in CI
|
||||
wasmPluginType: [ GO ]
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Free Up GitHub Actions Ubuntu Runner Disk Space 🔧
|
||||
uses: jlumbroso/free-disk-space@main
|
||||
with:
|
||||
tool-cache: false
|
||||
android: true
|
||||
dotnet: true
|
||||
haskell: true
|
||||
large-packages: true
|
||||
swap-storage: true
|
||||
|
||||
- name: "Setup Go"
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: 1.19
|
||||
|
||||
- name: Setup Golang Caches
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: |-
|
||||
~/.cache/go-build
|
||||
~/go/pkg/mod
|
||||
key: ${{ runner.os }}-go-${{ github.run_id }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-go
|
||||
|
||||
- name: Setup Submodule Caches
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: |-
|
||||
.git/modules
|
||||
key: ${{ runner.os }}-submodules-cache-${{ github.run_id }}
|
||||
restore-keys: ${{ runner.os }}-submodules-cache
|
||||
|
||||
- run: git stash # restore patch
|
||||
|
||||
- name: "Run Ingress WasmPlugins Tests"
|
||||
uses: nick-fields/retry@v3
|
||||
with:
|
||||
timeout_minutes: 25
|
||||
max_attempts: 3
|
||||
retry_on: error
|
||||
command: GOPROXY="https://proxy.golang.org,direct" PLUGIN_TYPE=${{ matrix.wasmPluginType }} make higress-wasmplugin-test
|
||||
|
||||
publish:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [ higress-wasmplugin-test ]
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
76
.github/workflows/build-and-test.yaml
vendored
76
.github/workflows/build-and-test.yaml
vendored
@@ -23,6 +23,25 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Setup Golang Caches
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: |-
|
||||
~/.cache/go-build
|
||||
~/go/pkg/mod
|
||||
key: ${{ runner.os }}-go-${{ github.run_id }}
|
||||
restore-keys: ${{ runner.os }}-go
|
||||
|
||||
- name: Setup Submodule Caches
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: |-
|
||||
.git/modules
|
||||
key: ${{ runner.os }}-submodules-cache-${{ github.run_id }}
|
||||
restore-keys: ${{ runner.os }}-submodules-cache
|
||||
|
||||
- run: git stash # restore patch
|
||||
|
||||
# test
|
||||
- name: Run Coverage Tests
|
||||
run: GOPROXY="https://proxy.golang.org,direct" make go.test.coverage
|
||||
@@ -38,15 +57,34 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [lint,coverage-test]
|
||||
steps:
|
||||
- name: "Checkout ${{ github.ref }}"
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 2
|
||||
|
||||
- name: "Setup Go"
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: 1.19
|
||||
|
||||
- name: "checkout ${{ github.ref }}"
|
||||
uses: actions/checkout@v3
|
||||
- name: Setup Golang Caches
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
fetch-depth: 2
|
||||
path: |-
|
||||
~/.cache/go-build
|
||||
~/go/pkg/mod
|
||||
key: ${{ runner.os }}-go-${{ github.run_id }}
|
||||
restore-keys: ${{ runner.os }}-go
|
||||
|
||||
- name: Setup Submodule Caches
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: |-
|
||||
.git/modules
|
||||
key: ${{ runner.os }}-submodules-cache-${{ github.run_id }}
|
||||
restore-keys: ${{ runner.os }}-submodules-cache
|
||||
|
||||
- run: git stash # restore patch
|
||||
|
||||
- name: "Build Higress Binary"
|
||||
run: GOPROXY="https://proxy.golang.org,direct" make build
|
||||
@@ -63,20 +101,42 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
ingress-conformance-test:
|
||||
higress-conformance-test:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [build]
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: "Setup Go"
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: 1.19
|
||||
- uses: actions/checkout@v3
|
||||
- name: "Run Ingress Conformance Tests"
|
||||
run: GOPROXY="https://proxy.golang.org,direct" make ingress-conformance-test
|
||||
|
||||
- name: Setup Golang Caches
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: |-
|
||||
~/.cache/go-build
|
||||
~/go/pkg/mod
|
||||
key: ${{ runner.os }}-go-${{ github.run_id }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-go
|
||||
|
||||
- name: Setup Submodule Caches
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: |-
|
||||
.git/modules
|
||||
key: ${{ runner.os }}-submodules-cache-${{ github.run_id }}
|
||||
restore-keys: ${{ runner.os }}-submodules-cache
|
||||
|
||||
- run: git stash # restore patch
|
||||
|
||||
- name: "Run Higress E2E Conformance Tests"
|
||||
run: GOPROXY="https://proxy.golang.org,direct" make higress-conformance-test
|
||||
|
||||
publish:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [ingress-conformance-test,gateway-conformance-test]
|
||||
needs: [higress-conformance-test,gateway-conformance-test]
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
237
.github/workflows/build-image-and-push.yaml
vendored
Normal file
237
.github/workflows/build-image-and-push.yaml
vendored
Normal file
@@ -0,0 +1,237 @@
|
||||
name: Build Docker Images and Push to Image Registry
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "v*.*.*"
|
||||
workflow_dispatch: ~
|
||||
|
||||
jobs:
|
||||
build-controller-image:
|
||||
runs-on: ubuntu-latest
|
||||
environment:
|
||||
name: image-registry-controller
|
||||
env:
|
||||
CONTROLLER_IMAGE_REGISTRY: ${{ vars.IMAGE_REGISTRY || 'higress-registry.cn-hangzhou.cr.aliyuncs.com' }}
|
||||
CONTROLLER_IMAGE_NAME: ${{ vars.CONTROLLER_IMAGE_NAME || 'higress/higress' }}
|
||||
steps:
|
||||
- name: "Checkout ${{ github.ref }}"
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Free Up GitHub Actions Ubuntu Runner Disk Space 🔧
|
||||
uses: jlumbroso/free-disk-space@main
|
||||
with:
|
||||
tool-cache: false
|
||||
android: true
|
||||
dotnet: true
|
||||
haskell: true
|
||||
large-packages: true
|
||||
swap-storage: true
|
||||
|
||||
- name: "Setup Go"
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: 1.19
|
||||
|
||||
- name: Setup Golang Caches
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: |-
|
||||
~/.cache/go-build
|
||||
~/go/pkg/mod
|
||||
key: ${{ runner.os }}-go-${{ github.run_id }}
|
||||
restore-keys: ${{ runner.os }}-go
|
||||
|
||||
- name: Setup Submodule Caches
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: |-
|
||||
envoy
|
||||
istio
|
||||
.git/modules
|
||||
key: ${{ runner.os }}-submodules-new-${{ github.run_id }}
|
||||
restore-keys: ${{ runner.os }}-submodules-new
|
||||
|
||||
- name: Calculate Docker metadata
|
||||
id: docker-meta
|
||||
uses: docker/metadata-action@v4
|
||||
with:
|
||||
images: |
|
||||
${{ env.CONTROLLER_IMAGE_REGISTRY }}/${{ env.CONTROLLER_IMAGE_NAME }}
|
||||
tags: |
|
||||
type=sha
|
||||
type=ref,event=tag
|
||||
type=semver,pattern={{version}}
|
||||
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }}
|
||||
|
||||
- name: Login to Docker Registry
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: ${{ env.CONTROLLER_IMAGE_REGISTRY }}
|
||||
username: ${{ secrets.REGISTRY_USERNAME }}
|
||||
password: ${{ secrets.REGISTRY_PASSWORD }}
|
||||
|
||||
- name: Build Docker Image and Push
|
||||
run: |
|
||||
GOPROXY="https://proxy.golang.org,direct" make docker-buildx-push
|
||||
BUILT_IMAGE="higress-registry.cn-hangzhou.cr.aliyuncs.com/higress/higress"
|
||||
readarray -t IMAGES <<< "${{ steps.docker-meta.outputs.tags }}"
|
||||
for image in ${IMAGES[@]}; do
|
||||
echo "Image: $image"
|
||||
docker buildx imagetools create $BUILT_IMAGE:$GITHUB_SHA --tag $image
|
||||
done
|
||||
|
||||
build-pilot-image:
|
||||
runs-on: ubuntu-latest
|
||||
environment:
|
||||
name: image-registry-pilot
|
||||
env:
|
||||
PILOT_IMAGE_REGISTRY: ${{ vars.IMAGE_REGISTRY || 'higress-registry.cn-hangzhou.cr.aliyuncs.com' }}
|
||||
PILOT_IMAGE_NAME: ${{ vars.PILOT_IMAGE_NAME || 'higress/pilot' }}
|
||||
steps:
|
||||
- name: "Checkout ${{ github.ref }}"
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Free Up GitHub Actions Ubuntu Runner Disk Space 🔧
|
||||
uses: jlumbroso/free-disk-space@main
|
||||
with:
|
||||
tool-cache: false
|
||||
android: true
|
||||
dotnet: true
|
||||
haskell: true
|
||||
large-packages: true
|
||||
swap-storage: true
|
||||
|
||||
- name: "Setup Go"
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: 1.19
|
||||
|
||||
- name: Setup Golang Caches
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: |-
|
||||
~/.cache/go-build
|
||||
~/go/pkg/mod
|
||||
key: ${{ runner.os }}-go-${{ github.run_id }}
|
||||
restore-keys: ${{ runner.os }}-go
|
||||
|
||||
- name: Setup Submodule Caches
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: |-
|
||||
envoy
|
||||
istio
|
||||
.git/modules
|
||||
key: ${{ runner.os }}-submodules-${{ github.run_id }}
|
||||
restore-keys: ${{ runner.os }}-submodules-new
|
||||
|
||||
- name: Calculate Docker metadata
|
||||
id: docker-meta
|
||||
uses: docker/metadata-action@v4
|
||||
with:
|
||||
images: |
|
||||
${{ env.PILOT_IMAGE_REGISTRY }}/${{ env.PILOT_IMAGE_NAME }}
|
||||
tags: |
|
||||
type=sha
|
||||
type=ref,event=tag
|
||||
type=semver,pattern={{version}}
|
||||
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }}
|
||||
|
||||
- name: Login to Docker Registry
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: ${{ env.PILOT_IMAGE_REGISTRY }}
|
||||
username: ${{ secrets.REGISTRY_USERNAME }}
|
||||
password: ${{ secrets.REGISTRY_PASSWORD }}
|
||||
|
||||
- name: Build Pilot-Discovery Image and Push
|
||||
run: |
|
||||
GOPROXY="https://proxy.golang.org,direct" make build-istio
|
||||
BUILT_IMAGE="higress-registry.cn-hangzhou.cr.aliyuncs.com/higress/pilot"
|
||||
readarray -t IMAGES <<< "${{ steps.docker-meta.outputs.tags }}"
|
||||
for image in ${IMAGES[@]}; do
|
||||
echo "Image: $image"
|
||||
docker buildx imagetools create $BUILT_IMAGE:$GITHUB_SHA --tag $image
|
||||
done
|
||||
|
||||
|
||||
build-gateway-image:
|
||||
runs-on: ubuntu-latest
|
||||
environment:
|
||||
name: image-registry-pilot
|
||||
env:
|
||||
GATEWAY_IMAGE_REGISTRY: ${{ vars.IMAGE_REGISTRY || 'higress-registry.cn-hangzhou.cr.aliyuncs.com' }}
|
||||
GATEWAY_IMAGE_NAME: ${{ vars.GATEWAY_IMAGE_NAME || 'higress/gateway' }}
|
||||
steps:
|
||||
- name: "Checkout ${{ github.ref }}"
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Free Up GitHub Actions Ubuntu Runner Disk Space 🔧
|
||||
uses: jlumbroso/free-disk-space@main
|
||||
with:
|
||||
tool-cache: false
|
||||
android: true
|
||||
dotnet: true
|
||||
haskell: true
|
||||
large-packages: true
|
||||
swap-storage: true
|
||||
|
||||
- name: "Setup Go"
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: 1.19
|
||||
|
||||
- name: Setup Golang Caches
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: |-
|
||||
~/.cache/go-build
|
||||
~/go/pkg/mod
|
||||
key: ${{ runner.os }}-go-${{ github.run_id }}
|
||||
restore-keys: ${{ runner.os }}-go
|
||||
|
||||
- name: Setup Submodule Caches
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: |-
|
||||
envoy
|
||||
istio
|
||||
.git/modules
|
||||
key: ${{ runner.os }}-submodules-${{ github.run_id }}
|
||||
restore-keys: ${{ runner.os }}-submodules-new
|
||||
|
||||
- name: Calculate Docker metadata
|
||||
id: docker-meta
|
||||
uses: docker/metadata-action@v4
|
||||
with:
|
||||
images: |
|
||||
${{ env.GATEWAY_IMAGE_REGISTRY }}/${{ env.GATEWAY_IMAGE_NAME }}
|
||||
tags: |
|
||||
type=sha
|
||||
type=ref,event=tag
|
||||
type=semver,pattern={{version}}
|
||||
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }}
|
||||
|
||||
- name: Login to Docker Registry
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: ${{ env.GATEWAY_IMAGE_REGISTRY }}
|
||||
username: ${{ secrets.REGISTRY_USERNAME }}
|
||||
password: ${{ secrets.REGISTRY_PASSWORD }}
|
||||
|
||||
- name: Build Gateway Image and Push
|
||||
run: |
|
||||
GOPROXY="https://proxy.golang.org,direct" make build-gateway
|
||||
BUILT_IMAGE="higress-registry.cn-hangzhou.cr.aliyuncs.com/higress/proxyv2"
|
||||
readarray -t IMAGES <<< "${{ steps.docker-meta.outputs.tags }}"
|
||||
for image in ${IMAGES[@]}; do
|
||||
echo "Image: $image"
|
||||
docker buildx imagetools create $BUILT_IMAGE:$GITHUB_SHA --tag $image
|
||||
done
|
||||
37
.github/workflows/deploy-standalone-to-oss.yaml
vendored
Normal file
37
.github/workflows/deploy-standalone-to-oss.yaml
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
name: Deploy Standalone to OSS
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "v*.*.*"
|
||||
workflow_dispatch: ~
|
||||
|
||||
jobs:
|
||||
deploy-to-oss:
|
||||
runs-on: ubuntu-latest
|
||||
environment:
|
||||
name: oss
|
||||
steps:
|
||||
# Step 1
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
# Step 2
|
||||
- id: package
|
||||
name: Prepare Standalone Package
|
||||
run: |
|
||||
mkdir ./artifact
|
||||
cp ./tools/get-higress.sh ./artifact
|
||||
LOCAL_RELEASE_URL="https://github.com/higress-group/higress-standalone/releases"
|
||||
VERSION=$(curl -Ls $LOCAL_RELEASE_URL | grep 'href="/higress-group/higress-standalone/releases/tag/v[0-9]*.[0-9]*.[0-9]*\"' | sed -E 's/.*\/higress-group\/higress-standalone\/releases\/tag\/(v[0-9\.]+)".*/\1/g' | head -1)
|
||||
DOWNLOAD_URL="https://github.com/higress-group/higress-standalone/archive/refs/tags/${VERSION}.tar.gz"
|
||||
curl -SsL "$DOWNLOAD_URL" -o "./artifact/higress-${VERSION}.tar.gz"
|
||||
echo -n "$VERSION" > ./artifact/VERSION
|
||||
echo "Version=$VERSION"
|
||||
# Step 3
|
||||
- name: Upload to OSS
|
||||
uses: doggycool/ossutil-github-action@master
|
||||
with:
|
||||
ossArgs: 'cp -r -u ./artifact/ oss://higress-website-cn-hongkong/standalone/'
|
||||
accessKey: ${{ secrets.ACCESS_KEYID }}
|
||||
accessSecret: ${{ secrets.ACCESS_KEYSECRET }}
|
||||
endpoint: oss-cn-hongkong.aliyuncs.com
|
||||
6
.github/workflows/deploy-to-oss.yaml
vendored
6
.github/workflows/deploy-to-oss.yaml
vendored
@@ -4,10 +4,13 @@ on:
|
||||
push:
|
||||
tags:
|
||||
- "v*.*.*"
|
||||
workflow_dispatch: ~
|
||||
|
||||
jobs:
|
||||
deploy-to-oss:
|
||||
runs-on: ubuntu-latest
|
||||
environment:
|
||||
name: oss
|
||||
steps:
|
||||
# Step 1
|
||||
- name: Checkout
|
||||
@@ -33,11 +36,14 @@ jobs:
|
||||
with:
|
||||
helmv3: 3.7.2
|
||||
command: |
|
||||
cp api/kubernetes/customresourcedefinitions.gen.yaml helm/core/crds
|
||||
helmv3 repo add higress.io https://higress.io/helm-charts
|
||||
helmv3 package helm/core --debug --app-version ${{steps.calc-version.outputs.version}} --version ${{steps.calc-version.outputs.version}} -d ./artifact
|
||||
helmv3 dependency build helm/higress
|
||||
helmv3 package helm/higress --debug --app-version ${{steps.calc-version.outputs.version}} --version ${{steps.calc-version.outputs.version}} -d ./artifact
|
||||
helmv3 repo index --url https://higress.io/helm-charts/ --merge ./artifact/index.yaml ./artifact
|
||||
cp ./artifact/index.yaml ./artifact/cn-index.yaml
|
||||
sed -i 's/higress\.io/higress\.cn/g' ./artifact/cn-index.yaml
|
||||
# Step 5
|
||||
- name: Upload to OSS
|
||||
uses: doggycool/ossutil-github-action@master
|
||||
|
||||
4
.github/workflows/latest-release.yaml
vendored
4
.github/workflows/latest-release.yaml
vendored
@@ -18,6 +18,8 @@ jobs:
|
||||
tar -zcvf hgctl_latest_linux_arm64.tar.gz out/linux_arm64/
|
||||
tar -zcvf hgctl_latest_darwin_amd64.tar.gz out/darwin_amd64/
|
||||
tar -zcvf hgctl_latest_darwin_arm64.tar.gz out/darwin_arm64/
|
||||
zip -q -r hgctl_latest_windows_amd64.zip out/windows_amd64/
|
||||
zip -q -r hgctl_latest_windows_arm64.zip out/windows_arm64/
|
||||
|
||||
# Ignore the error when we delete the latest release, it might not exist.
|
||||
|
||||
@@ -54,6 +56,8 @@ jobs:
|
||||
hgctl_latest_linux_arm64.tar.gz
|
||||
hgctl_latest_darwin_amd64.tar.gz
|
||||
hgctl_latest_darwin_arm64.tar.gz
|
||||
hgctl_latest_windows_amd64.zip
|
||||
hgctl_latest_windows_arm64.zip
|
||||
body: |
|
||||
This is the "latest" release of **Higress**, which contains the most recent commits from the main branch.
|
||||
|
||||
|
||||
4
.gitignore
vendored
4
.gitignore
vendored
@@ -12,4 +12,6 @@ bazel-out
|
||||
bazel-testlogs
|
||||
bazel-wasm-cpp
|
||||
tools/bin/
|
||||
helm/**/charts/**.tgz
|
||||
helm/**/charts/**.tgz
|
||||
target/
|
||||
tools/hack/cluster.conf
|
||||
@@ -26,7 +26,9 @@ header:
|
||||
- 'VERSION'
|
||||
- 'tools/'
|
||||
- 'test/README.md'
|
||||
- 'pkg/cmd/hgctl/testdata/config'
|
||||
- 'test/README_CN.md'
|
||||
- 'cmd/hgctl/config/testdata/config'
|
||||
- 'pkg/cmd/hgctl/manifests'
|
||||
|
||||
comment: on-failure
|
||||
dependency:
|
||||
|
||||
14
CODEOWNERS
14
CODEOWNERS
@@ -1,10 +1,10 @@
|
||||
/api @johnlanni
|
||||
/envoy @gengleilei @johnlanni @Lynskylate
|
||||
/api @johnlanni @CH3CHO
|
||||
/envoy @gengleilei @johnlanni
|
||||
/istio @SpecialYang @johnlanni
|
||||
/pkg @SpecialYang @johnlanni @Charlie17Li @Xunzhuo
|
||||
/plugins @johnlanni
|
||||
/registry @NameHaibinZhang @johnlanni
|
||||
/test @Xunzhuo
|
||||
/tools @johnlanni @Xunzhuo
|
||||
/pkg @SpecialYang @johnlanni @CH3CHO
|
||||
/plugins @johnlanni @WeixinX
|
||||
/registry @NameHaibinZhang @2456868764 @johnlanni
|
||||
/test @Xunzhuo @2456868764 @CH3CHO
|
||||
/tools @johnlanni @Xunzhuo @2456868764
|
||||
|
||||
|
||||
|
||||
@@ -73,6 +73,7 @@
|
||||
* [分支定义](#分支定义)
|
||||
* [提交规则](#提交规则)
|
||||
* [PR说明](#PR说明)
|
||||
* [开发前准备](#开发前准备)
|
||||
|
||||
### 工作区准备
|
||||
|
||||
@@ -168,6 +169,12 @@ git config --get user.email
|
||||
|
||||
PR 是更改 Higress 项目文件的唯一方法。为了帮助审查人更好地理解你的目的,PR 描述不能太详细。我们鼓励贡献者遵循 [PR 模板](./.github/PULL_REQUEST_TEMPLATE.md) 来完成拉取请求。
|
||||
|
||||
### 开发前准备
|
||||
|
||||
```shell
|
||||
make prebuild && go mod tidy
|
||||
```
|
||||
|
||||
## 测试用例贡献
|
||||
|
||||
任何测试用例都会受到欢迎。目前,Higress 功能测试用例是高优先级的。
|
||||
|
||||
@@ -169,6 +169,12 @@ No matter commit message, or commit content, we do take more emphasis on code re
|
||||
|
||||
PR is the only way to make change to Higress project files. To help reviewers better get your purpose, PR description could not be too detailed. We encourage contributors to follow the [PR template](./.github/PULL_REQUEST_TEMPLATE.md) to finish the pull request.
|
||||
|
||||
### Pre-development preparation
|
||||
|
||||
```shell
|
||||
make prebuild && go mod tidy
|
||||
```
|
||||
|
||||
## Test case contribution
|
||||
|
||||
Any test case would be welcomed. Currently, Higress function test cases are high priority.
|
||||
|
||||
187
Makefile.core.mk
187
Makefile.core.mk
@@ -15,7 +15,9 @@ GO_LDFLAGS += -X $(VERSION_PACKAGE).higressVersion=$(shell cat VERSION) \
|
||||
|
||||
GO ?= go
|
||||
|
||||
export GOPROXY ?= https://proxy.golang.com.cn,direct
|
||||
export GOPROXY ?= https://proxy.golang.org,direct
|
||||
|
||||
TARGET_ARCH ?= amd64
|
||||
|
||||
GOARCH_LOCAL := $(TARGET_ARCH)
|
||||
GOOS_LOCAL := $(TARGET_OS)
|
||||
@@ -24,6 +26,8 @@ RELEASE_LDFLAGS='$(GO_LDFLAGS) -extldflags -static -s -w'
|
||||
export OUT:=$(TARGET_OUT)
|
||||
export OUT_LINUX:=$(TARGET_OUT_LINUX)
|
||||
|
||||
BUILDX_PLATFORM ?=
|
||||
|
||||
# If tag not explicitly set in users' .istiorc.mk or command line, default to the git sha.
|
||||
TAG ?= $(shell git rev-parse --verify HEAD)
|
||||
ifeq ($(TAG),)
|
||||
@@ -49,6 +53,7 @@ $(OUT):
|
||||
submodule:
|
||||
git submodule update --init
|
||||
|
||||
.PHONY: prebuild
|
||||
prebuild: submodule
|
||||
./tools/hack/prebuild.sh
|
||||
|
||||
@@ -67,21 +72,28 @@ build: prebuild $(OUT)
|
||||
build-linux: prebuild $(OUT)
|
||||
GOPROXY=$(GOPROXY) GOOS=linux GOARCH=$(GOARCH_LOCAL) LDFLAGS=$(RELEASE_LDFLAGS) tools/hack/gobuild.sh $(OUT_LINUX)/ $(HIGRESS_BINARIES)
|
||||
|
||||
$(AMD64_OUT_LINUX)/higress:
|
||||
GOPROXY=$(GOPROXY) GOOS=linux GOARCH=amd64 LDFLAGS=$(RELEASE_LDFLAGS) tools/hack/gobuild.sh ./out/linux_amd64/ $(HIGRESS_BINARIES)
|
||||
|
||||
$(ARM64_OUT_LINUX)/higress:
|
||||
GOPROXY=$(GOPROXY) GOOS=linux GOARCH=arm64 LDFLAGS=$(RELEASE_LDFLAGS) tools/hack/gobuild.sh ./out/linux_arm64/ $(HIGRESS_BINARIES)
|
||||
|
||||
.PHONY: build-hgctl
|
||||
build-hgctl: $(OUT)
|
||||
build-hgctl: prebuild $(OUT)
|
||||
GOPROXY=$(GOPROXY) GOOS=$(GOOS_LOCAL) GOARCH=$(GOARCH_LOCAL) LDFLAGS=$(RELEASE_LDFLAGS) tools/hack/gobuild.sh $(OUT)/ $(HGCTL_BINARIES)
|
||||
|
||||
.PHONY: build-linux-hgctl
|
||||
build-linux-hgctl: $(OUT)
|
||||
build-linux-hgctl: prebuild $(OUT)
|
||||
GOPROXY=$(GOPROXY) GOOS=linux GOARCH=$(GOARCH_LOCAL) LDFLAGS=$(RELEASE_LDFLAGS) tools/hack/gobuild.sh $(OUT_LINUX)/ $(HGCTL_BINARIES)
|
||||
|
||||
.PHONY: build-hgctl-multiarch
|
||||
build-hgctl-multiarch: $(OUT)
|
||||
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)
|
||||
# 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
|
||||
@@ -114,19 +126,45 @@ include docker/docker.mk
|
||||
|
||||
docker-build: docker.higress ## Build and push docker images to registry defined by $HUB and $TAG
|
||||
|
||||
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
|
||||
|
||||
external/package/envoy.tar.gz:
|
||||
cd external/proxy; BUILD_WITH_CONTAINER=1 make test_release
|
||||
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"
|
||||
|
||||
build-gateway: prebuild external/package/envoy.tar.gz
|
||||
cd external/istio; rm -rf out; GOOS_LOCAL=linux TARGET_OS=linux TARGET_ARCH=amd64 BUILD_WITH_CONTAINER=1 DOCKER_BUILD_VARIANTS=default DOCKER_TARGETS="docker.proxyv2" make docker
|
||||
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"
|
||||
|
||||
build-istio: prebuild
|
||||
cd external/istio; rm -rf out; GOOS_LOCAL=linux TARGET_OS=linux TARGET_ARCH=amd64 BUILD_WITH_CONTAINER=1 DOCKER_BUILD_VARIANTS=default DOCKER_TARGETS="docker.pilot" make docker
|
||||
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-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-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-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
|
||||
|
||||
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-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
|
||||
|
||||
build-wasmplugins:
|
||||
./tools/hack/build-wasm-plugins.sh
|
||||
|
||||
pre-install:
|
||||
cp api/kubernetes/customresourcedefinitions.gen.yaml helm/core/crds
|
||||
@@ -139,11 +177,13 @@ install: pre-install
|
||||
cd helm/higress; helm dependency build
|
||||
helm install higress helm/higress -n higress-system --create-namespace --set 'global.local=true'
|
||||
|
||||
ENVOY_LATEST_IMAGE_TAG ?= 1.0.0-rc
|
||||
ISTIO_LATEST_IMAGE_TAG ?= 1.0.0-rc
|
||||
ENVOY_LATEST_IMAGE_TAG ?= sha-eb1f993
|
||||
ISTIO_LATEST_IMAGE_TAG ?= sha-eb1f993
|
||||
|
||||
install-dev: pre-install
|
||||
helm install higress helm/core -n higress-system --create-namespace --set 'controller.tag=$(TAG)' --set 'gateway.replicas=1' --set 'gateway.tag=$(ENVOY_LATEST_IMAGE_TAG)' --set 'global.local=true'
|
||||
helm install higress helm/core -n higress-system --create-namespace --set 'controller.tag=$(TAG)' --set 'gateway.replicas=1' --set 'pilot.tag=$(ISTIO_LATEST_IMAGE_TAG)' --set 'gateway.tag=$(ENVOY_LATEST_IMAGE_TAG)' --set 'global.local=true'
|
||||
install-dev-wasmplugin: build-wasmplugins pre-install
|
||||
helm install higress helm/core -n higress-system --create-namespace --set 'controller.tag=$(TAG)' --set 'gateway.replicas=1' --set 'pilot.tag=$(ISTIO_LATEST_IMAGE_TAG)' --set 'gateway.tag=$(ENVOY_LATEST_IMAGE_TAG)' --set 'global.local=true' --set 'global.volumeWasmPlugins=true' --set 'global.onlyPushRouteCluster=false'
|
||||
|
||||
uninstall:
|
||||
helm uninstall higress -n higress-system
|
||||
@@ -193,9 +233,29 @@ include tools/lint.mk
|
||||
.PHONY: gateway-conformance-test
|
||||
gateway-conformance-test:
|
||||
|
||||
# ingress-conformance-test runs ingress api conformance tests.
|
||||
.PHONY: ingress-conformance-test
|
||||
ingress-conformance-test: $(tools/kind) delete-cluster create-cluster docker-build kube-load-image install-dev run-ingress-e2e-test delete-cluster
|
||||
# higress-conformance-test-prepare prepares the environment for higress conformance tests.
|
||||
.PHONY: higress-conformance-test-prepare
|
||||
higress-conformance-test-prepare: $(tools/kind) delete-cluster create-cluster docker-build kube-load-image install-dev
|
||||
|
||||
# higress-conformance-test runs ingress api conformance tests.
|
||||
.PHONY: higress-conformance-test
|
||||
higress-conformance-test: $(tools/kind) delete-cluster create-cluster docker-build kube-load-image install-dev run-higress-e2e-test delete-cluster
|
||||
|
||||
# higress-conformance-test-clean cleans the environment for higress conformance tests.
|
||||
.PHONY: higress-conformance-test-clean
|
||||
higress-conformance-test-clean: $(tools/kind) delete-cluster
|
||||
|
||||
# higress-wasmplugin-test-prepare prepares the environment for higress wasmplugin tests.
|
||||
.PHONY: higress-wasmplugin-test-prepare
|
||||
higress-wasmplugin-test-prepare: $(tools/kind) delete-cluster create-cluster docker-build kube-load-image install-dev-wasmplugin
|
||||
|
||||
# higress-wasmplugin-test runs ingress wasmplugin tests.
|
||||
.PHONY: higress-wasmplugin-test
|
||||
higress-wasmplugin-test: $(tools/kind) delete-cluster create-cluster docker-build kube-load-image install-dev-wasmplugin run-higress-e2e-test-wasmplugin delete-cluster
|
||||
|
||||
# higress-wasmplugin-test-clean cleans the environment for higress wasmplugin tests.
|
||||
.PHONY: higress-wasmplugin-test-clean
|
||||
higress-wasmplugin-test-clean: $(tools/kind) delete-cluster
|
||||
|
||||
# create-cluster creates a kube cluster with kind.
|
||||
.PHONY: create-cluster
|
||||
@@ -208,16 +268,101 @@ delete-cluster: $(tools/kind) ## Delete kind cluster.
|
||||
$(tools/kind) delete cluster --name higress
|
||||
|
||||
# kube-load-image loads a local built docker image into kube cluster.
|
||||
# dubbo-provider-demo和nacos-standlone-rc3的镜像已经上传到阿里云镜像库,第一次需要先拉到本地
|
||||
# docker pull registry.cn-hangzhou.aliyuncs.com/hinsteny/dubbo-provider-demo:0.0.1
|
||||
# docker pull registry.cn-hangzhou.aliyuncs.com/hinsteny/nacos-standlone-rc3:1.0.0-RC3
|
||||
.PHONY: kube-load-image
|
||||
kube-load-image: $(tools/kind) ## Install the Higress image to a kind cluster using the provided $IMAGE and $TAG.
|
||||
tools/hack/kind-load-image.sh higress-registry.cn-hangzhou.cr.aliyuncs.com/higress/higress $(TAG)
|
||||
tools/hack/docker-pull-image.sh higress-registry.cn-hangzhou.cr.aliyuncs.com/higress/dubbo-provider-demo 0.0.3-x86
|
||||
tools/hack/docker-pull-image.sh docker.io/alihigress/nacos-standlone-rc3 1.0.0-RC3
|
||||
tools/hack/docker-pull-image.sh docker.io/hashicorp/consul 1.16.0
|
||||
tools/hack/docker-pull-image.sh docker.io/charlie1380/eureka-registry-provider v0.3.0
|
||||
tools/hack/docker-pull-image.sh docker.io/bitinit/eureka latest
|
||||
tools/hack/docker-pull-image.sh docker.io/alihigress/httpbin 1.0.2
|
||||
tools/hack/kind-load-image.sh higress-registry.cn-hangzhou.cr.aliyuncs.com/higress/dubbo-provider-demo 0.0.3-x86
|
||||
tools/hack/kind-load-image.sh docker.io/alihigress/nacos-standlone-rc3 1.0.0-RC3
|
||||
tools/hack/kind-load-image.sh docker.io/hashicorp/consul 1.16.0
|
||||
tools/hack/kind-load-image.sh docker.io/alihigress/httpbin 1.0.2
|
||||
tools/hack/kind-load-image.sh docker.io/charlie1380/eureka-registry-provider v0.3.0
|
||||
tools/hack/kind-load-image.sh docker.io/bitinit/eureka latest
|
||||
|
||||
# run-ingress-e2e-test starts to run ingress e2e tests.
|
||||
.PHONY: run-ingress-e2e-test
|
||||
run-ingress-e2e-test:
|
||||
# run-higress-e2e-test-setup starts to setup ingress e2e tests.
|
||||
.PHONT: run-higress-e2e-test-setup
|
||||
run-higress-e2e-test-setup:
|
||||
@echo -e "\n\033[36mRunning higress conformance tests...\033[0m"
|
||||
@echo -e "\n\033[36mWaiting higress-controller to be ready...\033[0m\n"
|
||||
kubectl wait --timeout=10m -n higress-system deployment/higress-controller --for=condition=Available
|
||||
@echo -e "\n\033[36mWaiting higress-gateway to be ready...\033[0m\n"
|
||||
kubectl wait --timeout=10m -n higress-system deployment/higress-gateway --for=condition=Available
|
||||
go test -v -tags conformance ./test/ingress/e2e_test.go --ingress-class=higress --debug=true
|
||||
go test -v -tags conformance ./test/e2e/e2e_test.go --ingress-class=higress --debug=true --test-area=setup
|
||||
|
||||
# run-higress-e2e-test starts to run ingress e2e tests.
|
||||
.PHONY: run-higress-e2e-test
|
||||
run-higress-e2e-test:
|
||||
@echo -e "\n\033[36mRunning higress conformance tests...\033[0m"
|
||||
@echo -e "\n\033[36mWaiting higress-controller to be ready...\033[0m\n"
|
||||
kubectl wait --timeout=10m -n higress-system deployment/higress-controller --for=condition=Available
|
||||
@echo -e "\n\033[36mWaiting higress-gateway to be ready...\033[0m\n"
|
||||
kubectl wait --timeout=10m -n higress-system deployment/higress-gateway --for=condition=Available
|
||||
go test -v -tags conformance ./test/e2e/e2e_test.go --ingress-class=higress --debug=true --test-area=all
|
||||
|
||||
# run-higress-e2e-test-run starts to run ingress e2e conformance tests.
|
||||
.PHONY: run-higress-e2e-test-run
|
||||
run-higress-e2e-test-run:
|
||||
@echo -e "\n\033[36mRunning higress conformance tests...\033[0m"
|
||||
@echo -e "\n\033[36mWaiting higress-controller to be ready...\033[0m\n"
|
||||
kubectl wait --timeout=10m -n higress-system deployment/higress-controller --for=condition=Available
|
||||
@echo -e "\n\033[36mWaiting higress-gateway to be ready...\033[0m\n"
|
||||
kubectl wait --timeout=10m -n higress-system deployment/higress-gateway --for=condition=Available
|
||||
go test -v -tags conformance ./test/e2e/e2e_test.go --ingress-class=higress --debug=true --test-area=run
|
||||
|
||||
# run-higress-e2e-test-clean starts to clean ingress e2e tests.
|
||||
.PHONY: run-higress-e2e-test-clean
|
||||
run-higress-e2e-test-clean:
|
||||
@echo -e "\n\033[36mRunning higress conformance tests...\033[0m"
|
||||
@echo -e "\n\033[36mWaiting higress-controller to be ready...\033[0m\n"
|
||||
kubectl wait --timeout=10m -n higress-system deployment/higress-controller --for=condition=Available
|
||||
@echo -e "\n\033[36mWaiting higress-gateway to be ready...\033[0m\n"
|
||||
kubectl wait --timeout=10m -n higress-system deployment/higress-gateway --for=condition=Available
|
||||
go test -v -tags conformance ./test/e2e/e2e_test.go --ingress-class=higress --debug=true --test-area=clean
|
||||
|
||||
# run-higress-e2e-test-wasmplugin-setup starts to prepare ingress e2e tests.
|
||||
.PHONY: run-higress-e2e-test-wasmplugin-setup
|
||||
run-higress-e2e-test-wasmplugin-setup:
|
||||
@echo -e "\n\033[36mRunning higress conformance tests...\033[0m"
|
||||
@echo -e "\n\033[36mWaiting higress-controller to be ready...\033[0m\n"
|
||||
kubectl wait --timeout=10m -n higress-system deployment/higress-controller --for=condition=Available
|
||||
@echo -e "\n\033[36mWaiting higress-gateway to be ready...\033[0m\n"
|
||||
kubectl wait --timeout=10m -n higress-system deployment/higress-gateway --for=condition=Available
|
||||
go test -v -tags conformance ./test/e2e/e2e_test.go -isWasmPluginTest=true -wasmPluginType=$(PLUGIN_TYPE) -wasmPluginName=$(PLUGIN_NAME) --ingress-class=higress --debug=true --test-area=setup
|
||||
|
||||
# run-higress-e2e-test-wasmplugin starts to run ingress e2e tests.
|
||||
.PHONY: run-higress-e2e-test-wasmplugin
|
||||
run-higress-e2e-test-wasmplugin:
|
||||
@echo -e "\n\033[36mRunning higress conformance tests...\033[0m"
|
||||
@echo -e "\n\033[36mWaiting higress-controller to be ready...\033[0m\n"
|
||||
kubectl wait --timeout=10m -n higress-system deployment/higress-controller --for=condition=Available
|
||||
@echo -e "\n\033[36mWaiting higress-gateway to be ready...\033[0m\n"
|
||||
kubectl wait --timeout=10m -n higress-system deployment/higress-gateway --for=condition=Available
|
||||
go test -v -tags conformance ./test/e2e/e2e_test.go -isWasmPluginTest=true -wasmPluginType=$(PLUGIN_TYPE) -wasmPluginName=$(PLUGIN_NAME) --ingress-class=higress --debug=true --test-area=all
|
||||
|
||||
# run-higress-e2e-test-wasmplugin-run starts to run ingress e2e conformance tests.
|
||||
.PHONY: run-higress-e2e-test-wasmplugin-run
|
||||
run-higress-e2e-test-wasmplugin-run:
|
||||
@echo -e "\n\033[36mRunning higress conformance tests...\033[0m"
|
||||
@echo -e "\n\033[36mWaiting higress-controller to be ready...\033[0m\n"
|
||||
kubectl wait --timeout=10m -n higress-system deployment/higress-controller --for=condition=Available
|
||||
@echo -e "\n\033[36mWaiting higress-gateway to be ready...\033[0m\n"
|
||||
kubectl wait --timeout=10m -n higress-system deployment/higress-gateway --for=condition=Available
|
||||
go test -v -tags conformance ./test/e2e/e2e_test.go -isWasmPluginTest=true -wasmPluginType=$(PLUGIN_TYPE) -wasmPluginName=$(PLUGIN_NAME) --ingress-class=higress --debug=true --test-area=run
|
||||
|
||||
# run-higress-e2e-test-wasmplugin-clean starts to clean ingress e2e tests.
|
||||
.PHONY: run-higress-e2e-test-wasmplugin-clean
|
||||
run-higress-e2e-test-wasmplugin-clean:
|
||||
@echo -e "\n\033[36mRunning higress conformance tests...\033[0m"
|
||||
@echo -e "\n\033[36mWaiting higress-controller to be ready...\033[0m\n"
|
||||
kubectl wait --timeout=10m -n higress-system deployment/higress-controller --for=condition=Available
|
||||
@echo -e "\n\033[36mWaiting higress-gateway to be ready...\033[0m\n"
|
||||
kubectl wait --timeout=10m -n higress-system deployment/higress-gateway --for=condition=Available
|
||||
go test -v -tags conformance ./test/e2e/e2e_test.go -isWasmPluginTest=true -wasmPluginType=$(PLUGIN_TYPE) -wasmPluginName=$(PLUGIN_NAME) --ingress-class=higress --debug=true --test-area=clean
|
||||
|
||||
@@ -121,13 +121,7 @@ Higress 是基于阿里内部两年多的 Envoy Gateway 实践沉淀,以开源
|
||||
|
||||
### 联系我们
|
||||
|
||||
- Mailing list: higress@googlegroups.com
|
||||
|
||||
社区交流群:
|
||||
|
||||

|
||||

|
||||
|
||||
|
||||
开发者群:
|
||||
|
||||

|
||||
|
||||
@@ -32,6 +32,7 @@ Powered by [Istio](https://github.com/istio/istio) and [Envoy](https://github.co
|
||||
- [**Use Cases**](#use-cases)
|
||||
- [**Higress Features**](#higress-features)
|
||||
- [**Quick Start**](https://higress.io/en-us/docs/user/quickstart)
|
||||
- [**Community**](#community)
|
||||
- [**Thanks**](#thanks)
|
||||
|
||||
## Use Cases
|
||||
@@ -74,6 +75,10 @@ Powered by [Istio](https://github.com/istio/istio) and [Envoy](https://github.co
|
||||
|
||||
Provides JWT, OIDC, custom authentication and authentication, deeply integrates open source web application firewall.
|
||||
|
||||
## Community
|
||||
|
||||
[Slack](https://w1689142780-euk177225.slack.com/archives/C05GEL4TGTG): to get invited go [here](https://communityinviter.com/apps/w1689142780-euk177225/higress).
|
||||
|
||||
### Thanks
|
||||
|
||||
Higress would not be possible without the valuable open-source work of projects in the community. We would like to extend a special thank-you to Envoy and Istio.
|
||||
|
||||
@@ -171,7 +171,7 @@ type WasmPlugin struct {
|
||||
DefaultConfig *types.Struct `protobuf:"bytes,101,opt,name=default_config,json=defaultConfig,proto3" json:"default_config,omitempty"`
|
||||
// Extended by Higress, matching rules take effect
|
||||
MatchRules []*MatchRule `protobuf:"bytes,102,rep,name=match_rules,json=matchRules,proto3" json:"match_rules,omitempty"`
|
||||
// diable the default config
|
||||
// disable the default config
|
||||
DefaultConfigDisable bool `protobuf:"varint,103,opt,name=default_config_disable,json=defaultConfigDisable,proto3" json:"default_config_disable,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
|
||||
@@ -104,7 +104,7 @@ message WasmPlugin {
|
||||
google.protobuf.Struct default_config = 101;
|
||||
// Extended by Higress, matching rules take effect
|
||||
repeated MatchRule match_rules = 102;
|
||||
// diable the default config
|
||||
// disable the default config
|
||||
bool default_config_disable = 103;
|
||||
}
|
||||
|
||||
|
||||
@@ -104,6 +104,93 @@ spec:
|
||||
subresources:
|
||||
status: {}
|
||||
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
"helm.sh/resource-policy": keep
|
||||
name: http2rpcs.networking.higress.io
|
||||
spec:
|
||||
group: networking.higress.io
|
||||
names:
|
||||
categories:
|
||||
- higress-io
|
||||
kind: Http2Rpc
|
||||
listKind: Http2RpcList
|
||||
plural: http2rpcs
|
||||
singular: http2rpc
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- name: v1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
properties:
|
||||
spec:
|
||||
oneOf:
|
||||
- not:
|
||||
anyOf:
|
||||
- required:
|
||||
- dubbo
|
||||
- required:
|
||||
- grpc
|
||||
- required:
|
||||
- dubbo
|
||||
- required:
|
||||
- grpc
|
||||
properties:
|
||||
dubbo:
|
||||
properties:
|
||||
group:
|
||||
type: string
|
||||
methods:
|
||||
items:
|
||||
properties:
|
||||
headersAttach:
|
||||
type: string
|
||||
httpMethods:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
httpPath:
|
||||
type: string
|
||||
paramFromEntireBody:
|
||||
properties:
|
||||
paramType:
|
||||
type: string
|
||||
type: object
|
||||
params:
|
||||
items:
|
||||
properties:
|
||||
paramKey:
|
||||
type: string
|
||||
paramSource:
|
||||
type: string
|
||||
paramType:
|
||||
type: string
|
||||
type: object
|
||||
type: array
|
||||
serviceMethod:
|
||||
type: string
|
||||
type: object
|
||||
type: array
|
||||
service:
|
||||
type: string
|
||||
version:
|
||||
type: string
|
||||
type: object
|
||||
grpc:
|
||||
type: object
|
||||
type: object
|
||||
status:
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources:
|
||||
status: {}
|
||||
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
@@ -131,8 +218,17 @@ spec:
|
||||
registries:
|
||||
items:
|
||||
properties:
|
||||
authSecretName:
|
||||
type: string
|
||||
consulDatacenter:
|
||||
type: string
|
||||
consulNamespace:
|
||||
type: string
|
||||
consulRefreshInterval:
|
||||
format: int64
|
||||
type: integer
|
||||
consulServiceTag:
|
||||
type: string
|
||||
domain:
|
||||
type: string
|
||||
nacosAccessKey:
|
||||
|
||||
1910
api/networking/v1/http_2_rpc.pb.go
Normal file
1910
api/networking/v1/http_2_rpc.pb.go
Normal file
File diff suppressed because it is too large
Load Diff
79
api/networking/v1/http_2_rpc.proto
Normal file
79
api/networking/v1/http_2_rpc.proto
Normal file
@@ -0,0 +1,79 @@
|
||||
// Copyright (c) 2022 Alibaba Group Holding Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
syntax = "proto3";
|
||||
|
||||
import "google/api/field_behavior.proto";
|
||||
|
||||
// $schema: higress.networking.v1.Http2Rpc
|
||||
// $title: Http2Rpc
|
||||
// $description: Configuration affecting service discovery from multi registries
|
||||
// $mode: none
|
||||
|
||||
package higress.networking.v1;
|
||||
|
||||
option go_package = "github.com/alibaba/higress/api/networking/v1";
|
||||
|
||||
// <!-- crd generation tags
|
||||
// +cue-gen:Http2Rpc:groupName:networking.higress.io
|
||||
// +cue-gen:Http2Rpc:version:v1
|
||||
// +cue-gen:Http2Rpc:storageVersion
|
||||
// +cue-gen:Http2Rpc:annotations:helm.sh/resource-policy=keep
|
||||
// +cue-gen:Http2Rpc:subresource:status
|
||||
// +cue-gen:Http2Rpc:scope:Namespaced
|
||||
// +cue-gen:Http2Rpc:resource:categories=higress-io,plural=http2rpcs
|
||||
// +cue-gen:Http2Rpc:preserveUnknownFields:false
|
||||
// -->
|
||||
//
|
||||
// <!-- go code generation tags
|
||||
// +kubetype-gen
|
||||
// +kubetype-gen:groupVersion=networking.higress.io/v1
|
||||
// +genclient
|
||||
// +k8s:deepcopy-gen=true
|
||||
// -->
|
||||
message Http2Rpc {
|
||||
oneof destination {
|
||||
DubboService dubbo = 1;
|
||||
GrpcService grpc = 2;
|
||||
}
|
||||
}
|
||||
|
||||
message DubboService {
|
||||
string service = 1 [(google.api.field_behavior) = REQUIRED];
|
||||
string version = 2 [(google.api.field_behavior) = REQUIRED];
|
||||
string group = 3 [(google.api.field_behavior) = OPTIONAL];
|
||||
repeated Method methods = 4 [(google.api.field_behavior) = REQUIRED];
|
||||
}
|
||||
|
||||
message Method {
|
||||
string service_method = 1 [(google.api.field_behavior) = REQUIRED];
|
||||
string headers_attach = 2 [(google.api.field_behavior) = OPTIONAL];
|
||||
string http_path = 3 [(google.api.field_behavior) = REQUIRED];
|
||||
repeated string http_methods = 4 [(google.api.field_behavior) = REQUIRED];
|
||||
repeated Param params = 5;
|
||||
ParamFromEntireBody paramFromEntireBody = 6 [(google.api.field_behavior) = OPTIONAL];
|
||||
}
|
||||
|
||||
message Param {
|
||||
string param_source = 1 [(google.api.field_behavior) = REQUIRED];
|
||||
string param_key = 2 [(google.api.field_behavior) = REQUIRED];
|
||||
string param_type = 3 [(google.api.field_behavior) = REQUIRED];
|
||||
}
|
||||
|
||||
message ParamFromEntireBody {
|
||||
string param_type = 1 [(google.api.field_behavior) = REQUIRED];
|
||||
}
|
||||
|
||||
message GrpcService {
|
||||
}
|
||||
142
api/networking/v1/http_2_rpc_deepcopy.gen.go
Normal file
142
api/networking/v1/http_2_rpc_deepcopy.gen.go
Normal file
@@ -0,0 +1,142 @@
|
||||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||
// source: networking/v1/http_2_rpc.proto
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
fmt "fmt"
|
||||
proto "github.com/gogo/protobuf/proto"
|
||||
_ "istio.io/gogo-genproto/googleapis/google/api"
|
||||
math "math"
|
||||
)
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
|
||||
// DeepCopyInto supports using Http2Rpc within kubernetes types, where deepcopy-gen is used.
|
||||
func (in *Http2Rpc) DeepCopyInto(out *Http2Rpc) {
|
||||
p := proto.Clone(in).(*Http2Rpc)
|
||||
*out = *p
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Http2Rpc. Required by controller-gen.
|
||||
func (in *Http2Rpc) DeepCopy() *Http2Rpc {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(Http2Rpc)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new Http2Rpc. Required by controller-gen.
|
||||
func (in *Http2Rpc) DeepCopyInterface() interface{} {
|
||||
return in.DeepCopy()
|
||||
}
|
||||
|
||||
// DeepCopyInto supports using DubboService within kubernetes types, where deepcopy-gen is used.
|
||||
func (in *DubboService) DeepCopyInto(out *DubboService) {
|
||||
p := proto.Clone(in).(*DubboService)
|
||||
*out = *p
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DubboService. Required by controller-gen.
|
||||
func (in *DubboService) DeepCopy() *DubboService {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(DubboService)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new DubboService. Required by controller-gen.
|
||||
func (in *DubboService) DeepCopyInterface() interface{} {
|
||||
return in.DeepCopy()
|
||||
}
|
||||
|
||||
// DeepCopyInto supports using Method within kubernetes types, where deepcopy-gen is used.
|
||||
func (in *Method) DeepCopyInto(out *Method) {
|
||||
p := proto.Clone(in).(*Method)
|
||||
*out = *p
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Method. Required by controller-gen.
|
||||
func (in *Method) DeepCopy() *Method {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(Method)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new Method. Required by controller-gen.
|
||||
func (in *Method) DeepCopyInterface() interface{} {
|
||||
return in.DeepCopy()
|
||||
}
|
||||
|
||||
// DeepCopyInto supports using Param within kubernetes types, where deepcopy-gen is used.
|
||||
func (in *Param) DeepCopyInto(out *Param) {
|
||||
p := proto.Clone(in).(*Param)
|
||||
*out = *p
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Param. Required by controller-gen.
|
||||
func (in *Param) DeepCopy() *Param {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(Param)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new Param. Required by controller-gen.
|
||||
func (in *Param) DeepCopyInterface() interface{} {
|
||||
return in.DeepCopy()
|
||||
}
|
||||
|
||||
// DeepCopyInto supports using ParamFromEntireBody within kubernetes types, where deepcopy-gen is used.
|
||||
func (in *ParamFromEntireBody) DeepCopyInto(out *ParamFromEntireBody) {
|
||||
p := proto.Clone(in).(*ParamFromEntireBody)
|
||||
*out = *p
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ParamFromEntireBody. Required by controller-gen.
|
||||
func (in *ParamFromEntireBody) DeepCopy() *ParamFromEntireBody {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ParamFromEntireBody)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new ParamFromEntireBody. Required by controller-gen.
|
||||
func (in *ParamFromEntireBody) DeepCopyInterface() interface{} {
|
||||
return in.DeepCopy()
|
||||
}
|
||||
|
||||
// DeepCopyInto supports using GrpcService within kubernetes types, where deepcopy-gen is used.
|
||||
func (in *GrpcService) DeepCopyInto(out *GrpcService) {
|
||||
p := proto.Clone(in).(*GrpcService)
|
||||
*out = *p
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GrpcService. Required by controller-gen.
|
||||
func (in *GrpcService) DeepCopy() *GrpcService {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(GrpcService)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new GrpcService. Required by controller-gen.
|
||||
func (in *GrpcService) DeepCopyInterface() interface{} {
|
||||
return in.DeepCopy()
|
||||
}
|
||||
89
api/networking/v1/http_2_rpc_json.gen.go
Normal file
89
api/networking/v1/http_2_rpc_json.gen.go
Normal file
@@ -0,0 +1,89 @@
|
||||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||
// source: networking/v1/http_2_rpc.proto
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
bytes "bytes"
|
||||
fmt "fmt"
|
||||
github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb"
|
||||
proto "github.com/gogo/protobuf/proto"
|
||||
_ "istio.io/gogo-genproto/googleapis/google/api"
|
||||
math "math"
|
||||
)
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
|
||||
// MarshalJSON is a custom marshaler for Http2Rpc
|
||||
func (this *Http2Rpc) MarshalJSON() ([]byte, error) {
|
||||
str, err := Http_2RpcMarshaler.MarshalToString(this)
|
||||
return []byte(str), err
|
||||
}
|
||||
|
||||
// UnmarshalJSON is a custom unmarshaler for Http2Rpc
|
||||
func (this *Http2Rpc) UnmarshalJSON(b []byte) error {
|
||||
return Http_2RpcUnmarshaler.Unmarshal(bytes.NewReader(b), this)
|
||||
}
|
||||
|
||||
// MarshalJSON is a custom marshaler for DubboService
|
||||
func (this *DubboService) MarshalJSON() ([]byte, error) {
|
||||
str, err := Http_2RpcMarshaler.MarshalToString(this)
|
||||
return []byte(str), err
|
||||
}
|
||||
|
||||
// UnmarshalJSON is a custom unmarshaler for DubboService
|
||||
func (this *DubboService) UnmarshalJSON(b []byte) error {
|
||||
return Http_2RpcUnmarshaler.Unmarshal(bytes.NewReader(b), this)
|
||||
}
|
||||
|
||||
// MarshalJSON is a custom marshaler for Method
|
||||
func (this *Method) MarshalJSON() ([]byte, error) {
|
||||
str, err := Http_2RpcMarshaler.MarshalToString(this)
|
||||
return []byte(str), err
|
||||
}
|
||||
|
||||
// UnmarshalJSON is a custom unmarshaler for Method
|
||||
func (this *Method) UnmarshalJSON(b []byte) error {
|
||||
return Http_2RpcUnmarshaler.Unmarshal(bytes.NewReader(b), this)
|
||||
}
|
||||
|
||||
// MarshalJSON is a custom marshaler for Param
|
||||
func (this *Param) MarshalJSON() ([]byte, error) {
|
||||
str, err := Http_2RpcMarshaler.MarshalToString(this)
|
||||
return []byte(str), err
|
||||
}
|
||||
|
||||
// UnmarshalJSON is a custom unmarshaler for Param
|
||||
func (this *Param) UnmarshalJSON(b []byte) error {
|
||||
return Http_2RpcUnmarshaler.Unmarshal(bytes.NewReader(b), this)
|
||||
}
|
||||
|
||||
// MarshalJSON is a custom marshaler for ParamFromEntireBody
|
||||
func (this *ParamFromEntireBody) MarshalJSON() ([]byte, error) {
|
||||
str, err := Http_2RpcMarshaler.MarshalToString(this)
|
||||
return []byte(str), err
|
||||
}
|
||||
|
||||
// UnmarshalJSON is a custom unmarshaler for ParamFromEntireBody
|
||||
func (this *ParamFromEntireBody) UnmarshalJSON(b []byte) error {
|
||||
return Http_2RpcUnmarshaler.Unmarshal(bytes.NewReader(b), this)
|
||||
}
|
||||
|
||||
// MarshalJSON is a custom marshaler for GrpcService
|
||||
func (this *GrpcService) MarshalJSON() ([]byte, error) {
|
||||
str, err := Http_2RpcMarshaler.MarshalToString(this)
|
||||
return []byte(str), err
|
||||
}
|
||||
|
||||
// UnmarshalJSON is a custom unmarshaler for GrpcService
|
||||
func (this *GrpcService) UnmarshalJSON(b []byte) error {
|
||||
return Http_2RpcUnmarshaler.Unmarshal(bytes.NewReader(b), this)
|
||||
}
|
||||
|
||||
var (
|
||||
Http_2RpcMarshaler = &github_com_gogo_protobuf_jsonpb.Marshaler{}
|
||||
Http_2RpcUnmarshaler = &github_com_gogo_protobuf_jsonpb.Unmarshaler{AllowUnknownFields: true}
|
||||
)
|
||||
@@ -88,22 +88,26 @@ func (m *McpBridge) GetRegistries() []*RegistryConfig {
|
||||
}
|
||||
|
||||
type RegistryConfig struct {
|
||||
Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
|
||||
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Domain string `protobuf:"bytes,3,opt,name=domain,proto3" json:"domain,omitempty"`
|
||||
Port uint32 `protobuf:"varint,4,opt,name=port,proto3" json:"port,omitempty"`
|
||||
NacosAddressServer string `protobuf:"bytes,5,opt,name=nacosAddressServer,proto3" json:"nacosAddressServer,omitempty"`
|
||||
NacosAccessKey string `protobuf:"bytes,6,opt,name=nacosAccessKey,proto3" json:"nacosAccessKey,omitempty"`
|
||||
NacosSecretKey string `protobuf:"bytes,7,opt,name=nacosSecretKey,proto3" json:"nacosSecretKey,omitempty"`
|
||||
NacosNamespaceId string `protobuf:"bytes,8,opt,name=nacosNamespaceId,proto3" json:"nacosNamespaceId,omitempty"`
|
||||
NacosNamespace string `protobuf:"bytes,9,opt,name=nacosNamespace,proto3" json:"nacosNamespace,omitempty"`
|
||||
NacosGroups []string `protobuf:"bytes,10,rep,name=nacosGroups,proto3" json:"nacosGroups,omitempty"`
|
||||
NacosRefreshInterval int64 `protobuf:"varint,11,opt,name=nacosRefreshInterval,proto3" json:"nacosRefreshInterval,omitempty"`
|
||||
ConsulNamespace string `protobuf:"bytes,12,opt,name=consulNamespace,proto3" json:"consulNamespace,omitempty"`
|
||||
ZkServicesPath []string `protobuf:"bytes,13,rep,name=zkServicesPath,proto3" json:"zkServicesPath,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
|
||||
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Domain string `protobuf:"bytes,3,opt,name=domain,proto3" json:"domain,omitempty"`
|
||||
Port uint32 `protobuf:"varint,4,opt,name=port,proto3" json:"port,omitempty"`
|
||||
NacosAddressServer string `protobuf:"bytes,5,opt,name=nacosAddressServer,proto3" json:"nacosAddressServer,omitempty"`
|
||||
NacosAccessKey string `protobuf:"bytes,6,opt,name=nacosAccessKey,proto3" json:"nacosAccessKey,omitempty"`
|
||||
NacosSecretKey string `protobuf:"bytes,7,opt,name=nacosSecretKey,proto3" json:"nacosSecretKey,omitempty"`
|
||||
NacosNamespaceId string `protobuf:"bytes,8,opt,name=nacosNamespaceId,proto3" json:"nacosNamespaceId,omitempty"`
|
||||
NacosNamespace string `protobuf:"bytes,9,opt,name=nacosNamespace,proto3" json:"nacosNamespace,omitempty"`
|
||||
NacosGroups []string `protobuf:"bytes,10,rep,name=nacosGroups,proto3" json:"nacosGroups,omitempty"`
|
||||
NacosRefreshInterval int64 `protobuf:"varint,11,opt,name=nacosRefreshInterval,proto3" json:"nacosRefreshInterval,omitempty"`
|
||||
ConsulNamespace string `protobuf:"bytes,12,opt,name=consulNamespace,proto3" json:"consulNamespace,omitempty"`
|
||||
ZkServicesPath []string `protobuf:"bytes,13,rep,name=zkServicesPath,proto3" json:"zkServicesPath,omitempty"`
|
||||
ConsulDatacenter string `protobuf:"bytes,14,opt,name=consulDatacenter,proto3" json:"consulDatacenter,omitempty"`
|
||||
ConsulServiceTag string `protobuf:"bytes,15,opt,name=consulServiceTag,proto3" json:"consulServiceTag,omitempty"`
|
||||
ConsulRefreshInterval int64 `protobuf:"varint,16,opt,name=consulRefreshInterval,proto3" json:"consulRefreshInterval,omitempty"`
|
||||
AuthSecretName string `protobuf:"bytes,17,opt,name=authSecretName,proto3" json:"authSecretName,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *RegistryConfig) Reset() { *m = RegistryConfig{} }
|
||||
@@ -230,6 +234,34 @@ func (m *RegistryConfig) GetZkServicesPath() []string {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *RegistryConfig) GetConsulDatacenter() string {
|
||||
if m != nil {
|
||||
return m.ConsulDatacenter
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *RegistryConfig) GetConsulServiceTag() string {
|
||||
if m != nil {
|
||||
return m.ConsulServiceTag
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *RegistryConfig) GetConsulRefreshInterval() int64 {
|
||||
if m != nil {
|
||||
return m.ConsulRefreshInterval
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *RegistryConfig) GetAuthSecretName() string {
|
||||
if m != nil {
|
||||
return m.AuthSecretName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*McpBridge)(nil), "higress.networking.v1.McpBridge")
|
||||
proto.RegisterType((*RegistryConfig)(nil), "higress.networking.v1.RegistryConfig")
|
||||
@@ -238,34 +270,37 @@ func init() {
|
||||
func init() { proto.RegisterFile("networking/v1/mcp_bridge.proto", fileDescriptor_3fcc59a15c34642d) }
|
||||
|
||||
var fileDescriptor_3fcc59a15c34642d = []byte{
|
||||
// 421 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x92, 0xd1, 0x8a, 0xd4, 0x30,
|
||||
0x14, 0x86, 0xc9, 0x76, 0x1c, 0x9d, 0x8c, 0xbb, 0x4a, 0x50, 0x08, 0x22, 0x63, 0x59, 0x50, 0x8a,
|
||||
0x48, 0xcb, 0xae, 0x77, 0xde, 0xed, 0x88, 0xc8, 0x22, 0x8a, 0x74, 0xef, 0xbc, 0x59, 0xd2, 0xf4,
|
||||
0x4c, 0x1a, 0xb6, 0x4d, 0x42, 0x92, 0xa9, 0x8c, 0x4f, 0xe8, 0xa5, 0x8f, 0x20, 0x7d, 0x04, 0x9f,
|
||||
0x40, 0x9a, 0x59, 0xbb, 0x9d, 0x71, 0xee, 0xda, 0xef, 0x7c, 0xf9, 0x73, 0x08, 0x3f, 0x5e, 0x28,
|
||||
0xf0, 0xdf, 0xb5, 0xbd, 0x91, 0x4a, 0x64, 0xed, 0x59, 0xd6, 0x70, 0x73, 0x5d, 0x58, 0x59, 0x0a,
|
||||
0x48, 0x8d, 0xd5, 0x5e, 0x93, 0xa7, 0x95, 0x14, 0x16, 0x9c, 0x4b, 0xef, 0xbc, 0xb4, 0x3d, 0x7b,
|
||||
0xf6, 0x42, 0x68, 0x2d, 0x6a, 0xc8, 0x98, 0x91, 0xd9, 0x4a, 0x42, 0x5d, 0x5e, 0x17, 0x50, 0xb1,
|
||||
0x56, 0x6a, 0xbb, 0x3d, 0x77, 0x9a, 0xe3, 0xd9, 0x67, 0x6e, 0x96, 0x21, 0x8a, 0x7c, 0xc0, 0xd8,
|
||||
0x82, 0x90, 0xce, 0x5b, 0x09, 0x8e, 0xa2, 0x38, 0x4a, 0xe6, 0xe7, 0x2f, 0xd3, 0x83, 0xc9, 0x69,
|
||||
0xbe, 0x15, 0x37, 0xef, 0xb5, 0x5a, 0x49, 0x91, 0x8f, 0x0e, 0x9e, 0xfe, 0x89, 0xf0, 0xc9, 0xee,
|
||||
0x98, 0x50, 0x3c, 0xf1, 0x1b, 0x03, 0x14, 0xc5, 0x28, 0x99, 0x2d, 0x27, 0xdd, 0x05, 0x3a, 0xca,
|
||||
0x03, 0x21, 0x04, 0x4f, 0x14, 0x6b, 0x80, 0x1e, 0xf5, 0x93, 0x3c, 0x7c, 0x93, 0xe7, 0x78, 0x5a,
|
||||
0xea, 0x86, 0x49, 0x45, 0xa3, 0x91, 0x7f, 0xcb, 0xfa, 0x2c, 0xa3, 0xad, 0xa7, 0x93, 0x18, 0x25,
|
||||
0xc7, 0xff, 0xb2, 0x7a, 0x42, 0x52, 0x4c, 0x14, 0xe3, 0xda, 0x5d, 0x94, 0x65, 0xbf, 0xf1, 0x15,
|
||||
0xd8, 0x16, 0x2c, 0xbd, 0x17, 0x92, 0x0f, 0x4c, 0xc8, 0x2b, 0x7c, 0xb2, 0xa5, 0x9c, 0x83, 0x73,
|
||||
0x9f, 0x60, 0x43, 0xa7, 0xc1, 0xdd, 0xa3, 0x83, 0x77, 0x05, 0xdc, 0x82, 0xef, 0xbd, 0xfb, 0x23,
|
||||
0x6f, 0xa0, 0xe4, 0x35, 0x7e, 0x1c, 0xc8, 0x17, 0xd6, 0x80, 0x33, 0x8c, 0xc3, 0x65, 0x49, 0x1f,
|
||||
0x04, 0xf3, 0x3f, 0x3e, 0x64, 0x0e, 0x8c, 0xce, 0x46, 0x99, 0x03, 0x25, 0x31, 0x9e, 0x07, 0xf2,
|
||||
0xd1, 0xea, 0xb5, 0x71, 0x14, 0xc7, 0x51, 0x32, 0xcb, 0xc7, 0x88, 0x9c, 0xe3, 0x27, 0xe1, 0x37,
|
||||
0x87, 0x95, 0x05, 0x57, 0x5d, 0x2a, 0x0f, 0xb6, 0x65, 0x35, 0x9d, 0xc7, 0x28, 0x89, 0xf2, 0x83,
|
||||
0x33, 0x92, 0xe0, 0x47, 0x5c, 0x2b, 0xb7, 0xae, 0xef, 0xae, 0x7f, 0x18, 0xae, 0xdf, 0xc7, 0xfd,
|
||||
0x9e, 0x3f, 0x6e, 0xfa, 0xf7, 0x92, 0x1c, 0xdc, 0x57, 0xe6, 0x2b, 0x7a, 0x1c, 0x56, 0xd8, 0xa3,
|
||||
0xcb, 0x77, 0x3f, 0xbb, 0x05, 0xfa, 0xd5, 0x2d, 0xd0, 0xef, 0x6e, 0x81, 0xbe, 0xbd, 0x11, 0xd2,
|
||||
0x57, 0xeb, 0x22, 0xe5, 0xba, 0xc9, 0x58, 0x2d, 0x0b, 0x56, 0xb0, 0xec, 0xb6, 0x47, 0xa1, 0x8b,
|
||||
0x3b, 0x6d, 0x2e, 0xa6, 0xa1, 0x8b, 0x6f, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0xb9, 0x6f, 0xf7,
|
||||
0xf0, 0xe5, 0x02, 0x00, 0x00,
|
||||
// 477 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x93, 0xd1, 0x6e, 0xd3, 0x30,
|
||||
0x14, 0x86, 0x95, 0xb5, 0x2b, 0xd4, 0x65, 0xdd, 0xb0, 0x98, 0x64, 0x21, 0x54, 0xa2, 0x49, 0xa0,
|
||||
0x08, 0xa1, 0x44, 0x1b, 0x5c, 0x71, 0xb7, 0x02, 0x42, 0x13, 0x02, 0xa1, 0x8c, 0x2b, 0x6e, 0x26,
|
||||
0xc7, 0x39, 0x75, 0xac, 0x26, 0x71, 0x64, 0xbb, 0x41, 0xe5, 0x89, 0x78, 0x14, 0x2e, 0x79, 0x04,
|
||||
0xd4, 0x27, 0x41, 0x76, 0x4a, 0x9a, 0x86, 0xde, 0x25, 0xdf, 0xf9, 0xfd, 0x9f, 0xf3, 0x3b, 0x39,
|
||||
0x68, 0x56, 0x82, 0xf9, 0x2e, 0xd5, 0x52, 0x94, 0x3c, 0xaa, 0x2f, 0xa3, 0x82, 0x55, 0x77, 0x89,
|
||||
0x12, 0x29, 0x87, 0xb0, 0x52, 0xd2, 0x48, 0x7c, 0x9e, 0x09, 0xae, 0x40, 0xeb, 0x70, 0xa7, 0x0b,
|
||||
0xeb, 0xcb, 0xc7, 0x4f, 0xb9, 0x94, 0x3c, 0x87, 0x88, 0x56, 0x22, 0x5a, 0x08, 0xc8, 0xd3, 0xbb,
|
||||
0x04, 0x32, 0x5a, 0x0b, 0xa9, 0x9a, 0x73, 0x17, 0x31, 0x1a, 0x7f, 0x62, 0xd5, 0xdc, 0x59, 0xe1,
|
||||
0xf7, 0x08, 0x29, 0xe0, 0x42, 0x1b, 0x25, 0x40, 0x13, 0xcf, 0x1f, 0x04, 0x93, 0xab, 0x67, 0xe1,
|
||||
0x41, 0xe7, 0x30, 0x6e, 0x84, 0xeb, 0xb7, 0xb2, 0x5c, 0x08, 0x1e, 0x77, 0x0e, 0x5e, 0xfc, 0x3c,
|
||||
0x46, 0xd3, 0xfd, 0x32, 0x26, 0x68, 0x68, 0xd6, 0x15, 0x10, 0xcf, 0xf7, 0x82, 0xf1, 0x7c, 0xb8,
|
||||
0xb9, 0xf6, 0x8e, 0x62, 0x47, 0x30, 0x46, 0xc3, 0x92, 0x16, 0x40, 0x8e, 0x6c, 0x25, 0x76, 0xcf,
|
||||
0xf8, 0x09, 0x1a, 0xa5, 0xb2, 0xa0, 0xa2, 0x24, 0x83, 0x8e, 0x7e, 0xcb, 0xac, 0x57, 0x25, 0x95,
|
||||
0x21, 0x43, 0xdf, 0x0b, 0x4e, 0xfe, 0x79, 0x59, 0x82, 0x43, 0x84, 0x4b, 0xca, 0xa4, 0xbe, 0x4e,
|
||||
0x53, 0x3b, 0xf1, 0x2d, 0xa8, 0x1a, 0x14, 0x39, 0x76, 0xce, 0x07, 0x2a, 0xf8, 0x39, 0x9a, 0x36,
|
||||
0x94, 0x31, 0xd0, 0xfa, 0x23, 0xac, 0xc9, 0xc8, 0x69, 0x7b, 0xb4, 0xd5, 0xdd, 0x02, 0x53, 0x60,
|
||||
0xac, 0xee, 0x5e, 0x47, 0xd7, 0x52, 0xfc, 0x02, 0x9d, 0x39, 0xf2, 0x99, 0x16, 0xa0, 0x2b, 0xca,
|
||||
0xe0, 0x26, 0x25, 0xf7, 0x9d, 0xf2, 0x3f, 0xde, 0x7a, 0xb6, 0x8c, 0x8c, 0x3b, 0x9e, 0x2d, 0xc5,
|
||||
0x3e, 0x9a, 0x38, 0xf2, 0x41, 0xc9, 0x55, 0xa5, 0x09, 0xf2, 0x07, 0xc1, 0x38, 0xee, 0x22, 0x7c,
|
||||
0x85, 0x1e, 0xb9, 0xd7, 0x18, 0x16, 0x0a, 0x74, 0x76, 0x53, 0x1a, 0x50, 0x35, 0xcd, 0xc9, 0xc4,
|
||||
0xf7, 0x82, 0x41, 0x7c, 0xb0, 0x86, 0x03, 0x74, 0xca, 0x64, 0xa9, 0x57, 0xf9, 0xae, 0xfd, 0x03,
|
||||
0xd7, 0xbe, 0x8f, 0xed, 0x9c, 0x3f, 0x96, 0xf6, 0xbe, 0x04, 0x03, 0xfd, 0x85, 0x9a, 0x8c, 0x9c,
|
||||
0xb8, 0x11, 0x7a, 0xd4, 0x66, 0x6f, 0x8e, 0xbe, 0xa3, 0x86, 0x32, 0xb0, 0x8d, 0xc8, 0xb4, 0xc9,
|
||||
0xde, 0xe7, 0x3b, 0xed, 0xd6, 0xe1, 0x2b, 0xe5, 0xe4, 0xb4, 0xab, 0xdd, 0x71, 0xfc, 0x1a, 0x9d,
|
||||
0x37, 0xac, 0x1f, 0xef, 0xcc, 0xc5, 0x3b, 0x5c, 0xb4, 0x53, 0xd3, 0x95, 0xc9, 0x9a, 0x4f, 0x63,
|
||||
0xc3, 0x90, 0x87, 0xcd, 0xed, 0xee, 0xd3, 0xf9, 0x9b, 0x5f, 0x9b, 0x99, 0xf7, 0x7b, 0x33, 0xf3,
|
||||
0xfe, 0x6c, 0x66, 0xde, 0xb7, 0x97, 0x5c, 0x98, 0x6c, 0x95, 0x84, 0x4c, 0x16, 0x11, 0xcd, 0x45,
|
||||
0x42, 0x13, 0x1a, 0x6d, 0xff, 0x7e, 0xb7, 0x41, 0x7b, 0x3b, 0x98, 0x8c, 0xdc, 0x06, 0xbd, 0xfa,
|
||||
0x1b, 0x00, 0x00, 0xff, 0xff, 0x21, 0x2e, 0x82, 0x0a, 0x9b, 0x03, 0x00, 0x00,
|
||||
}
|
||||
|
||||
func (m *McpBridge) Marshal() (dAtA []byte, err error) {
|
||||
@@ -333,6 +368,36 @@ func (m *RegistryConfig) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
i -= len(m.XXX_unrecognized)
|
||||
copy(dAtA[i:], m.XXX_unrecognized)
|
||||
}
|
||||
if len(m.AuthSecretName) > 0 {
|
||||
i -= len(m.AuthSecretName)
|
||||
copy(dAtA[i:], m.AuthSecretName)
|
||||
i = encodeVarintMcpBridge(dAtA, i, uint64(len(m.AuthSecretName)))
|
||||
i--
|
||||
dAtA[i] = 0x1
|
||||
i--
|
||||
dAtA[i] = 0x8a
|
||||
}
|
||||
if m.ConsulRefreshInterval != 0 {
|
||||
i = encodeVarintMcpBridge(dAtA, i, uint64(m.ConsulRefreshInterval))
|
||||
i--
|
||||
dAtA[i] = 0x1
|
||||
i--
|
||||
dAtA[i] = 0x80
|
||||
}
|
||||
if len(m.ConsulServiceTag) > 0 {
|
||||
i -= len(m.ConsulServiceTag)
|
||||
copy(dAtA[i:], m.ConsulServiceTag)
|
||||
i = encodeVarintMcpBridge(dAtA, i, uint64(len(m.ConsulServiceTag)))
|
||||
i--
|
||||
dAtA[i] = 0x7a
|
||||
}
|
||||
if len(m.ConsulDatacenter) > 0 {
|
||||
i -= len(m.ConsulDatacenter)
|
||||
copy(dAtA[i:], m.ConsulDatacenter)
|
||||
i = encodeVarintMcpBridge(dAtA, i, uint64(len(m.ConsulDatacenter)))
|
||||
i--
|
||||
dAtA[i] = 0x72
|
||||
}
|
||||
if len(m.ZkServicesPath) > 0 {
|
||||
for iNdEx := len(m.ZkServicesPath) - 1; iNdEx >= 0; iNdEx-- {
|
||||
i -= len(m.ZkServicesPath[iNdEx])
|
||||
@@ -516,6 +581,21 @@ func (m *RegistryConfig) Size() (n int) {
|
||||
n += 1 + l + sovMcpBridge(uint64(l))
|
||||
}
|
||||
}
|
||||
l = len(m.ConsulDatacenter)
|
||||
if l > 0 {
|
||||
n += 1 + l + sovMcpBridge(uint64(l))
|
||||
}
|
||||
l = len(m.ConsulServiceTag)
|
||||
if l > 0 {
|
||||
n += 1 + l + sovMcpBridge(uint64(l))
|
||||
}
|
||||
if m.ConsulRefreshInterval != 0 {
|
||||
n += 2 + sovMcpBridge(uint64(m.ConsulRefreshInterval))
|
||||
}
|
||||
l = len(m.AuthSecretName)
|
||||
if l > 0 {
|
||||
n += 2 + l + sovMcpBridge(uint64(l))
|
||||
}
|
||||
if m.XXX_unrecognized != nil {
|
||||
n += len(m.XXX_unrecognized)
|
||||
}
|
||||
@@ -1032,6 +1112,121 @@ func (m *RegistryConfig) Unmarshal(dAtA []byte) error {
|
||||
}
|
||||
m.ZkServicesPath = append(m.ZkServicesPath, string(dAtA[iNdEx:postIndex]))
|
||||
iNdEx = postIndex
|
||||
case 14:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field ConsulDatacenter", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowMcpBridge
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLen |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return ErrInvalidLengthMcpBridge
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthMcpBridge
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.ConsulDatacenter = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
case 15:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field ConsulServiceTag", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowMcpBridge
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLen |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return ErrInvalidLengthMcpBridge
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthMcpBridge
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.ConsulServiceTag = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
case 16:
|
||||
if wireType != 0 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field ConsulRefreshInterval", wireType)
|
||||
}
|
||||
m.ConsulRefreshInterval = 0
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowMcpBridge
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
m.ConsulRefreshInterval |= int64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
case 17:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field AuthSecretName", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowMcpBridge
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLen |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return ErrInvalidLengthMcpBridge
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthMcpBridge
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.AuthSecretName = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := skipMcpBridge(dAtA[iNdEx:])
|
||||
|
||||
@@ -60,4 +60,8 @@ message RegistryConfig {
|
||||
int64 nacosRefreshInterval = 11;
|
||||
string consulNamespace = 12;
|
||||
repeated string zkServicesPath = 13;
|
||||
string consulDatacenter = 14;
|
||||
string consulServiceTag = 15;
|
||||
int64 consulRefreshInterval = 16;
|
||||
string authSecretName = 17;
|
||||
}
|
||||
|
||||
@@ -41,6 +41,8 @@ func Resource(resource string) schema.GroupResource {
|
||||
|
||||
func addKnownTypes(scheme *runtime.Scheme) error {
|
||||
scheme.AddKnownTypes(SchemeGroupVersion,
|
||||
&Http2Rpc{},
|
||||
&Http2RpcList{},
|
||||
&McpBridge{},
|
||||
&McpBridgeList{},
|
||||
)
|
||||
|
||||
@@ -25,6 +25,48 @@ import (
|
||||
// please upgrade the proto package
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// <!-- crd generation tags
|
||||
// +cue-gen:Http2Rpc:groupName:networking.higress.io
|
||||
// +cue-gen:Http2Rpc:version:v1
|
||||
// +cue-gen:Http2Rpc:storageVersion
|
||||
// +cue-gen:Http2Rpc:annotations:helm.sh/resource-policy=keep
|
||||
// +cue-gen:Http2Rpc:subresource:status
|
||||
// +cue-gen:Http2Rpc:scope:Namespaced
|
||||
// +cue-gen:Http2Rpc:resource:categories=higress-io,plural=http2rpcs
|
||||
// +cue-gen:Http2Rpc:preserveUnknownFields:false
|
||||
// -->
|
||||
//
|
||||
// <!-- go code generation tags
|
||||
// +kubetype-gen
|
||||
// +kubetype-gen:groupVersion=networking.higress.io/v1
|
||||
// +genclient
|
||||
// +k8s:deepcopy-gen=true
|
||||
// -->
|
||||
type Http2Rpc struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
// +optional
|
||||
metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||
|
||||
// Spec defines the implementation of this definition.
|
||||
// +optional
|
||||
Spec networkingv1.Http2Rpc `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
|
||||
|
||||
Status v1alpha1.IstioStatus `json:"status"`
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// Http2RpcList is a collection of Http2Rpcs.
|
||||
type Http2RpcList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
// +optional
|
||||
metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||
Items []Http2Rpc `json:"items" protobuf:"bytes,2,rep,name=items"`
|
||||
}
|
||||
|
||||
// please upgrade the proto package
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// <!-- crd generation tags
|
||||
// +cue-gen:McpBridge:groupName:networking.higress.io
|
||||
// +cue-gen:McpBridge:version:v1
|
||||
|
||||
@@ -23,6 +23,67 @@ import (
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
)
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *Http2Rpc) DeepCopyInto(out *Http2Rpc) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
||||
in.Spec.DeepCopyInto(&out.Spec)
|
||||
in.Status.DeepCopyInto(&out.Status)
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Http2Rpc.
|
||||
func (in *Http2Rpc) DeepCopy() *Http2Rpc {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(Http2Rpc)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *Http2Rpc) DeepCopyObject() runtime.Object {
|
||||
if c := in.DeepCopy(); c != nil {
|
||||
return c
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *Http2RpcList) DeepCopyInto(out *Http2RpcList) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]Http2Rpc, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Http2RpcList.
|
||||
func (in *Http2RpcList) DeepCopy() *Http2RpcList {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(Http2RpcList)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *Http2RpcList) DeepCopyObject() runtime.Object {
|
||||
if c := in.DeepCopy(); c != nil {
|
||||
return c
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *McpBridge) DeepCopyInto(out *McpBridge) {
|
||||
*out = *in
|
||||
|
||||
@@ -0,0 +1,140 @@
|
||||
// Copyright (c) 2022 Alibaba Group Holding Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
networkingv1 "github.com/alibaba/higress/client/pkg/apis/networking/v1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
)
|
||||
|
||||
// FakeHttp2Rpcs implements Http2RpcInterface
|
||||
type FakeHttp2Rpcs struct {
|
||||
Fake *FakeNetworkingV1
|
||||
ns string
|
||||
}
|
||||
|
||||
var http2rpcsResource = schema.GroupVersionResource{Group: "networking.higress.io", Version: "v1", Resource: "http2rpcs"}
|
||||
|
||||
var http2rpcsKind = schema.GroupVersionKind{Group: "networking.higress.io", Version: "v1", Kind: "Http2Rpc"}
|
||||
|
||||
// Get takes name of the http2Rpc, and returns the corresponding http2Rpc object, and an error if there is any.
|
||||
func (c *FakeHttp2Rpcs) Get(ctx context.Context, name string, options v1.GetOptions) (result *networkingv1.Http2Rpc, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetAction(http2rpcsResource, c.ns, name), &networkingv1.Http2Rpc{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*networkingv1.Http2Rpc), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of Http2Rpcs that match those selectors.
|
||||
func (c *FakeHttp2Rpcs) List(ctx context.Context, opts v1.ListOptions) (result *networkingv1.Http2RpcList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListAction(http2rpcsResource, http2rpcsKind, c.ns, opts), &networkingv1.Http2RpcList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &networkingv1.Http2RpcList{ListMeta: obj.(*networkingv1.Http2RpcList).ListMeta}
|
||||
for _, item := range obj.(*networkingv1.Http2RpcList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
}
|
||||
return list, err
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested http2Rpcs.
|
||||
func (c *FakeHttp2Rpcs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewWatchAction(http2rpcsResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
||||
// Create takes the representation of a http2Rpc and creates it. Returns the server's representation of the http2Rpc, and an error, if there is any.
|
||||
func (c *FakeHttp2Rpcs) Create(ctx context.Context, http2Rpc *networkingv1.Http2Rpc, opts v1.CreateOptions) (result *networkingv1.Http2Rpc, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateAction(http2rpcsResource, c.ns, http2Rpc), &networkingv1.Http2Rpc{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*networkingv1.Http2Rpc), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a http2Rpc and updates it. Returns the server's representation of the http2Rpc, and an error, if there is any.
|
||||
func (c *FakeHttp2Rpcs) Update(ctx context.Context, http2Rpc *networkingv1.Http2Rpc, opts v1.UpdateOptions) (result *networkingv1.Http2Rpc, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateAction(http2rpcsResource, c.ns, http2Rpc), &networkingv1.Http2Rpc{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*networkingv1.Http2Rpc), err
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *FakeHttp2Rpcs) UpdateStatus(ctx context.Context, http2Rpc *networkingv1.Http2Rpc, opts v1.UpdateOptions) (*networkingv1.Http2Rpc, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateSubresourceAction(http2rpcsResource, "status", c.ns, http2Rpc), &networkingv1.Http2Rpc{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*networkingv1.Http2Rpc), err
|
||||
}
|
||||
|
||||
// Delete takes name of the http2Rpc and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeHttp2Rpcs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewDeleteAction(http2rpcsResource, c.ns, name), &networkingv1.Http2Rpc{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeHttp2Rpcs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(http2rpcsResource, c.ns, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &networkingv1.Http2RpcList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched http2Rpc.
|
||||
func (c *FakeHttp2Rpcs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *networkingv1.Http2Rpc, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(http2rpcsResource, c.ns, name, pt, data, subresources...), &networkingv1.Http2Rpc{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*networkingv1.Http2Rpc), err
|
||||
}
|
||||
@@ -26,6 +26,10 @@ type FakeNetworkingV1 struct {
|
||||
*testing.Fake
|
||||
}
|
||||
|
||||
func (c *FakeNetworkingV1) Http2Rpcs(namespace string) v1.Http2RpcInterface {
|
||||
return &FakeHttp2Rpcs{c, namespace}
|
||||
}
|
||||
|
||||
func (c *FakeNetworkingV1) McpBridges(namespace string) v1.McpBridgeInterface {
|
||||
return &FakeMcpBridges{c, namespace}
|
||||
}
|
||||
|
||||
@@ -16,4 +16,6 @@
|
||||
|
||||
package v1
|
||||
|
||||
type Http2RpcExpansion interface{}
|
||||
|
||||
type McpBridgeExpansion interface{}
|
||||
|
||||
@@ -0,0 +1,193 @@
|
||||
// Copyright (c) 2022 Alibaba Group Holding Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
v1 "github.com/alibaba/higress/client/pkg/apis/networking/v1"
|
||||
scheme "github.com/alibaba/higress/client/pkg/clientset/versioned/scheme"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
rest "k8s.io/client-go/rest"
|
||||
)
|
||||
|
||||
// Http2RpcsGetter has a method to return a Http2RpcInterface.
|
||||
// A group's client should implement this interface.
|
||||
type Http2RpcsGetter interface {
|
||||
Http2Rpcs(namespace string) Http2RpcInterface
|
||||
}
|
||||
|
||||
// Http2RpcInterface has methods to work with Http2Rpc resources.
|
||||
type Http2RpcInterface interface {
|
||||
Create(ctx context.Context, http2Rpc *v1.Http2Rpc, opts metav1.CreateOptions) (*v1.Http2Rpc, error)
|
||||
Update(ctx context.Context, http2Rpc *v1.Http2Rpc, opts metav1.UpdateOptions) (*v1.Http2Rpc, error)
|
||||
UpdateStatus(ctx context.Context, http2Rpc *v1.Http2Rpc, opts metav1.UpdateOptions) (*v1.Http2Rpc, error)
|
||||
Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error
|
||||
Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Http2Rpc, error)
|
||||
List(ctx context.Context, opts metav1.ListOptions) (*v1.Http2RpcList, error)
|
||||
Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error)
|
||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Http2Rpc, err error)
|
||||
Http2RpcExpansion
|
||||
}
|
||||
|
||||
// http2Rpcs implements Http2RpcInterface
|
||||
type http2Rpcs struct {
|
||||
client rest.Interface
|
||||
ns string
|
||||
}
|
||||
|
||||
// newHttp2Rpcs returns a Http2Rpcs
|
||||
func newHttp2Rpcs(c *NetworkingV1Client, namespace string) *http2Rpcs {
|
||||
return &http2Rpcs{
|
||||
client: c.RESTClient(),
|
||||
ns: namespace,
|
||||
}
|
||||
}
|
||||
|
||||
// Get takes name of the http2Rpc, and returns the corresponding http2Rpc object, and an error if there is any.
|
||||
func (c *http2Rpcs) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Http2Rpc, err error) {
|
||||
result = &v1.Http2Rpc{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("http2rpcs").
|
||||
Name(name).
|
||||
VersionedParams(&options, scheme.ParameterCodec).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of Http2Rpcs that match those selectors.
|
||||
func (c *http2Rpcs) List(ctx context.Context, opts metav1.ListOptions) (result *v1.Http2RpcList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1.Http2RpcList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("http2rpcs").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested http2Rpcs.
|
||||
func (c *http2Rpcs) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("http2rpcs").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch(ctx)
|
||||
}
|
||||
|
||||
// Create takes the representation of a http2Rpc and creates it. Returns the server's representation of the http2Rpc, and an error, if there is any.
|
||||
func (c *http2Rpcs) Create(ctx context.Context, http2Rpc *v1.Http2Rpc, opts metav1.CreateOptions) (result *v1.Http2Rpc, err error) {
|
||||
result = &v1.Http2Rpc{}
|
||||
err = c.client.Post().
|
||||
Namespace(c.ns).
|
||||
Resource("http2rpcs").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(http2Rpc).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Update takes the representation of a http2Rpc and updates it. Returns the server's representation of the http2Rpc, and an error, if there is any.
|
||||
func (c *http2Rpcs) Update(ctx context.Context, http2Rpc *v1.Http2Rpc, opts metav1.UpdateOptions) (result *v1.Http2Rpc, err error) {
|
||||
result = &v1.Http2Rpc{}
|
||||
err = c.client.Put().
|
||||
Namespace(c.ns).
|
||||
Resource("http2rpcs").
|
||||
Name(http2Rpc.Name).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(http2Rpc).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *http2Rpcs) UpdateStatus(ctx context.Context, http2Rpc *v1.Http2Rpc, opts metav1.UpdateOptions) (result *v1.Http2Rpc, err error) {
|
||||
result = &v1.Http2Rpc{}
|
||||
err = c.client.Put().
|
||||
Namespace(c.ns).
|
||||
Resource("http2rpcs").
|
||||
Name(http2Rpc.Name).
|
||||
SubResource("status").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(http2Rpc).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Delete takes name of the http2Rpc and deletes it. Returns an error if one occurs.
|
||||
func (c *http2Rpcs) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("http2rpcs").
|
||||
Name(name).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *http2Rpcs) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOpts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("http2rpcs").
|
||||
VersionedParams(&listOpts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched http2Rpc.
|
||||
func (c *http2Rpcs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Http2Rpc, err error) {
|
||||
result = &v1.Http2Rpc{}
|
||||
err = c.client.Patch(pt).
|
||||
Namespace(c.ns).
|
||||
Resource("http2rpcs").
|
||||
Name(name).
|
||||
SubResource(subresources...).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(data).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
@@ -24,6 +24,7 @@ import (
|
||||
|
||||
type NetworkingV1Interface interface {
|
||||
RESTClient() rest.Interface
|
||||
Http2RpcsGetter
|
||||
McpBridgesGetter
|
||||
}
|
||||
|
||||
@@ -32,6 +33,10 @@ type NetworkingV1Client struct {
|
||||
restClient rest.Interface
|
||||
}
|
||||
|
||||
func (c *NetworkingV1Client) Http2Rpcs(namespace string) Http2RpcInterface {
|
||||
return newHttp2Rpcs(c, namespace)
|
||||
}
|
||||
|
||||
func (c *NetworkingV1Client) McpBridges(namespace string) McpBridgeInterface {
|
||||
return newMcpBridges(c, namespace)
|
||||
}
|
||||
|
||||
@@ -56,6 +56,8 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Extensions().V1alpha1().WasmPlugins().Informer()}, nil
|
||||
|
||||
// Group=networking.higress.io, Version=v1
|
||||
case v1.SchemeGroupVersion.WithResource("http2rpcs"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Networking().V1().Http2Rpcs().Informer()}, nil
|
||||
case v1.SchemeGroupVersion.WithResource("mcpbridges"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Networking().V1().McpBridges().Informer()}, nil
|
||||
|
||||
|
||||
@@ -0,0 +1,88 @@
|
||||
// Copyright (c) 2022 Alibaba Group Holding Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by informer-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
"context"
|
||||
time "time"
|
||||
|
||||
networkingv1 "github.com/alibaba/higress/client/pkg/apis/networking/v1"
|
||||
versioned "github.com/alibaba/higress/client/pkg/clientset/versioned"
|
||||
internalinterfaces "github.com/alibaba/higress/client/pkg/informers/externalversions/internalinterfaces"
|
||||
v1 "github.com/alibaba/higress/client/pkg/listers/networking/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
// Http2RpcInformer provides access to a shared informer and lister for
|
||||
// Http2Rpcs.
|
||||
type Http2RpcInformer interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() v1.Http2RpcLister
|
||||
}
|
||||
|
||||
type http2RpcInformer struct {
|
||||
factory internalinterfaces.SharedInformerFactory
|
||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
||||
namespace string
|
||||
}
|
||||
|
||||
// NewHttp2RpcInformer constructs a new informer for Http2Rpc type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewHttp2RpcInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
|
||||
return NewFilteredHttp2RpcInformer(client, namespace, resyncPeriod, indexers, nil)
|
||||
}
|
||||
|
||||
// NewFilteredHttp2RpcInformer constructs a new informer for Http2Rpc type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewFilteredHttp2RpcInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
|
||||
return cache.NewSharedIndexInformer(
|
||||
&cache.ListWatch{
|
||||
ListFunc: func(options metav1.ListOptions) (runtime.Object, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.NetworkingV1().Http2Rpcs(namespace).List(context.TODO(), options)
|
||||
},
|
||||
WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.NetworkingV1().Http2Rpcs(namespace).Watch(context.TODO(), options)
|
||||
},
|
||||
},
|
||||
&networkingv1.Http2Rpc{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
)
|
||||
}
|
||||
|
||||
func (f *http2RpcInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||
return NewFilteredHttp2RpcInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
|
||||
}
|
||||
|
||||
func (f *http2RpcInformer) Informer() cache.SharedIndexInformer {
|
||||
return f.factory.InformerFor(&networkingv1.Http2Rpc{}, f.defaultInformer)
|
||||
}
|
||||
|
||||
func (f *http2RpcInformer) Lister() v1.Http2RpcLister {
|
||||
return v1.NewHttp2RpcLister(f.Informer().GetIndexer())
|
||||
}
|
||||
@@ -22,6 +22,8 @@ import (
|
||||
|
||||
// Interface provides access to all the informers in this group version.
|
||||
type Interface interface {
|
||||
// Http2Rpcs returns a Http2RpcInformer.
|
||||
Http2Rpcs() Http2RpcInformer
|
||||
// McpBridges returns a McpBridgeInformer.
|
||||
McpBridges() McpBridgeInformer
|
||||
}
|
||||
@@ -37,6 +39,11 @@ func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakList
|
||||
return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
|
||||
}
|
||||
|
||||
// Http2Rpcs returns a Http2RpcInformer.
|
||||
func (v *version) Http2Rpcs() Http2RpcInformer {
|
||||
return &http2RpcInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
|
||||
}
|
||||
|
||||
// McpBridges returns a McpBridgeInformer.
|
||||
func (v *version) McpBridges() McpBridgeInformer {
|
||||
return &mcpBridgeInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
|
||||
|
||||
@@ -16,6 +16,14 @@
|
||||
|
||||
package v1
|
||||
|
||||
// Http2RpcListerExpansion allows custom methods to be added to
|
||||
// Http2RpcLister.
|
||||
type Http2RpcListerExpansion interface{}
|
||||
|
||||
// Http2RpcNamespaceListerExpansion allows custom methods to be added to
|
||||
// Http2RpcNamespaceLister.
|
||||
type Http2RpcNamespaceListerExpansion interface{}
|
||||
|
||||
// McpBridgeListerExpansion allows custom methods to be added to
|
||||
// McpBridgeLister.
|
||||
type McpBridgeListerExpansion interface{}
|
||||
|
||||
92
client/pkg/listers/networking/v1/http2rpc.gen.go
Normal file
92
client/pkg/listers/networking/v1/http2rpc.gen.go
Normal file
@@ -0,0 +1,92 @@
|
||||
// Copyright (c) 2022 Alibaba Group Holding Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by lister-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
v1 "github.com/alibaba/higress/client/pkg/apis/networking/v1"
|
||||
"k8s.io/apimachinery/pkg/api/errors"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
"k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
// Http2RpcLister helps list Http2Rpcs.
|
||||
type Http2RpcLister interface {
|
||||
// List lists all Http2Rpcs in the indexer.
|
||||
List(selector labels.Selector) (ret []*v1.Http2Rpc, err error)
|
||||
// Http2Rpcs returns an object that can list and get Http2Rpcs.
|
||||
Http2Rpcs(namespace string) Http2RpcNamespaceLister
|
||||
Http2RpcListerExpansion
|
||||
}
|
||||
|
||||
// http2RpcLister implements the Http2RpcLister interface.
|
||||
type http2RpcLister struct {
|
||||
indexer cache.Indexer
|
||||
}
|
||||
|
||||
// NewHttp2RpcLister returns a new Http2RpcLister.
|
||||
func NewHttp2RpcLister(indexer cache.Indexer) Http2RpcLister {
|
||||
return &http2RpcLister{indexer: indexer}
|
||||
}
|
||||
|
||||
// List lists all Http2Rpcs in the indexer.
|
||||
func (s *http2RpcLister) List(selector labels.Selector) (ret []*v1.Http2Rpc, err error) {
|
||||
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
|
||||
ret = append(ret, m.(*v1.Http2Rpc))
|
||||
})
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// Http2Rpcs returns an object that can list and get Http2Rpcs.
|
||||
func (s *http2RpcLister) Http2Rpcs(namespace string) Http2RpcNamespaceLister {
|
||||
return http2RpcNamespaceLister{indexer: s.indexer, namespace: namespace}
|
||||
}
|
||||
|
||||
// Http2RpcNamespaceLister helps list and get Http2Rpcs.
|
||||
type Http2RpcNamespaceLister interface {
|
||||
// List lists all Http2Rpcs in the indexer for a given namespace.
|
||||
List(selector labels.Selector) (ret []*v1.Http2Rpc, err error)
|
||||
// Get retrieves the Http2Rpc from the indexer for a given namespace and name.
|
||||
Get(name string) (*v1.Http2Rpc, error)
|
||||
Http2RpcNamespaceListerExpansion
|
||||
}
|
||||
|
||||
// http2RpcNamespaceLister implements the Http2RpcNamespaceLister
|
||||
// interface.
|
||||
type http2RpcNamespaceLister struct {
|
||||
indexer cache.Indexer
|
||||
namespace string
|
||||
}
|
||||
|
||||
// List lists all Http2Rpcs in the indexer for a given namespace.
|
||||
func (s http2RpcNamespaceLister) List(selector labels.Selector) (ret []*v1.Http2Rpc, err error) {
|
||||
err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
|
||||
ret = append(ret, m.(*v1.Http2Rpc))
|
||||
})
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// Get retrieves the Http2Rpc from the indexer for a given namespace and name.
|
||||
func (s http2RpcNamespaceLister) Get(name string) (*v1.Http2Rpc, error) {
|
||||
obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if !exists {
|
||||
return nil, errors.NewNotFound(v1.Resource("http2rpc"), name)
|
||||
}
|
||||
return obj.(*v1.Http2Rpc), nil
|
||||
}
|
||||
236
cmd/hgctl/config/gateway_config.go
Normal file
236
cmd/hgctl/config/gateway_config.go
Normal file
@@ -0,0 +1,236 @@
|
||||
// Copyright (c) 2022 Alibaba Group Holding Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package config
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io"
|
||||
"net/http"
|
||||
|
||||
"github.com/alibaba/higress/pkg/cmd/hgctl/kubernetes"
|
||||
"github.com/alibaba/higress/pkg/cmd/options"
|
||||
"k8s.io/apimachinery/pkg/types"
|
||||
"sigs.k8s.io/yaml"
|
||||
)
|
||||
|
||||
var (
|
||||
BootstrapEnvoyConfigType EnvoyConfigType = "bootstrap"
|
||||
ClusterEnvoyConfigType EnvoyConfigType = "cluster"
|
||||
EndpointEnvoyConfigType EnvoyConfigType = "endpoint"
|
||||
ListenerEnvoyConfigType EnvoyConfigType = "listener"
|
||||
RouteEnvoyConfigType EnvoyConfigType = "route"
|
||||
AllEnvoyConfigType EnvoyConfigType = "all"
|
||||
)
|
||||
|
||||
const (
|
||||
defaultProxyAdminPort = 15000
|
||||
)
|
||||
|
||||
type EnvoyConfigType string
|
||||
|
||||
type GetEnvoyConfigOptions struct {
|
||||
IncludeEds bool
|
||||
PodName string
|
||||
PodNamespace string
|
||||
BindAddress string
|
||||
Output string
|
||||
EnvoyConfigType EnvoyConfigType
|
||||
}
|
||||
|
||||
func NewDefaultGetEnvoyConfigOptions() *GetEnvoyConfigOptions {
|
||||
return &GetEnvoyConfigOptions{
|
||||
IncludeEds: true,
|
||||
PodName: "",
|
||||
PodNamespace: "higress-system",
|
||||
BindAddress: "localhost",
|
||||
Output: "json",
|
||||
EnvoyConfigType: AllEnvoyConfigType,
|
||||
}
|
||||
}
|
||||
|
||||
func GetEnvoyConfig(config *GetEnvoyConfigOptions) ([]byte, error) {
|
||||
configDump, err := retrieveConfigDump(config.PodName, config.PodNamespace, config.BindAddress, config.IncludeEds)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if config.EnvoyConfigType == AllEnvoyConfigType {
|
||||
return configDump, nil
|
||||
}
|
||||
resource, err := getXDSResource(config.EnvoyConfigType, configDump)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return formatGatewayConfig(resource, config.Output)
|
||||
}
|
||||
|
||||
func retrieveConfigDump(podName, podNamespace, bindAddress string, includeEds bool) ([]byte, error) {
|
||||
if podNamespace == "" {
|
||||
return nil, fmt.Errorf("pod namespace is required")
|
||||
}
|
||||
|
||||
if podName == "" {
|
||||
c, err := kubernetes.NewCLIClient(options.DefaultConfigFlags.ToRawKubeConfigLoader())
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to build kubernetes client: %w", err)
|
||||
}
|
||||
podList, err := c.PodsForSelector(podNamespace, "app=higress-gateway")
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if len(podList.Items) == 0 {
|
||||
return nil, fmt.Errorf("higress gateway pod is not existed in namespace %s", podNamespace)
|
||||
}
|
||||
|
||||
podName = podList.Items[0].GetName()
|
||||
}
|
||||
|
||||
fw, err := portForwarder(types.NamespacedName{
|
||||
Namespace: podNamespace,
|
||||
Name: podName,
|
||||
}, bindAddress)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := fw.Start(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer fw.Stop()
|
||||
|
||||
configDump, err := fetchGatewayConfig(fw, includeEds)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return configDump, nil
|
||||
}
|
||||
|
||||
func portForwarder(nn types.NamespacedName, bindAddress string) (kubernetes.PortForwarder, error) {
|
||||
c, err := kubernetes.NewCLIClient(options.DefaultConfigFlags.ToRawKubeConfigLoader())
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("build CLI client fail: %w", err)
|
||||
}
|
||||
|
||||
pod, err := c.Pod(nn)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("get pod %s fail: %w", nn, err)
|
||||
}
|
||||
if pod.Status.Phase != "Running" {
|
||||
return nil, fmt.Errorf("pod %s is not running", nn)
|
||||
}
|
||||
|
||||
fw, err := kubernetes.NewLocalPortForwarder(c, nn, 0, defaultProxyAdminPort, bindAddress)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return fw, nil
|
||||
}
|
||||
|
||||
func formatGatewayConfig(configDump any, output string) ([]byte, error) {
|
||||
out, err := json.MarshalIndent(configDump, "", " ")
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if output == "yaml" {
|
||||
out, err = yaml.JSONToYAML(out)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func fetchGatewayConfig(fw kubernetes.PortForwarder, includeEds bool) ([]byte, error) {
|
||||
out, err := configDumpRequest(fw.Address(), includeEds)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func configDumpRequest(address string, includeEds bool) ([]byte, error) {
|
||||
url := fmt.Sprintf("http://%s/config_dump", address)
|
||||
if includeEds {
|
||||
url = fmt.Sprintf("%s?include_eds", url)
|
||||
}
|
||||
req, err := http.NewRequest("GET", url, nil)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
resp, err := http.DefaultClient.Do(req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer func() {
|
||||
_ = resp.Body.Close()
|
||||
}()
|
||||
|
||||
return io.ReadAll(resp.Body)
|
||||
}
|
||||
|
||||
func getXDSResource(resourceType EnvoyConfigType, configDump []byte) (any, error) {
|
||||
cd := map[string]any{}
|
||||
if err := json.Unmarshal(configDump, &cd); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if resourceType == AllEnvoyConfigType {
|
||||
return cd, nil
|
||||
}
|
||||
configs := cd["configs"]
|
||||
globalConfigs := configs.([]any)
|
||||
|
||||
switch resourceType {
|
||||
case BootstrapEnvoyConfigType:
|
||||
for _, config := range globalConfigs {
|
||||
if config.(map[string]interface{})["@type"] == "type.googleapis.com/envoy.admin.v3.BootstrapConfigDump" {
|
||||
return config, nil
|
||||
}
|
||||
}
|
||||
case EndpointEnvoyConfigType:
|
||||
for _, config := range globalConfigs {
|
||||
if config.(map[string]interface{})["@type"] == "type.googleapis.com/envoy.admin.v3.EndpointsConfigDump" {
|
||||
return config, nil
|
||||
}
|
||||
}
|
||||
|
||||
case ClusterEnvoyConfigType:
|
||||
for _, config := range globalConfigs {
|
||||
if config.(map[string]interface{})["@type"] == "type.googleapis.com/envoy.admin.v3.ClustersConfigDump" {
|
||||
return config, nil
|
||||
}
|
||||
}
|
||||
case ListenerEnvoyConfigType:
|
||||
for _, config := range globalConfigs {
|
||||
if config.(map[string]interface{})["@type"] == "type.googleapis.com/envoy.admin.v3.ListenersConfigDump" {
|
||||
return config, nil
|
||||
}
|
||||
}
|
||||
case RouteEnvoyConfigType:
|
||||
for _, config := range globalConfigs {
|
||||
if config.(map[string]interface{})["@type"] == "type.googleapis.com/envoy.admin.v3.RoutesConfigDump" {
|
||||
return config, nil
|
||||
}
|
||||
}
|
||||
default:
|
||||
return nil, fmt.Errorf("unknown resourceType %s", resourceType)
|
||||
}
|
||||
|
||||
return nil, fmt.Errorf("unknown resourceType %s", resourceType)
|
||||
}
|
||||
@@ -12,7 +12,7 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package hgctl
|
||||
package config
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
@@ -34,10 +34,11 @@ type fakePortForwarder struct {
|
||||
localPort int
|
||||
l net.Listener
|
||||
mux *http.ServeMux
|
||||
stopCh chan struct{}
|
||||
}
|
||||
|
||||
func newFakePortForwarder(b []byte) (kubernetes.PortForwarder, error) {
|
||||
p, err := kubernetes.LocalAvailablePort()
|
||||
p, err := kubernetes.LocalAvailablePort("localhost")
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -46,6 +47,7 @@ func newFakePortForwarder(b []byte) (kubernetes.PortForwarder, error) {
|
||||
responseBody: b,
|
||||
localPort: p,
|
||||
mux: http.NewServeMux(),
|
||||
stopCh: make(chan struct{}),
|
||||
}
|
||||
fw.mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
|
||||
_, _ = w.Write(fw.responseBody)
|
||||
@@ -54,6 +56,10 @@ func newFakePortForwarder(b []byte) (kubernetes.PortForwarder, error) {
|
||||
return fw, nil
|
||||
}
|
||||
|
||||
func (fw *fakePortForwarder) WaitForStop() {
|
||||
<-fw.stopCh
|
||||
}
|
||||
|
||||
func (fw *fakePortForwarder) Start() error {
|
||||
l, err := net.Listen("tcp", fw.Address())
|
||||
if err != nil {
|
||||
@@ -103,7 +109,7 @@ func TestExtractAllConfigDump(t *testing.T) {
|
||||
t.Run(tc.output, func(t *testing.T) {
|
||||
configDump, err := fetchGatewayConfig(fw, true)
|
||||
assert.NoError(t, err)
|
||||
data, err := GetXDSResource(AllEnvoyConfigType, configDump)
|
||||
data, err := getXDSResource(AllEnvoyConfigType, configDump)
|
||||
assert.NoError(t, err)
|
||||
got, err := formatGatewayConfig(data, tc.output)
|
||||
assert.NoError(t, err)
|
||||
@@ -131,7 +137,7 @@ func TestExtractSubResourcesConfigDump(t *testing.T) {
|
||||
cases := []struct {
|
||||
output string
|
||||
expected string
|
||||
resourceType envoyConfigType
|
||||
resourceType EnvoyConfigType
|
||||
}{
|
||||
{
|
||||
output: "json",
|
||||
@@ -186,7 +192,7 @@ func TestExtractSubResourcesConfigDump(t *testing.T) {
|
||||
t.Run(tc.output, func(t *testing.T) {
|
||||
configDump, err := fetchGatewayConfig(fw, false)
|
||||
assert.NoError(t, err)
|
||||
resource, err := GetXDSResource(tc.resourceType, configDump)
|
||||
resource, err := getXDSResource(tc.resourceType, configDump)
|
||||
assert.NoError(t, err)
|
||||
got, err := formatGatewayConfig(resource, tc.output)
|
||||
assert.NoError(t, err)
|
||||
@@ -18,10 +18,13 @@ import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"istio.io/pkg/log"
|
||||
|
||||
"github.com/alibaba/higress/pkg/cmd"
|
||||
)
|
||||
|
||||
func main() {
|
||||
log.EnableKlogWithCobra()
|
||||
if err := cmd.GetRootCommand().Execute(); err != nil {
|
||||
_, _ = fmt.Fprintln(os.Stderr, err)
|
||||
os.Exit(1)
|
||||
|
||||
@@ -2,7 +2,11 @@ codecov:
|
||||
require_ci_to_pass: yes
|
||||
coverage:
|
||||
status:
|
||||
patch: no
|
||||
patch:
|
||||
default:
|
||||
target: 50%
|
||||
threshold: 0%
|
||||
if_ci_failed: error # success, failure, error, ignore
|
||||
project:
|
||||
default:
|
||||
target: auto
|
||||
@@ -17,4 +21,4 @@ ignore:
|
||||
comment:
|
||||
layout: "reach,diff,flags,tree"
|
||||
behavior: default
|
||||
require_changes: no
|
||||
require_changes: no
|
||||
33
docker/Dockerfile.base
Normal file
33
docker/Dockerfile.base
Normal file
@@ -0,0 +1,33 @@
|
||||
FROM ubuntu:22.04
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
# Do not add more stuff to this list that isn't small or critically useful.
|
||||
# If you occasionally need something on the container do
|
||||
# sudo apt-get update && apt-get whichever
|
||||
|
||||
# hadolint ignore=DL3005,DL3008
|
||||
RUN apt-get update && \
|
||||
apt-get install --no-install-recommends -y \
|
||||
ca-certificates \
|
||||
curl \
|
||||
iptables \
|
||||
iproute2 \
|
||||
iputils-ping \
|
||||
knot-dnsutils \
|
||||
netcat \
|
||||
tcpdump \
|
||||
conntrack \
|
||||
bsdmainutils \
|
||||
net-tools \
|
||||
lsof \
|
||||
sudo \
|
||||
&& apt-get upgrade -y \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/log/*log /var/lib/apt/lists/* /var/log/apt/* /var/lib/dpkg/*-old /var/cache/debconf/*-old \
|
||||
&& update-alternatives --set iptables /usr/sbin/iptables-legacy \
|
||||
&& update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy
|
||||
|
||||
# Sudoers used to allow tcpdump and other debug utilities.
|
||||
RUN useradd -m --uid 1337 istio-proxy && \
|
||||
echo "istio-proxy ALL=NOPASSWD: ALL" >> /etc/sudoers
|
||||
@@ -11,6 +11,7 @@ ARG HUB
|
||||
FROM ${HUB}/base:${BASE_VERSION}
|
||||
|
||||
ARG TARGETARCH
|
||||
|
||||
COPY ${TARGETARCH:-amd64}/higress /usr/local/bin/higress
|
||||
|
||||
USER 1337:1337
|
||||
|
||||
@@ -17,6 +17,12 @@ docker.higress: $(OUT_LINUX)/higress
|
||||
docker.higress: docker/Dockerfile.higress
|
||||
$(HIGRESS_DOCKER_RULE)
|
||||
|
||||
docker.higress-buildx: BUILD_ARGS=--build-arg BASE_VERSION=${BASE_VERSION} --build-arg HUB=${HUB}
|
||||
docker.higress-buildx: $(AMD64_OUT_LINUX)/higress
|
||||
docker.higress-buildx: $(ARM64_OUT_LINUX)/higress
|
||||
docker.higress-buildx: docker/Dockerfile.higress
|
||||
$(HIGRESS_DOCKER_BUILDX_RULE)
|
||||
|
||||
# DOCKER_BUILD_VARIANTS ?=debug distroless
|
||||
# Base images have two different forms:
|
||||
# * "debug", suffixed as -debug. This is a ubuntu based image with a bunch of debug tools
|
||||
@@ -28,4 +34,7 @@ DOCKER_ALL_VARIANTS ?= debug distroless
|
||||
# This can be done with DOCKER_BUILD_VARIANTS="default debug" as well, but at the expense of building twice vs building once and tagging twice
|
||||
INCLUDE_UNTAGGED_DEFAULT ?= false
|
||||
DEFAULT_DISTRIBUTION=debug
|
||||
HIGRESS_DOCKER_RULE ?= $(foreach VARIANT,$(DOCKER_BUILD_VARIANTS), time (mkdir -p $(HIGRESS_DOCKER_BUILD_TOP)/$@ && TARGET_ARCH=$(TARGET_ARCH) ./docker/docker-copy.sh $^ $(HIGRESS_DOCKER_BUILD_TOP)/$@ && cd $(HIGRESS_DOCKER_BUILD_TOP)/$@ $(BUILD_PRE) && docker build $(BUILD_ARGS) --build-arg BASE_DISTRIBUTION=$(call normalize-tag,$(VARIANT)) -t $(HUB)/$(subst docker.,,$@):$(TAG)$(call variant-tag,$(VARIANT)) -f Dockerfile$(suffix $@) . ); )
|
||||
|
||||
HIGRESS_DOCKER_BUILDX_RULE ?= $(foreach VARIANT,$(DOCKER_BUILD_VARIANTS), time (mkdir -p $(HIGRESS_DOCKER_BUILD_TOP)/$@ && TARGET_ARCH=$(TARGET_ARCH) ./docker/docker-copy.sh $^ $(HIGRESS_DOCKER_BUILD_TOP)/$@ && cd $(HIGRESS_DOCKER_BUILD_TOP)/$@ $(BUILD_PRE) && docker buildx create --name higress --node higress0 --platform linux/amd64,linux/arm64 --use && docker buildx build --no-cache --platform linux/amd64,linux/arm64 $(BUILD_ARGS) --build-arg BASE_DISTRIBUTION=$(call normalize-tag,$(VARIANT)) -t $(HUB)/higress:$(TAG)$(call variant-tag,$(VARIANT)) -f Dockerfile.higress . --push ); )
|
||||
HIGRESS_DOCKER_RULE ?= $(foreach VARIANT,$(DOCKER_BUILD_VARIANTS), time (mkdir -p $(HIGRESS_DOCKER_BUILD_TOP)/$@ && TARGET_ARCH=$(TARGET_ARCH) ./docker/docker-copy.sh $^ $(HIGRESS_DOCKER_BUILD_TOP)/$@ && cd $(HIGRESS_DOCKER_BUILD_TOP)/$@ $(BUILD_PRE) && docker build $(BUILD_ARGS) --build-arg BASE_DISTRIBUTION=$(call normalize-tag,$(VARIANT)) -t $(HUB)/higress:$(TAG)$(call variant-tag,$(VARIANT)) -f Dockerfile.higress . ); )
|
||||
|
||||
|
||||
111
envoy/1.20/patches/envoy/20231008-fallback-origin-cluster.patch
Normal file
111
envoy/1.20/patches/envoy/20231008-fallback-origin-cluster.patch
Normal file
@@ -0,0 +1,111 @@
|
||||
diff -Naur envoy/contrib/custom_cluster_plugins/cluster_fallback/source/filter.cc envoy-new/contrib/custom_cluster_plugins/cluster_fallback/source/filter.cc
|
||||
--- envoy/contrib/custom_cluster_plugins/cluster_fallback/source/filter.cc 2023-10-08 15:01:21.960871500 +0800
|
||||
+++ envoy-new/contrib/custom_cluster_plugins/cluster_fallback/source/filter.cc 2023-09-27 17:03:41.613256338 +0800
|
||||
@@ -60,7 +60,7 @@
|
||||
|
||||
for (const auto& cluster_name : first_item->second) {
|
||||
if (hasHealthHost(cluster_name)) {
|
||||
- return base.clone(cluster_name);
|
||||
+ return base.clone(cluster_name, first_item->first);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -75,7 +75,8 @@
|
||||
|
||||
auto search = clusters_config_.find(route_entry.clusterName());
|
||||
if (search == clusters_config_.end()) {
|
||||
- ENVOY_LOG(warn, "there is no fallback cluster config, the original routing cluster is returned");
|
||||
+ ENVOY_LOG(warn,
|
||||
+ "there is no fallback cluster config, the original routing cluster is returned");
|
||||
return cluster_entry.getRouteConstSharedPtr();
|
||||
}
|
||||
|
||||
@@ -87,7 +88,7 @@
|
||||
|
||||
for (const auto& cluster_name : search->second) {
|
||||
if (hasHealthHost(cluster_name)) {
|
||||
- return cluster_entry.clone(cluster_name);
|
||||
+ return cluster_entry.clone(cluster_name, search->first);
|
||||
}
|
||||
}
|
||||
|
||||
diff -Naur envoy/source/common/http/headers.h envoy-new/source/common/http/headers.h
|
||||
--- envoy/source/common/http/headers.h 2023-10-08 15:01:21.968871828 +0800
|
||||
+++ envoy-new/source/common/http/headers.h 2023-09-27 18:48:50.059419606 +0800
|
||||
@@ -124,6 +124,7 @@
|
||||
const LowerCaseString TriStartTime{"req-start-time"};
|
||||
const LowerCaseString TriRespStartTime{"resp-start-time"};
|
||||
const LowerCaseString EnvoyOriginalHost{"original-host"};
|
||||
+ const LowerCaseString HigressOriginalService{"x-higress-original-service"};
|
||||
} AliExtendedValues;
|
||||
#endif
|
||||
};
|
||||
diff -Naur envoy/source/common/router/config_impl.cc envoy-new/source/common/router/config_impl.cc
|
||||
--- envoy/source/common/router/config_impl.cc 2023-10-08 15:01:21.968871828 +0800
|
||||
+++ envoy-new/source/common/router/config_impl.cc 2023-09-27 18:49:18.656592237 +0800
|
||||
@@ -563,7 +563,6 @@
|
||||
route.name());
|
||||
}
|
||||
// End Added
|
||||
-
|
||||
}
|
||||
|
||||
bool RouteEntryImplBase::evaluateRuntimeMatch(const uint64_t random_value) const {
|
||||
@@ -662,6 +661,10 @@
|
||||
}
|
||||
|
||||
#if defined(ALIMESH)
|
||||
+ if (!origin_cluster_name_.empty()) {
|
||||
+ headers.addCopy(Http::CustomHeaders::get().AliExtendedValues.HigressOriginalService,
|
||||
+ origin_cluster_name_);
|
||||
+ }
|
||||
headers.setReferenceKey(Http::CustomHeaders::get().AliExtendedValues.EnvoyOriginalHost,
|
||||
headers.getHostValue());
|
||||
#endif
|
||||
diff -Naur envoy/source/common/router/config_impl.h envoy-new/source/common/router/config_impl.h
|
||||
--- envoy/source/common/router/config_impl.h 2023-10-08 15:01:21.968871828 +0800
|
||||
+++ envoy-new/source/common/router/config_impl.h 2023-09-27 18:59:11.196893507 +0800
|
||||
@@ -584,9 +584,13 @@
|
||||
return internal_active_redirect_policy_;
|
||||
}
|
||||
|
||||
- RouteConstSharedPtr clone(const std::string& name) const {
|
||||
- return std::make_shared<DynamicRouteEntry>(this, name);
|
||||
+ RouteConstSharedPtr clone(const std::string& name, const std::string& origin_cluster = "") const {
|
||||
+ auto entry = std::make_shared<DynamicRouteEntry>(this, name);
|
||||
+ entry->setOriginClusterName(origin_cluster);
|
||||
+ return entry;
|
||||
}
|
||||
+
|
||||
+ void setOriginClusterName(const std::string& name) const { origin_cluster_name_ = name; }
|
||||
#endif
|
||||
uint32_t retryShadowBufferLimit() const override { return retry_shadow_buffer_limit_; }
|
||||
const std::vector<ShadowPolicyPtr>& shadowPolicies() const override { return shadow_policies_; }
|
||||
@@ -787,11 +791,17 @@
|
||||
return parent_->internalActiveRedirectPolicy();
|
||||
}
|
||||
|
||||
- RouteConstSharedPtr clone(const std::string& name) const {
|
||||
- return std::make_shared<Envoy::Router::RouteEntryImplBase::DynamicRouteEntry>(parent_, name);
|
||||
+ RouteConstSharedPtr clone(const std::string& name,
|
||||
+ const std::string& origin_cluster = "") const {
|
||||
+ auto entry =
|
||||
+ std::make_shared<Envoy::Router::RouteEntryImplBase::DynamicRouteEntry>(parent_, name);
|
||||
+ entry->setOriginClusterName(origin_cluster);
|
||||
+ return entry;
|
||||
}
|
||||
|
||||
virtual RouteConstSharedPtr getRouteConstSharedPtr() const { return shared_from_this(); }
|
||||
+
|
||||
+ void setOriginClusterName(const std::string& name) { parent_->setOriginClusterName(name); }
|
||||
#endif
|
||||
|
||||
private:
|
||||
@@ -1039,6 +1049,7 @@
|
||||
|
||||
#if defined(ALIMESH)
|
||||
const InternalActiveRedirectPoliciesImpl internal_active_redirect_policy_;
|
||||
+ mutable std::string origin_cluster_name_;
|
||||
#endif
|
||||
};
|
||||
|
||||
315
envoy/1.20/patches/envoy/20231124-rds-optimize.patch
Normal file
315
envoy/1.20/patches/envoy/20231124-rds-optimize.patch
Normal file
@@ -0,0 +1,315 @@
|
||||
diff -Naur envoy/envoy/router/rds.h envoy-new/envoy/router/rds.h
|
||||
--- envoy/envoy/router/rds.h 2023-11-24 10:52:39.914235488 +0800
|
||||
+++ envoy-new/envoy/router/rds.h 2023-11-24 10:47:36.293873127 +0800
|
||||
@@ -51,12 +51,6 @@
|
||||
virtual void onConfigUpdate() PURE;
|
||||
|
||||
/**
|
||||
- * Validate if the route configuration can be applied to the context of the route config provider.
|
||||
- */
|
||||
- virtual void
|
||||
- validateConfig(const envoy::config::route::v3::RouteConfiguration& config) const PURE;
|
||||
-
|
||||
- /**
|
||||
* Callback used to request an update to the route configuration from the management server.
|
||||
* @param for_domain supplies the domain name that virtual hosts must match on
|
||||
* @param thread_local_dispatcher thread-local dispatcher
|
||||
diff -Naur envoy/envoy/router/route_config_update_receiver.h envoy-new/envoy/router/route_config_update_receiver.h
|
||||
--- envoy/envoy/router/route_config_update_receiver.h 2023-11-24 10:52:39.918235651 +0800
|
||||
+++ envoy-new/envoy/router/route_config_update_receiver.h 2023-11-24 10:47:36.293873127 +0800
|
||||
@@ -27,6 +27,7 @@
|
||||
* @param rc supplies the RouteConfiguration.
|
||||
* @param version_info supplies RouteConfiguration version.
|
||||
* @return bool whether RouteConfiguration has been updated.
|
||||
+ * @throw EnvoyException if the new config can't be applied.
|
||||
*/
|
||||
virtual bool onRdsUpdate(const envoy::config::route::v3::RouteConfiguration& rc,
|
||||
const std::string& version_info) PURE;
|
||||
diff -Naur envoy/source/common/router/rds_impl.cc envoy-new/source/common/router/rds_impl.cc
|
||||
--- envoy/source/common/router/rds_impl.cc 2023-11-24 10:52:40.194246888 +0800
|
||||
+++ envoy-new/source/common/router/rds_impl.cc 2023-11-24 10:47:36.293873127 +0800
|
||||
@@ -122,9 +122,6 @@
|
||||
throw EnvoyException(fmt::format("Unexpected RDS configuration (expecting {}): {}",
|
||||
route_config_name_, route_config.name()));
|
||||
}
|
||||
- if (route_config_provider_opt_.has_value()) {
|
||||
- route_config_provider_opt_.value()->validateConfig(route_config);
|
||||
- }
|
||||
std::unique_ptr<Init::ManagerImpl> noop_init_manager;
|
||||
std::unique_ptr<Cleanup> resume_rds;
|
||||
if (config_update_info_->onRdsUpdate(route_config, version_info)) {
|
||||
@@ -292,12 +289,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
-void RdsRouteConfigProviderImpl::validateConfig(
|
||||
- const envoy::config::route::v3::RouteConfiguration& config) const {
|
||||
- // TODO(lizan): consider cache the config here until onConfigUpdate.
|
||||
- ConfigImpl validation_config(config, optional_http_filters_, factory_context_, validator_, false);
|
||||
-}
|
||||
-
|
||||
// Schedules a VHDS request on the main thread and queues up the callback to use when the VHDS
|
||||
// response has been propagated to the worker thread that was the request origin.
|
||||
void RdsRouteConfigProviderImpl::requestVirtualHostsUpdate(
|
||||
diff -Naur envoy/source/common/router/rds_impl.h envoy-new/source/common/router/rds_impl.h
|
||||
--- envoy/source/common/router/rds_impl.h 2023-11-24 10:52:40.194246888 +0800
|
||||
+++ envoy-new/source/common/router/rds_impl.h 2023-11-24 10:47:36.293873127 +0800
|
||||
@@ -81,7 +81,6 @@
|
||||
}
|
||||
SystemTime lastUpdated() const override { return last_updated_; }
|
||||
void onConfigUpdate() override {}
|
||||
- void validateConfig(const envoy::config::route::v3::RouteConfiguration&) const override {}
|
||||
void requestVirtualHostsUpdate(const std::string&, Event::Dispatcher&,
|
||||
std::weak_ptr<Http::RouteConfigUpdatedCallback>) override {
|
||||
NOT_IMPLEMENTED_GCOVR_EXCL_LINE;
|
||||
@@ -209,7 +208,6 @@
|
||||
void requestVirtualHostsUpdate(
|
||||
const std::string& for_domain, Event::Dispatcher& thread_local_dispatcher,
|
||||
std::weak_ptr<Http::RouteConfigUpdatedCallback> route_config_updated_cb) override;
|
||||
- void validateConfig(const envoy::config::route::v3::RouteConfiguration& config) const override;
|
||||
|
||||
private:
|
||||
struct ThreadLocalConfig : public ThreadLocal::ThreadLocalObject {
|
||||
diff -Naur envoy/source/common/router/route_config_update_receiver_impl.cc envoy-new/source/common/router/route_config_update_receiver_impl.cc
|
||||
--- envoy/source/common/router/route_config_update_receiver_impl.cc 2023-11-24 10:52:40.194246888 +0800
|
||||
+++ envoy-new/source/common/router/route_config_update_receiver_impl.cc 2023-11-24 10:47:36.297873290 +0800
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "source/common/router/route_config_update_receiver_impl.h"
|
||||
|
||||
#include <string>
|
||||
+#include <utility>
|
||||
|
||||
#include "envoy/config/route/v3/route.pb.h"
|
||||
#include "envoy/service/discovery/v3/discovery.pb.h"
|
||||
@@ -14,23 +15,49 @@
|
||||
namespace Envoy {
|
||||
namespace Router {
|
||||
|
||||
+namespace {
|
||||
+
|
||||
+// Resets 'route_config::virtual_hosts' by merging VirtualHost contained in
|
||||
+// 'rds_vhosts' and 'vhds_vhosts'.
|
||||
+void rebuildRouteConfigVirtualHosts(
|
||||
+ const std::map<std::string, envoy::config::route::v3::VirtualHost>& rds_vhosts,
|
||||
+ const std::map<std::string, envoy::config::route::v3::VirtualHost>& vhds_vhosts,
|
||||
+ envoy::config::route::v3::RouteConfiguration& route_config) {
|
||||
+ route_config.clear_virtual_hosts();
|
||||
+ for (const auto& vhost : rds_vhosts) {
|
||||
+ route_config.mutable_virtual_hosts()->Add()->CopyFrom(vhost.second);
|
||||
+ }
|
||||
+ for (const auto& vhost : vhds_vhosts) {
|
||||
+ route_config.mutable_virtual_hosts()->Add()->CopyFrom(vhost.second);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+} // namespace
|
||||
+
|
||||
bool RouteConfigUpdateReceiverImpl::onRdsUpdate(
|
||||
const envoy::config::route::v3::RouteConfiguration& rc, const std::string& version_info) {
|
||||
const uint64_t new_hash = MessageUtil::hash(rc);
|
||||
if (new_hash == last_config_hash_) {
|
||||
return false;
|
||||
}
|
||||
- route_config_proto_ = std::make_unique<envoy::config::route::v3::RouteConfiguration>(rc);
|
||||
- last_config_hash_ = new_hash;
|
||||
const uint64_t new_vhds_config_hash = rc.has_vhds() ? MessageUtil::hash(rc.vhds()) : 0ul;
|
||||
+ std::map<std::string, envoy::config::route::v3::VirtualHost> rds_virtual_hosts;
|
||||
+ for (const auto& vhost : rc.virtual_hosts()) {
|
||||
+ rds_virtual_hosts.emplace(vhost.name(), vhost);
|
||||
+ }
|
||||
+ envoy::config::route::v3::RouteConfiguration new_route_config = rc;
|
||||
+ rebuildRouteConfigVirtualHosts(rds_virtual_hosts, *vhds_virtual_hosts_, new_route_config);
|
||||
+ auto new_config = std::make_shared<ConfigImpl>(
|
||||
+ new_route_config, optional_http_filters_, factory_context_,
|
||||
+ factory_context_.messageValidationContext().dynamicValidationVisitor(), false);
|
||||
+ // If the above validation/validation doesn't raise exception, update the
|
||||
+ // other cached config entries.
|
||||
+ config_ = new_config;
|
||||
+ rds_virtual_hosts_ = std::move(rds_virtual_hosts);
|
||||
+ last_config_hash_ = new_hash;
|
||||
+ *route_config_proto_ = std::move(new_route_config);
|
||||
vhds_configuration_changed_ = new_vhds_config_hash != last_vhds_config_hash_;
|
||||
last_vhds_config_hash_ = new_vhds_config_hash;
|
||||
- initializeRdsVhosts(*route_config_proto_);
|
||||
-
|
||||
- rebuildRouteConfig(rds_virtual_hosts_, *vhds_virtual_hosts_, *route_config_proto_);
|
||||
- config_ = std::make_shared<ConfigImpl>(
|
||||
- *route_config_proto_, optional_http_filters_, factory_context_,
|
||||
- factory_context_.messageValidationContext().dynamicValidationVisitor(), false);
|
||||
|
||||
onUpdateCommon(version_info);
|
||||
return true;
|
||||
@@ -50,8 +77,8 @@
|
||||
auto route_config_after_this_update =
|
||||
std::make_unique<envoy::config::route::v3::RouteConfiguration>();
|
||||
route_config_after_this_update->CopyFrom(*route_config_proto_);
|
||||
- rebuildRouteConfig(rds_virtual_hosts_, *vhosts_after_this_update,
|
||||
- *route_config_after_this_update);
|
||||
+ rebuildRouteConfigVirtualHosts(rds_virtual_hosts_, *vhosts_after_this_update,
|
||||
+ *route_config_after_this_update);
|
||||
|
||||
auto new_config = std::make_shared<ConfigImpl>(
|
||||
*route_config_after_this_update, optional_http_filters_, factory_context_,
|
||||
@@ -73,14 +100,6 @@
|
||||
config_info_.emplace(RouteConfigProvider::ConfigInfo{*route_config_proto_, last_config_version_});
|
||||
}
|
||||
|
||||
-void RouteConfigUpdateReceiverImpl::initializeRdsVhosts(
|
||||
- const envoy::config::route::v3::RouteConfiguration& route_configuration) {
|
||||
- rds_virtual_hosts_.clear();
|
||||
- for (const auto& vhost : route_configuration.virtual_hosts()) {
|
||||
- rds_virtual_hosts_.emplace(vhost.name(), vhost);
|
||||
- }
|
||||
-}
|
||||
-
|
||||
bool RouteConfigUpdateReceiverImpl::removeVhosts(
|
||||
std::map<std::string, envoy::config::route::v3::VirtualHost>& vhosts,
|
||||
const Protobuf::RepeatedPtrField<std::string>& removed_vhost_names) {
|
||||
@@ -110,18 +129,5 @@
|
||||
return vhosts_added;
|
||||
}
|
||||
|
||||
-void RouteConfigUpdateReceiverImpl::rebuildRouteConfig(
|
||||
- const std::map<std::string, envoy::config::route::v3::VirtualHost>& rds_vhosts,
|
||||
- const std::map<std::string, envoy::config::route::v3::VirtualHost>& vhds_vhosts,
|
||||
- envoy::config::route::v3::RouteConfiguration& route_config) {
|
||||
- route_config.clear_virtual_hosts();
|
||||
- for (const auto& vhost : rds_vhosts) {
|
||||
- route_config.mutable_virtual_hosts()->Add()->CopyFrom(vhost.second);
|
||||
- }
|
||||
- for (const auto& vhost : vhds_vhosts) {
|
||||
- route_config.mutable_virtual_hosts()->Add()->CopyFrom(vhost.second);
|
||||
- }
|
||||
-}
|
||||
-
|
||||
} // namespace Router
|
||||
} // namespace Envoy
|
||||
diff -Naur envoy/source/common/router/route_config_update_receiver_impl.h envoy-new/source/common/router/route_config_update_receiver_impl.h
|
||||
--- envoy/source/common/router/route_config_update_receiver_impl.h 2023-11-24 10:52:40.194246888 +0800
|
||||
+++ envoy-new/source/common/router/route_config_update_receiver_impl.h 2023-11-24 10:47:36.297873290 +0800
|
||||
@@ -27,15 +27,10 @@
|
||||
std::make_unique<std::map<std::string, envoy::config::route::v3::VirtualHost>>()),
|
||||
vhds_configuration_changed_(true), optional_http_filters_(optional_http_filters) {}
|
||||
|
||||
- void initializeRdsVhosts(const envoy::config::route::v3::RouteConfiguration& route_configuration);
|
||||
bool removeVhosts(std::map<std::string, envoy::config::route::v3::VirtualHost>& vhosts,
|
||||
const Protobuf::RepeatedPtrField<std::string>& removed_vhost_names);
|
||||
bool updateVhosts(std::map<std::string, envoy::config::route::v3::VirtualHost>& vhosts,
|
||||
const VirtualHostRefVector& added_vhosts);
|
||||
- void rebuildRouteConfig(
|
||||
- const std::map<std::string, envoy::config::route::v3::VirtualHost>& rds_vhosts,
|
||||
- const std::map<std::string, envoy::config::route::v3::VirtualHost>& vhds_vhosts,
|
||||
- envoy::config::route::v3::RouteConfiguration& route_config);
|
||||
bool onDemandFetchFailed(const envoy::service::discovery::v3::Resource& resource) const;
|
||||
void onUpdateCommon(const std::string& version_info);
|
||||
|
||||
diff -Naur envoy/source/server/admin/admin.h envoy-new/source/server/admin/admin.h
|
||||
--- envoy/source/server/admin/admin.h 2023-11-24 10:52:41.358294284 +0800
|
||||
+++ envoy-new/source/server/admin/admin.h 2023-11-24 10:47:36.297873290 +0800
|
||||
@@ -234,7 +234,6 @@
|
||||
absl::optional<ConfigInfo> configInfo() const override { return {}; }
|
||||
SystemTime lastUpdated() const override { return time_source_.systemTime(); }
|
||||
void onConfigUpdate() override {}
|
||||
- void validateConfig(const envoy::config::route::v3::RouteConfiguration&) const override {}
|
||||
void requestVirtualHostsUpdate(const std::string&, Event::Dispatcher&,
|
||||
std::weak_ptr<Http::RouteConfigUpdatedCallback>) override {
|
||||
NOT_IMPLEMENTED_GCOVR_EXCL_LINE;
|
||||
diff -Naur envoy/test/common/router/rds_impl_test.cc envoy-new/test/common/router/rds_impl_test.cc
|
||||
--- envoy/test/common/router/rds_impl_test.cc 2023-11-24 10:52:40.714268062 +0800
|
||||
+++ envoy-new/test/common/router/rds_impl_test.cc 2023-11-24 10:47:36.297873290 +0800
|
||||
@@ -528,34 +528,66 @@
|
||||
rds_callbacks_->onConfigUpdate(decoded_resources.refvec_, response1.version_info());
|
||||
}
|
||||
|
||||
-// Validate behavior when the config is delivered but it fails PGV validation.
|
||||
+// Validates behavior when the config is delivered but it fails PGV validation.
|
||||
+// The invalid config won't affect existing valid config.
|
||||
TEST_F(RdsImplTest, FailureInvalidConfig) {
|
||||
InSequence s;
|
||||
|
||||
setup();
|
||||
+ EXPECT_CALL(init_watcher_, ready());
|
||||
|
||||
- const std::string response1_json = R"EOF(
|
||||
+ const std::string valid_json = R"EOF(
|
||||
{
|
||||
"version_info": "1",
|
||||
"resources": [
|
||||
{
|
||||
"@type": "type.googleapis.com/envoy.config.route.v3.RouteConfiguration",
|
||||
- "name": "INVALID_NAME_FOR_route_config",
|
||||
+ "name": "foo_route_config",
|
||||
"virtual_hosts": null
|
||||
}
|
||||
]
|
||||
}
|
||||
)EOF";
|
||||
+
|
||||
auto response1 =
|
||||
- TestUtility::parseYaml<envoy::service::discovery::v3::DiscoveryResponse>(response1_json);
|
||||
+ TestUtility::parseYaml<envoy::service::discovery::v3::DiscoveryResponse>(valid_json);
|
||||
const auto decoded_resources =
|
||||
TestUtility::decodeResources<envoy::config::route::v3::RouteConfiguration>(response1);
|
||||
+ EXPECT_NO_THROW(
|
||||
+ rds_callbacks_->onConfigUpdate(decoded_resources.refvec_, response1.version_info()));
|
||||
+ // Sadly the RdsRouteConfigSubscription privately inherited from
|
||||
+ // SubscriptionCallbacks, so we has to use reinterpret_cast here.
|
||||
+ RdsRouteConfigSubscription* rds_subscription =
|
||||
+ reinterpret_cast<RdsRouteConfigSubscription*>(rds_callbacks_);
|
||||
+ auto config_impl_pointer = rds_subscription->routeConfigProvider().value()->config();
|
||||
+ // Now send an invalid config update.
|
||||
+ const std::string invalid_json =
|
||||
+ R"EOF(
|
||||
+{
|
||||
+ "version_info": "1",
|
||||
+ "resources": [
|
||||
+ {
|
||||
+ "@type": "type.googleapis.com/envoy.config.route.v3.RouteConfiguration",
|
||||
+ "name": "INVALID_NAME_FOR_route_config",
|
||||
+ "virtual_hosts": null
|
||||
+ }
|
||||
+ ]
|
||||
+}
|
||||
+)EOF";
|
||||
+
|
||||
+ auto response2 =
|
||||
+ TestUtility::parseYaml<envoy::service::discovery::v3::DiscoveryResponse>(invalid_json);
|
||||
+ const auto decoded_resources_2 =
|
||||
+ TestUtility::decodeResources<envoy::config::route::v3::RouteConfiguration>(response2);
|
||||
|
||||
- EXPECT_CALL(init_watcher_, ready());
|
||||
EXPECT_THROW_WITH_MESSAGE(
|
||||
- rds_callbacks_->onConfigUpdate(decoded_resources.refvec_, response1.version_info()),
|
||||
+ rds_callbacks_->onConfigUpdate(decoded_resources_2.refvec_, response2.version_info()),
|
||||
EnvoyException,
|
||||
- "Unexpected RDS configuration (expecting foo_route_config): INVALID_NAME_FOR_route_config");
|
||||
+ "Unexpected RDS configuration (expecting foo_route_config): "
|
||||
+ "INVALID_NAME_FOR_route_config");
|
||||
+
|
||||
+ // Verify that the config is still the old value.
|
||||
+ ASSERT_EQ(config_impl_pointer, rds_subscription->routeConfigProvider().value()->config());
|
||||
}
|
||||
|
||||
// rds and vhds configurations change together
|
||||
diff -Naur envoy/test/mocks/router/mocks.h envoy-new/test/mocks/router/mocks.h
|
||||
--- envoy/test/mocks/router/mocks.h 2023-11-24 10:52:41.370294773 +0800
|
||||
+++ envoy-new/test/mocks/router/mocks.h 2023-11-24 10:47:36.301873453 +0800
|
||||
@@ -538,7 +538,6 @@
|
||||
MOCK_METHOD(absl::optional<ConfigInfo>, configInfo, (), (const));
|
||||
MOCK_METHOD(SystemTime, lastUpdated, (), (const));
|
||||
MOCK_METHOD(void, onConfigUpdate, ());
|
||||
- MOCK_METHOD(void, validateConfig, (const envoy::config::route::v3::RouteConfiguration&), (const));
|
||||
MOCK_METHOD(void, requestVirtualHostsUpdate,
|
||||
(const std::string&, Event::Dispatcher&,
|
||||
std::weak_ptr<Http::RouteConfigUpdatedCallback> route_config_updated_cb));
|
||||
diff -Naur envoy/tools/spelling/spelling_dictionary.txt envoy-new/tools/spelling/spelling_dictionary.txt
|
||||
--- envoy/tools/spelling/spelling_dictionary.txt 2023-11-24 10:52:41.370294773 +0800
|
||||
+++ envoy-new/tools/spelling/spelling_dictionary.txt 2023-11-24 10:48:54.969076506 +0800
|
||||
@@ -1303,6 +1303,7 @@
|
||||
ep
|
||||
suri
|
||||
transid
|
||||
+vhosts
|
||||
WAF
|
||||
TRI
|
||||
tmd
|
||||
1502
envoy/1.20/patches/envoy/20231218-dubbo-optimize.patch
Normal file
1502
envoy/1.20/patches/envoy/20231218-dubbo-optimize.patch
Normal file
File diff suppressed because one or more lines are too long
483
envoy/1.20/patches/envoy/20240104-enhance-srds.patch
Normal file
483
envoy/1.20/patches/envoy/20240104-enhance-srds.patch
Normal file
@@ -0,0 +1,483 @@
|
||||
diff -Naur envoy/api/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.proto envoy-new/api/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.proto
|
||||
--- envoy/api/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.proto 2024-01-04 21:07:40.000000000 +0800
|
||||
+++ envoy-new/api/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.proto 2024-01-04 21:09:13.000000000 +0800
|
||||
@@ -888,11 +888,31 @@
|
||||
}
|
||||
}
|
||||
|
||||
+ message HostValueExtractor {
|
||||
+ option (udpa.annotations.versioning).previous_message_type =
|
||||
+ "envoy.config.filter.network.http_connection_manager.v2.ScopedRoutes.ScopeKeyBuilder."
|
||||
+ "FragmentBuilder.HostValueExtractor";
|
||||
+
|
||||
+ // The maximum number of host superset recomputes. If not specified, defaults to 100.
|
||||
+ google.protobuf.UInt32Value max_recompute_num = 1;
|
||||
+ }
|
||||
+
|
||||
+ message LocalPortValueExtractor {
|
||||
+ option (udpa.annotations.versioning).previous_message_type =
|
||||
+ "envoy.config.filter.network.http_connection_manager.v2.ScopedRoutes.ScopeKeyBuilder."
|
||||
+ "FragmentBuilder.LocalPortValueExtractor";
|
||||
+ }
|
||||
+
|
||||
+
|
||||
oneof type {
|
||||
option (validate.required) = true;
|
||||
|
||||
// Specifies how a header field's value should be extracted.
|
||||
HeaderValueExtractor header_value_extractor = 1;
|
||||
+
|
||||
+ HostValueExtractor host_value_extractor = 101;
|
||||
+
|
||||
+ LocalPortValueExtractor local_port_value_extractor = 102;
|
||||
}
|
||||
}
|
||||
|
||||
diff -Naur envoy/envoy/router/scopes.h envoy-new/envoy/router/scopes.h
|
||||
--- envoy/envoy/router/scopes.h 2024-01-04 21:07:38.000000000 +0800
|
||||
+++ envoy-new/envoy/router/scopes.h 2024-01-04 21:09:13.000000000 +0800
|
||||
@@ -92,7 +92,12 @@
|
||||
* @param headers the request headers to match the scoped routing configuration against.
|
||||
* @return ConfigConstSharedPtr the router's Config matching the request headers.
|
||||
*/
|
||||
+#if defined ALIMESH
|
||||
+ virtual ConfigConstSharedPtr getRouteConfig(const Http::HeaderMap& headers,
|
||||
+ const StreamInfo::StreamInfo& info) const PURE;
|
||||
+#else
|
||||
virtual ConfigConstSharedPtr getRouteConfig(const Http::HeaderMap& headers) const PURE;
|
||||
+#endif
|
||||
|
||||
/**
|
||||
* Based on the incoming HTTP request headers, returns the hash value of its scope key.
|
||||
@@ -100,6 +105,12 @@
|
||||
* @return unique_ptr of the scope key computed from header.
|
||||
*/
|
||||
virtual ScopeKeyPtr computeScopeKey(const Http::HeaderMap&) const { return {}; }
|
||||
+
|
||||
+#if defined(ALIMESH)
|
||||
+ virtual ScopeKeyPtr computeScopeKey(const Http::HeaderMap&, const StreamInfo::StreamInfo&) const {
|
||||
+ return {};
|
||||
+ };
|
||||
+#endif
|
||||
};
|
||||
|
||||
using ScopedConfigConstSharedPtr = std::shared_ptr<const ScopedConfig>;
|
||||
diff -Naur envoy/source/common/http/conn_manager_impl.cc envoy-new/source/common/http/conn_manager_impl.cc
|
||||
--- envoy/source/common/http/conn_manager_impl.cc 2024-01-04 21:07:41.000000000 +0800
|
||||
+++ envoy-new/source/common/http/conn_manager_impl.cc 2024-01-04 21:09:13.000000000 +0800
|
||||
@@ -577,8 +577,13 @@
|
||||
requestVhdsUpdate(host_header, thread_local_dispatcher, std::move(route_config_updated_cb));
|
||||
return;
|
||||
} else if (parent_.snapped_scoped_routes_config_ != nullptr) {
|
||||
+#if defined(ALIMESH)
|
||||
+ Router::ScopeKeyPtr scope_key = parent_.snapped_scoped_routes_config_->computeScopeKey(
|
||||
+ *parent_.request_headers_, parent_.connection()->streamInfo());
|
||||
+#else
|
||||
Router::ScopeKeyPtr scope_key =
|
||||
parent_.snapped_scoped_routes_config_->computeScopeKey(*parent_.request_headers_);
|
||||
+#endif
|
||||
// If scope_key is not null, the scope exists but RouteConfiguration is not initialized.
|
||||
if (scope_key != nullptr) {
|
||||
requestSrdsUpdate(std::move(scope_key), thread_local_dispatcher,
|
||||
@@ -1197,7 +1202,13 @@
|
||||
void ConnectionManagerImpl::ActiveStream::snapScopedRouteConfig() {
|
||||
// NOTE: if a RDS subscription hasn't got a RouteConfiguration back, a Router::NullConfigImpl is
|
||||
// returned, in that case we let it pass.
|
||||
+#if defined(ALIMESH)
|
||||
+ snapped_route_config_ =
|
||||
+ snapped_scoped_routes_config_->getRouteConfig(*request_headers_, connection()->streamInfo());
|
||||
+#else
|
||||
snapped_route_config_ = snapped_scoped_routes_config_->getRouteConfig(*request_headers_);
|
||||
+
|
||||
+#endif
|
||||
if (snapped_route_config_ == nullptr) {
|
||||
ENVOY_STREAM_LOG(trace, "can't find SRDS scope.", *this);
|
||||
// TODO(stevenzzzz): Consider to pass an error message to router filter, so that it can
|
||||
diff -Naur envoy/source/common/router/scoped_config_impl.cc envoy-new/source/common/router/scoped_config_impl.cc
|
||||
--- envoy/source/common/router/scoped_config_impl.cc 2024-01-04 21:07:36.000000000 +0800
|
||||
+++ envoy-new/source/common/router/scoped_config_impl.cc 2024-01-04 21:09:13.000000000 +0800
|
||||
@@ -6,6 +6,160 @@
|
||||
namespace Envoy {
|
||||
namespace Router {
|
||||
|
||||
+#if defined(ALIMESH)
|
||||
+namespace {
|
||||
+
|
||||
+std::string maskFirstDNSLabel(absl::string_view host) {
|
||||
+ if (host == "*") {
|
||||
+ return std::string(host);
|
||||
+ }
|
||||
+ if (host.size() < 2) {
|
||||
+ return "*";
|
||||
+ }
|
||||
+ size_t start_pos = (host[0] == '*' && host[1] == '.') ? 2 : 0;
|
||||
+ size_t dot_pos = host.find('.', start_pos);
|
||||
+ if (dot_pos != absl::string_view::npos) {
|
||||
+ return absl::StrCat("*", absl::string_view(host.data() + dot_pos, host.size() - dot_pos));
|
||||
+ }
|
||||
+ return "*";
|
||||
+}
|
||||
+
|
||||
+} // namespace
|
||||
+
|
||||
+LocalPortValueExtractorImpl::LocalPortValueExtractorImpl(
|
||||
+ ScopedRoutes::ScopeKeyBuilder::FragmentBuilder&& config)
|
||||
+ : FragmentBuilderBase(std::move(config)) {
|
||||
+ ASSERT(config_.type_case() ==
|
||||
+ ScopedRoutes::ScopeKeyBuilder::FragmentBuilder::kLocalPortValueExtractor,
|
||||
+ "local_port_value_extractor is not set.");
|
||||
+}
|
||||
+
|
||||
+std::unique_ptr<ScopeKeyFragmentBase> LocalPortValueExtractorImpl::computeFragment(
|
||||
+ const Http::HeaderMap&, const StreamInfo::StreamInfo& info, ReComputeCbPtr&) const {
|
||||
+ auto port = info.downstreamAddressProvider().localAddress()->ip()->port();
|
||||
+ return std::make_unique<StringKeyFragment>(std::to_string(long(port)));
|
||||
+}
|
||||
+
|
||||
+HostValueExtractorImpl::HostValueExtractorImpl(
|
||||
+ ScopedRoutes::ScopeKeyBuilder::FragmentBuilder&& config)
|
||||
+ : FragmentBuilderBase(std::move(config)),
|
||||
+ host_value_extractor_config_(config_.host_value_extractor()),
|
||||
+ max_recompute_num_(PROTOBUF_GET_WRAPPED_OR_DEFAULT(
|
||||
+ host_value_extractor_config_, max_recompute_num, DefaultMaxRecomputeNum)) {
|
||||
+ ASSERT(config_.type_case() == ScopedRoutes::ScopeKeyBuilder::FragmentBuilder::kHostValueExtractor,
|
||||
+ "host_value_extractor is not set.");
|
||||
+}
|
||||
+
|
||||
+std::unique_ptr<ScopeKeyFragmentBase>
|
||||
+HostValueExtractorImpl::reComputeHelper(const std::string& host, ReComputeCbPtr& next_recompute,
|
||||
+ uint32_t recompute_seq) const {
|
||||
+ if (recompute_seq == max_recompute_num_) {
|
||||
+ ENVOY_LOG_MISC(warn,
|
||||
+ "recompute host fragment failed, maximum number of recalculations exceeded");
|
||||
+ return nullptr;
|
||||
+ }
|
||||
+ if (host == "*") {
|
||||
+ *next_recompute = nullptr;
|
||||
+ return nullptr;
|
||||
+ }
|
||||
+ auto masked_host = maskFirstDNSLabel(host);
|
||||
+ *next_recompute = [this, masked_host, recompute_seq,
|
||||
+ next_recompute]() mutable -> std::unique_ptr<ScopeKeyFragmentBase> {
|
||||
+ return reComputeHelper(masked_host, next_recompute, recompute_seq + 1);
|
||||
+ };
|
||||
+ return std::make_unique<StringKeyFragment>(masked_host);
|
||||
+}
|
||||
+
|
||||
+std::unique_ptr<ScopeKeyFragmentBase>
|
||||
+HostValueExtractorImpl::computeFragment(const Http::HeaderMap& headers,
|
||||
+ const StreamInfo::StreamInfo&,
|
||||
+ ReComputeCbPtr& recompute) const {
|
||||
+ auto fragment = computeFragment(headers);
|
||||
+ auto host = static_cast<const Http::RequestHeaderMap&>(headers).getHostValue();
|
||||
+ *recompute = [this, host, recompute]() mutable -> std::unique_ptr<ScopeKeyFragmentBase> {
|
||||
+ return reComputeHelper(std::string(host), recompute, 0);
|
||||
+ };
|
||||
+ return fragment;
|
||||
+}
|
||||
+
|
||||
+std::unique_ptr<ScopeKeyFragmentBase>
|
||||
+HostValueExtractorImpl::computeFragment(const Http::HeaderMap& headers) const {
|
||||
+ return std::make_unique<StringKeyFragment>(
|
||||
+ static_cast<const Http::RequestHeaderMap&>(headers).getHostValue());
|
||||
+}
|
||||
+
|
||||
+std::unique_ptr<ScopeKeyFragmentBase>
|
||||
+HeaderValueExtractorImpl::computeFragment(const Http::HeaderMap& headers,
|
||||
+ const StreamInfo::StreamInfo&, ReComputeCbPtr&) const {
|
||||
+ return computeFragment(headers);
|
||||
+}
|
||||
+
|
||||
+ScopeKeyPtr ScopeKeyBuilderImpl::computeScopeKey(const Http::HeaderMap& headers,
|
||||
+ const StreamInfo::StreamInfo& info,
|
||||
+ std::function<ScopeKeyPtr()>& recompute) const {
|
||||
+ ScopeKey key;
|
||||
+ bool recomputeable = false;
|
||||
+ auto recompute_cbs = std::make_shared<std::vector<ReComputeCbPtr>>();
|
||||
+ for (const auto& builder : fragment_builders_) {
|
||||
+ // returns nullopt if a null fragment is found.
|
||||
+ ReComputeCbPtr recompute_fragment_cb = std::make_shared<ReComputeCb>();
|
||||
+ std::unique_ptr<ScopeKeyFragmentBase> fragment =
|
||||
+ builder->computeFragment(headers, info, recompute_fragment_cb);
|
||||
+ if (fragment == nullptr) {
|
||||
+ return nullptr;
|
||||
+ }
|
||||
+ if (*recompute_fragment_cb == nullptr) {
|
||||
+ auto key_fragment = static_cast<StringKeyFragment*>(fragment.get());
|
||||
+ auto copied_fragment = std::make_shared<StringKeyFragment>(*key_fragment);
|
||||
+ auto recompute_cb =
|
||||
+ std::make_shared<ReComputeCb>([copied_fragment]() -> std::unique_ptr<StringKeyFragment> {
|
||||
+ return std::make_unique<StringKeyFragment>(*copied_fragment);
|
||||
+ });
|
||||
+ recompute_cbs->push_back(recompute_cb);
|
||||
+ } else {
|
||||
+ recomputeable = true;
|
||||
+ recompute_cbs->push_back(recompute_fragment_cb);
|
||||
+ }
|
||||
+ key.addFragment(std::move(fragment));
|
||||
+ }
|
||||
+ if (recomputeable) {
|
||||
+ recompute = [&recompute, recompute_cbs]() mutable -> ScopeKeyPtr {
|
||||
+ ScopeKey new_key;
|
||||
+ for (auto& cb : *recompute_cbs) {
|
||||
+ auto new_fragment = (*cb)();
|
||||
+ if (new_fragment == nullptr) {
|
||||
+ return nullptr;
|
||||
+ }
|
||||
+ if (*cb == nullptr) {
|
||||
+ recompute = nullptr;
|
||||
+ }
|
||||
+ new_key.addFragment(std::move(new_fragment));
|
||||
+ }
|
||||
+ return std::make_unique<ScopeKey>(std::move(new_key));
|
||||
+ };
|
||||
+ }
|
||||
+ return std::make_unique<ScopeKey>(std::move(key));
|
||||
+}
|
||||
+
|
||||
+ScopeKeyPtr ScopedConfigImpl::computeScopeKey(const Http::HeaderMap& headers,
|
||||
+ const StreamInfo::StreamInfo& info) const {
|
||||
+ std::function<Router::ScopeKeyPtr()> recompute;
|
||||
+ ScopeKeyPtr scope_key = scope_key_builder_.computeScopeKey(headers, info, recompute);
|
||||
+ if (scope_key == nullptr) {
|
||||
+ return nullptr;
|
||||
+ }
|
||||
+ decltype(scoped_route_info_by_key_.begin()) iter;
|
||||
+ do {
|
||||
+ iter = scoped_route_info_by_key_.find(scope_key->hash());
|
||||
+ if (iter != scoped_route_info_by_key_.end()) {
|
||||
+ return scope_key;
|
||||
+ }
|
||||
+ } while (recompute != nullptr && (scope_key = recompute()));
|
||||
+ return nullptr;
|
||||
+}
|
||||
+
|
||||
+#endif
|
||||
+
|
||||
bool ScopeKey::operator!=(const ScopeKey& other) const { return !(*this == other); }
|
||||
|
||||
bool ScopeKey::operator==(const ScopeKey& other) const {
|
||||
@@ -95,6 +249,16 @@
|
||||
: ScopeKeyBuilderBase(std::move(config)) {
|
||||
for (const auto& fragment_builder : config_.fragments()) {
|
||||
switch (fragment_builder.type_case()) {
|
||||
+#if defined(ALIMESH)
|
||||
+ case ScopedRoutes::ScopeKeyBuilder::FragmentBuilder::kHostValueExtractor:
|
||||
+ fragment_builders_.emplace_back(std::make_unique<HostValueExtractorImpl>(
|
||||
+ ScopedRoutes::ScopeKeyBuilder::FragmentBuilder(fragment_builder)));
|
||||
+ break;
|
||||
+ case ScopedRoutes::ScopeKeyBuilder::FragmentBuilder::kLocalPortValueExtractor:
|
||||
+ fragment_builders_.emplace_back(std::make_unique<LocalPortValueExtractorImpl>(
|
||||
+ ScopedRoutes::ScopeKeyBuilder::FragmentBuilder(fragment_builder)));
|
||||
+ break;
|
||||
+#endif
|
||||
case ScopedRoutes::ScopeKeyBuilder::FragmentBuilder::kHeaderValueExtractor:
|
||||
fragment_builders_.emplace_back(std::make_unique<HeaderValueExtractorImpl>(
|
||||
ScopedRoutes::ScopeKeyBuilder::FragmentBuilder(fragment_builder)));
|
||||
@@ -143,6 +307,22 @@
|
||||
}
|
||||
|
||||
Router::ConfigConstSharedPtr
|
||||
+#if defined(ALIMESH)
|
||||
+ScopedConfigImpl::getRouteConfig(const Http::HeaderMap& headers,
|
||||
+ const StreamInfo::StreamInfo& info) const {
|
||||
+ std::function<ScopeKeyPtr()> recompute;
|
||||
+ ScopeKeyPtr scope_key = scope_key_builder_.computeScopeKey(headers, info, recompute);
|
||||
+ if (scope_key == nullptr) {
|
||||
+ return nullptr;
|
||||
+ }
|
||||
+ decltype(scoped_route_info_by_key_.begin()) iter;
|
||||
+ do {
|
||||
+ iter = scoped_route_info_by_key_.find(scope_key->hash());
|
||||
+ if (iter != scoped_route_info_by_key_.end()) {
|
||||
+ return iter->second->routeConfig();
|
||||
+ }
|
||||
+ } while (recompute != nullptr && (scope_key = recompute()));
|
||||
+#else
|
||||
ScopedConfigImpl::getRouteConfig(const Http::HeaderMap& headers) const {
|
||||
ScopeKeyPtr scope_key = scope_key_builder_.computeScopeKey(headers);
|
||||
if (scope_key == nullptr) {
|
||||
@@ -152,6 +332,7 @@
|
||||
if (iter != scoped_route_info_by_key_.end()) {
|
||||
return iter->second->routeConfig();
|
||||
}
|
||||
+#endif
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
diff -Naur envoy/source/common/router/scoped_config_impl.h envoy-new/source/common/router/scoped_config_impl.h
|
||||
--- envoy/source/common/router/scoped_config_impl.h 2024-01-04 21:07:36.000000000 +0800
|
||||
+++ envoy-new/source/common/router/scoped_config_impl.h 2024-01-04 21:09:13.000000000 +0800
|
||||
@@ -22,6 +22,11 @@
|
||||
|
||||
using envoy::extensions::filters::network::http_connection_manager::v3::ScopedRoutes;
|
||||
|
||||
+#if defined(ALIMESH)
|
||||
+using ReComputeCb = std::function<std::unique_ptr<ScopeKeyFragmentBase>()>;
|
||||
+using ReComputeCbPtr = std::shared_ptr<ReComputeCb>;
|
||||
+#endif
|
||||
+
|
||||
/**
|
||||
* Base class for fragment builders.
|
||||
*/
|
||||
@@ -36,6 +41,12 @@
|
||||
virtual std::unique_ptr<ScopeKeyFragmentBase>
|
||||
computeFragment(const Http::HeaderMap& headers) const PURE;
|
||||
|
||||
+#if defined(ALIMESH)
|
||||
+ virtual std::unique_ptr<ScopeKeyFragmentBase>
|
||||
+ computeFragment(const Http::HeaderMap& headers, const StreamInfo::StreamInfo& info,
|
||||
+ ReComputeCbPtr& recompute) const PURE;
|
||||
+#endif
|
||||
+
|
||||
protected:
|
||||
const ScopedRoutes::ScopeKeyBuilder::FragmentBuilder config_;
|
||||
};
|
||||
@@ -47,11 +58,54 @@
|
||||
std::unique_ptr<ScopeKeyFragmentBase>
|
||||
computeFragment(const Http::HeaderMap& headers) const override;
|
||||
|
||||
+#if defined(ALIMESH)
|
||||
+ std::unique_ptr<ScopeKeyFragmentBase> computeFragment(const Http::HeaderMap& headers,
|
||||
+ const StreamInfo::StreamInfo& info,
|
||||
+ ReComputeCbPtr& recompute) const override;
|
||||
+#endif
|
||||
+
|
||||
private:
|
||||
const ScopedRoutes::ScopeKeyBuilder::FragmentBuilder::HeaderValueExtractor&
|
||||
header_value_extractor_config_;
|
||||
};
|
||||
|
||||
+#if defined(ALIMESH)
|
||||
+class HostValueExtractorImpl : public FragmentBuilderBase {
|
||||
+public:
|
||||
+ explicit HostValueExtractorImpl(ScopedRoutes::ScopeKeyBuilder::FragmentBuilder&& config);
|
||||
+
|
||||
+ std::unique_ptr<ScopeKeyFragmentBase>
|
||||
+ computeFragment(const Http::HeaderMap& headers) const override;
|
||||
+
|
||||
+ std::unique_ptr<ScopeKeyFragmentBase> computeFragment(const Http::HeaderMap& headers,
|
||||
+ const StreamInfo::StreamInfo& info,
|
||||
+ ReComputeCbPtr& recompute) const override;
|
||||
+
|
||||
+private:
|
||||
+ std::unique_ptr<ScopeKeyFragmentBase> reComputeHelper(const std::string& host,
|
||||
+ ReComputeCbPtr& next_recompute,
|
||||
+ uint32_t recompute_seq) const;
|
||||
+
|
||||
+ static constexpr uint32_t DefaultMaxRecomputeNum = 100;
|
||||
+
|
||||
+ const ScopedRoutes::ScopeKeyBuilder::FragmentBuilder::HostValueExtractor&
|
||||
+ host_value_extractor_config_;
|
||||
+ const uint32_t max_recompute_num_;
|
||||
+};
|
||||
+
|
||||
+class LocalPortValueExtractorImpl : public FragmentBuilderBase {
|
||||
+public:
|
||||
+ explicit LocalPortValueExtractorImpl(ScopedRoutes::ScopeKeyBuilder::FragmentBuilder&& config);
|
||||
+
|
||||
+ std::unique_ptr<ScopeKeyFragmentBase> computeFragment(const Http::HeaderMap&) const override {
|
||||
+ return nullptr;
|
||||
+ };
|
||||
+
|
||||
+ std::unique_ptr<ScopeKeyFragmentBase> computeFragment(const Http::HeaderMap& headers,
|
||||
+ const StreamInfo::StreamInfo& info,
|
||||
+ ReComputeCbPtr& recompute) const override;
|
||||
+};
|
||||
+#endif
|
||||
/**
|
||||
* Base class for ScopeKeyBuilder implementations.
|
||||
*/
|
||||
@@ -64,6 +118,12 @@
|
||||
// Computes scope key for given headers, returns nullptr if a key can't be computed.
|
||||
virtual ScopeKeyPtr computeScopeKey(const Http::HeaderMap& headers) const PURE;
|
||||
|
||||
+#if defined(ALIMESH)
|
||||
+ virtual ScopeKeyPtr computeScopeKey(const Http::HeaderMap& headers,
|
||||
+ const StreamInfo::StreamInfo& info,
|
||||
+ std::function<ScopeKeyPtr()>& recompute) const PURE;
|
||||
+#endif
|
||||
+
|
||||
protected:
|
||||
const ScopedRoutes::ScopeKeyBuilder config_;
|
||||
};
|
||||
@@ -74,6 +134,11 @@
|
||||
|
||||
ScopeKeyPtr computeScopeKey(const Http::HeaderMap& headers) const override;
|
||||
|
||||
+#if defined(ALIMESH)
|
||||
+ ScopeKeyPtr computeScopeKey(const Http::HeaderMap& headers, const StreamInfo::StreamInfo& info,
|
||||
+ std::function<ScopeKeyPtr()>& recompute) const override;
|
||||
+#endif
|
||||
+
|
||||
private:
|
||||
std::vector<std::unique_ptr<FragmentBuilderBase>> fragment_builders_;
|
||||
};
|
||||
@@ -118,10 +183,20 @@
|
||||
void removeRoutingScopes(const std::vector<std::string>& scope_names);
|
||||
|
||||
// Envoy::Router::ScopedConfig
|
||||
+#if defined(ALIMESH)
|
||||
+ Router::ConfigConstSharedPtr getRouteConfig(const Http::HeaderMap& headers,
|
||||
+ const StreamInfo::StreamInfo& info) const override;
|
||||
+#else
|
||||
Router::ConfigConstSharedPtr getRouteConfig(const Http::HeaderMap& headers) const override;
|
||||
+#endif
|
||||
// The return value is not null only if the scope corresponding to the header exists.
|
||||
ScopeKeyPtr computeScopeKey(const Http::HeaderMap& headers) const override;
|
||||
|
||||
+#if defined(ALIMESH)
|
||||
+ ScopeKeyPtr computeScopeKey(const Http::HeaderMap& headers,
|
||||
+ const StreamInfo::StreamInfo& info) const override;
|
||||
+#endif
|
||||
+
|
||||
private:
|
||||
ScopeKeyBuilderImpl scope_key_builder_;
|
||||
// From scope name to cached ScopedRouteInfo.
|
||||
@@ -135,9 +210,16 @@
|
||||
*/
|
||||
class NullScopedConfigImpl : public ScopedConfig {
|
||||
public:
|
||||
+#if defined(ALIMESH)
|
||||
+ Router::ConfigConstSharedPtr getRouteConfig(const Http::HeaderMap&,
|
||||
+ const StreamInfo::StreamInfo&) const override {
|
||||
+ return std::make_shared<const NullConfigImpl>();
|
||||
+ }
|
||||
+#else
|
||||
Router::ConfigConstSharedPtr getRouteConfig(const Http::HeaderMap&) const override {
|
||||
return std::make_shared<const NullConfigImpl>();
|
||||
}
|
||||
+#endif
|
||||
};
|
||||
|
||||
} // namespace Router
|
||||
diff -Naur envoy/source/extensions/filters/http/on_demand/on_demand_update.cc envoy-new/source/extensions/filters/http/on_demand/on_demand_update.cc
|
||||
--- envoy/source/extensions/filters/http/on_demand/on_demand_update.cc 2024-01-04 21:07:33.000000000 +0800
|
||||
+++ envoy-new/source/extensions/filters/http/on_demand/on_demand_update.cc 2024-01-04 21:09:13.000000000 +0800
|
||||
@@ -50,7 +50,11 @@
|
||||
// This is the callback which is called when an update requested in requestRouteConfigUpdate()
|
||||
// has been propagated to workers, at which point the request processing is restarted from the
|
||||
// beginning.
|
||||
+#if defined(ALIMESH)
|
||||
+void OnDemandRouteUpdate::onRouteConfigUpdateCompletion(bool) {
|
||||
+#else
|
||||
void OnDemandRouteUpdate::onRouteConfigUpdateCompletion(bool route_exists) {
|
||||
+#endif
|
||||
filter_iteration_state_ = Http::FilterHeadersStatus::Continue;
|
||||
|
||||
// Don't call continueDecoding in the middle of decodeHeaders()
|
||||
@@ -58,12 +62,14 @@
|
||||
return;
|
||||
}
|
||||
|
||||
+#if !defined(ALIMESH)
|
||||
if (route_exists && // route can be resolved after an on-demand
|
||||
// VHDS update
|
||||
!callbacks_->decodingBuffer() && // Redirects with body not yet supported.
|
||||
callbacks_->recreateStream(/*headers=*/nullptr)) {
|
||||
return;
|
||||
}
|
||||
+#endif
|
||||
|
||||
// route cannot be resolved after an on-demand VHDS update or
|
||||
// recreating stream failed, continue the filter-chain
|
||||
49
envoy/1.20/patches/envoy/20240110-fix-srds.patch
Normal file
49
envoy/1.20/patches/envoy/20240110-fix-srds.patch
Normal file
@@ -0,0 +1,49 @@
|
||||
diff -Naur envoy/source/common/router/BUILD envoy-new/source/common/router/BUILD
|
||||
--- envoy/source/common/router/BUILD 2024-01-10 20:10:14.505600746 +0800
|
||||
+++ envoy-new/source/common/router/BUILD 2024-01-10 20:07:25.960379955 +0800
|
||||
@@ -212,6 +212,7 @@
|
||||
"//envoy/router:rds_interface",
|
||||
"//envoy/router:scopes_interface",
|
||||
"//envoy/thread_local:thread_local_interface",
|
||||
+ "//source/common/http:header_utility_lib",
|
||||
"@envoy_api//envoy/config/route/v3:pkg_cc_proto",
|
||||
"@envoy_api//envoy/extensions/filters/network/http_connection_manager/v3:pkg_cc_proto",
|
||||
],
|
||||
diff -Naur envoy/source/common/router/scoped_config_impl.cc envoy-new/source/common/router/scoped_config_impl.cc
|
||||
--- envoy/source/common/router/scoped_config_impl.cc 2024-01-10 20:10:14.529600924 +0800
|
||||
+++ envoy-new/source/common/router/scoped_config_impl.cc 2024-01-10 20:09:50.161422411 +0800
|
||||
@@ -3,6 +3,8 @@
|
||||
#include "envoy/config/route/v3/scoped_route.pb.h"
|
||||
#include "envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.pb.h"
|
||||
|
||||
+#include "source/common/http/header_utility.h"
|
||||
+
|
||||
namespace Envoy {
|
||||
namespace Router {
|
||||
|
||||
@@ -74,18 +76,20 @@
|
||||
HostValueExtractorImpl::computeFragment(const Http::HeaderMap& headers,
|
||||
const StreamInfo::StreamInfo&,
|
||||
ReComputeCbPtr& recompute) const {
|
||||
- auto fragment = computeFragment(headers);
|
||||
auto host = static_cast<const Http::RequestHeaderMap&>(headers).getHostValue();
|
||||
+ auto port_start = Http::HeaderUtility::getPortStart(host);
|
||||
+ if (port_start != absl::string_view::npos) {
|
||||
+ host = host.substr(0, port_start);
|
||||
+ }
|
||||
*recompute = [this, host, recompute]() mutable -> std::unique_ptr<ScopeKeyFragmentBase> {
|
||||
return reComputeHelper(std::string(host), recompute, 0);
|
||||
};
|
||||
- return fragment;
|
||||
+ return std::make_unique<StringKeyFragment>(host);
|
||||
}
|
||||
|
||||
std::unique_ptr<ScopeKeyFragmentBase>
|
||||
-HostValueExtractorImpl::computeFragment(const Http::HeaderMap& headers) const {
|
||||
- return std::make_unique<StringKeyFragment>(
|
||||
- static_cast<const Http::RequestHeaderMap&>(headers).getHostValue());
|
||||
+HostValueExtractorImpl::computeFragment(const Http::HeaderMap&) const {
|
||||
+ return nullptr;
|
||||
}
|
||||
|
||||
std::unique_ptr<ScopeKeyFragmentBase>
|
||||
65
envoy/1.20/patches/envoy/20240111-fix-srds-compute.patch
Normal file
65
envoy/1.20/patches/envoy/20240111-fix-srds-compute.patch
Normal file
@@ -0,0 +1,65 @@
|
||||
diff -Naur envoy/source/common/router/scoped_config_impl.cc envoy-new/source/common/router/scoped_config_impl.cc
|
||||
--- envoy/source/common/router/scoped_config_impl.cc 2024-01-11 16:23:55.407881263 +0800
|
||||
+++ envoy-new/source/common/router/scoped_config_impl.cc 2024-01-11 16:23:42.311786814 +0800
|
||||
@@ -53,21 +53,26 @@
|
||||
}
|
||||
|
||||
std::unique_ptr<ScopeKeyFragmentBase>
|
||||
-HostValueExtractorImpl::reComputeHelper(const std::string& host, ReComputeCbPtr& next_recompute,
|
||||
+HostValueExtractorImpl::reComputeHelper(const std::string& host,
|
||||
+ ReComputeCbWeakPtr& weak_next_recompute,
|
||||
uint32_t recompute_seq) const {
|
||||
if (recompute_seq == max_recompute_num_) {
|
||||
ENVOY_LOG_MISC(warn,
|
||||
"recompute host fragment failed, maximum number of recalculations exceeded");
|
||||
return nullptr;
|
||||
}
|
||||
+ auto next_recompute = weak_next_recompute.lock();
|
||||
+ if (!next_recompute) {
|
||||
+ return nullptr;
|
||||
+ }
|
||||
if (host == "*") {
|
||||
*next_recompute = nullptr;
|
||||
return nullptr;
|
||||
}
|
||||
auto masked_host = maskFirstDNSLabel(host);
|
||||
*next_recompute = [this, masked_host, recompute_seq,
|
||||
- next_recompute]() mutable -> std::unique_ptr<ScopeKeyFragmentBase> {
|
||||
- return reComputeHelper(masked_host, next_recompute, recompute_seq + 1);
|
||||
+ weak_next_recompute]() mutable -> std::unique_ptr<ScopeKeyFragmentBase> {
|
||||
+ return reComputeHelper(masked_host, weak_next_recompute, recompute_seq + 1);
|
||||
};
|
||||
return std::make_unique<StringKeyFragment>(masked_host);
|
||||
}
|
||||
@@ -81,8 +86,9 @@
|
||||
if (port_start != absl::string_view::npos) {
|
||||
host = host.substr(0, port_start);
|
||||
}
|
||||
- *recompute = [this, host, recompute]() mutable -> std::unique_ptr<ScopeKeyFragmentBase> {
|
||||
- return reComputeHelper(std::string(host), recompute, 0);
|
||||
+ *recompute = [this, host, weak_recompute = ReComputeCbWeakPtr(recompute)]() mutable
|
||||
+ -> std::unique_ptr<ScopeKeyFragmentBase> {
|
||||
+ return reComputeHelper(std::string(host), weak_recompute, 0);
|
||||
};
|
||||
return std::make_unique<StringKeyFragment>(host);
|
||||
}
|
||||
diff -Naur envoy/source/common/router/scoped_config_impl.h envoy-new/source/common/router/scoped_config_impl.h
|
||||
--- envoy/source/common/router/scoped_config_impl.h 2024-01-11 16:23:55.407881263 +0800
|
||||
+++ envoy-new/source/common/router/scoped_config_impl.h 2024-01-11 16:23:42.311786814 +0800
|
||||
@@ -25,6 +25,7 @@
|
||||
#if defined(ALIMESH)
|
||||
using ReComputeCb = std::function<std::unique_ptr<ScopeKeyFragmentBase>()>;
|
||||
using ReComputeCbPtr = std::shared_ptr<ReComputeCb>;
|
||||
+using ReComputeCbWeakPtr = std::weak_ptr<ReComputeCb>;
|
||||
#endif
|
||||
|
||||
/**
|
||||
@@ -83,7 +84,7 @@
|
||||
|
||||
private:
|
||||
std::unique_ptr<ScopeKeyFragmentBase> reComputeHelper(const std::string& host,
|
||||
- ReComputeCbPtr& next_recompute,
|
||||
+ ReComputeCbWeakPtr& weak_next_recompute,
|
||||
uint32_t recompute_seq) const;
|
||||
|
||||
static constexpr uint32_t DefaultMaxRecomputeNum = 100;
|
||||
1445
envoy/1.20/patches/envoy/20240116-fix-cve.patch
Normal file
1445
envoy/1.20/patches/envoy/20240116-fix-cve.patch
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
931
envoy/1.20/patches/go-control-plane/20240104-enhance-srds.patch
Normal file
931
envoy/1.20/patches/go-control-plane/20240104-enhance-srds.patch
Normal file
@@ -0,0 +1,931 @@
|
||||
diff -Naur go-control-plane/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.pb.go go-control-plane-new/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.pb.go
|
||||
--- go-control-plane/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.pb.go 2024-01-04 21:07:22.000000000 +0800
|
||||
+++ go-control-plane-new/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.pb.go 2024-01-04 21:02:10.000000000 +0800
|
||||
@@ -2286,6 +2286,8 @@
|
||||
|
||||
// Types that are assignable to Type:
|
||||
// *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_
|
||||
+ // *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HostValueExtractor_
|
||||
+ // *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_LocalPortValueExtractor_
|
||||
Type isScopedRoutes_ScopeKeyBuilder_FragmentBuilder_Type `protobuf_oneof:"type"`
|
||||
}
|
||||
|
||||
@@ -2335,6 +2337,20 @@
|
||||
return nil
|
||||
}
|
||||
|
||||
+func (x *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder) GetHostValueExtractor() *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HostValueExtractor {
|
||||
+ if x, ok := x.GetType().(*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HostValueExtractor_); ok {
|
||||
+ return x.HostValueExtractor
|
||||
+ }
|
||||
+ return nil
|
||||
+}
|
||||
+
|
||||
+func (x *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder) GetLocalPortValueExtractor() *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_LocalPortValueExtractor {
|
||||
+ if x, ok := x.GetType().(*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_LocalPortValueExtractor_); ok {
|
||||
+ return x.LocalPortValueExtractor
|
||||
+ }
|
||||
+ return nil
|
||||
+}
|
||||
+
|
||||
type isScopedRoutes_ScopeKeyBuilder_FragmentBuilder_Type interface {
|
||||
isScopedRoutes_ScopeKeyBuilder_FragmentBuilder_Type()
|
||||
}
|
||||
@@ -2344,9 +2360,23 @@
|
||||
HeaderValueExtractor *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor `protobuf:"bytes,1,opt,name=header_value_extractor,json=headerValueExtractor,proto3,oneof"`
|
||||
}
|
||||
|
||||
+type ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HostValueExtractor_ struct {
|
||||
+ HostValueExtractor *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HostValueExtractor `protobuf:"bytes,101,opt,name=host_value_extractor,json=hostValueExtractor,proto3,oneof"`
|
||||
+}
|
||||
+
|
||||
+type ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_LocalPortValueExtractor_ struct {
|
||||
+ LocalPortValueExtractor *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_LocalPortValueExtractor `protobuf:"bytes,102,opt,name=local_port_value_extractor,json=localPortValueExtractor,proto3,oneof"`
|
||||
+}
|
||||
+
|
||||
func (*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_) isScopedRoutes_ScopeKeyBuilder_FragmentBuilder_Type() {
|
||||
}
|
||||
|
||||
+func (*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HostValueExtractor_) isScopedRoutes_ScopeKeyBuilder_FragmentBuilder_Type() {
|
||||
+}
|
||||
+
|
||||
+func (*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_LocalPortValueExtractor_) isScopedRoutes_ScopeKeyBuilder_FragmentBuilder_Type() {
|
||||
+}
|
||||
+
|
||||
// Specifies how the value of a header should be extracted.
|
||||
// The following example maps the structure of a header to the fields in this message.
|
||||
//
|
||||
@@ -2475,6 +2505,92 @@
|
||||
func (*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_Element) isScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_ExtractType() {
|
||||
}
|
||||
|
||||
+type ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HostValueExtractor struct {
|
||||
+ state protoimpl.MessageState
|
||||
+ sizeCache protoimpl.SizeCache
|
||||
+ unknownFields protoimpl.UnknownFields
|
||||
+
|
||||
+ // The maximum number of host superset recomputes. If not specified, defaults to 100.
|
||||
+ MaxRecomputeNum *wrappers.UInt32Value `protobuf:"bytes,1,opt,name=max_recompute_num,json=maxRecomputeNum,proto3" json:"max_recompute_num,omitempty"`
|
||||
+}
|
||||
+
|
||||
+func (x *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HostValueExtractor) Reset() {
|
||||
+ *x = ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HostValueExtractor{}
|
||||
+ if protoimpl.UnsafeEnabled {
|
||||
+ mi := &file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_msgTypes[18]
|
||||
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
+ ms.StoreMessageInfo(mi)
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+func (x *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HostValueExtractor) String() string {
|
||||
+ return protoimpl.X.MessageStringOf(x)
|
||||
+}
|
||||
+
|
||||
+func (*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HostValueExtractor) ProtoMessage() {}
|
||||
+
|
||||
+func (x *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HostValueExtractor) ProtoReflect() protoreflect.Message {
|
||||
+ mi := &file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_msgTypes[18]
|
||||
+ if protoimpl.UnsafeEnabled && x != nil {
|
||||
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
+ if ms.LoadMessageInfo() == nil {
|
||||
+ ms.StoreMessageInfo(mi)
|
||||
+ }
|
||||
+ return ms
|
||||
+ }
|
||||
+ return mi.MessageOf(x)
|
||||
+}
|
||||
+
|
||||
+// Deprecated: Use ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HostValueExtractor.ProtoReflect.Descriptor instead.
|
||||
+func (*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HostValueExtractor) Descriptor() ([]byte, []int) {
|
||||
+ return file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_rawDescGZIP(), []int{5, 0, 0, 1}
|
||||
+}
|
||||
+
|
||||
+func (x *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HostValueExtractor) GetMaxRecomputeNum() *wrappers.UInt32Value {
|
||||
+ if x != nil {
|
||||
+ return x.MaxRecomputeNum
|
||||
+ }
|
||||
+ return nil
|
||||
+}
|
||||
+
|
||||
+type ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_LocalPortValueExtractor struct {
|
||||
+ state protoimpl.MessageState
|
||||
+ sizeCache protoimpl.SizeCache
|
||||
+ unknownFields protoimpl.UnknownFields
|
||||
+}
|
||||
+
|
||||
+func (x *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_LocalPortValueExtractor) Reset() {
|
||||
+ *x = ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_LocalPortValueExtractor{}
|
||||
+ if protoimpl.UnsafeEnabled {
|
||||
+ mi := &file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_msgTypes[19]
|
||||
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
+ ms.StoreMessageInfo(mi)
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+func (x *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_LocalPortValueExtractor) String() string {
|
||||
+ return protoimpl.X.MessageStringOf(x)
|
||||
+}
|
||||
+
|
||||
+func (*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_LocalPortValueExtractor) ProtoMessage() {}
|
||||
+
|
||||
+func (x *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_LocalPortValueExtractor) ProtoReflect() protoreflect.Message {
|
||||
+ mi := &file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_msgTypes[19]
|
||||
+ if protoimpl.UnsafeEnabled && x != nil {
|
||||
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
+ if ms.LoadMessageInfo() == nil {
|
||||
+ ms.StoreMessageInfo(mi)
|
||||
+ }
|
||||
+ return ms
|
||||
+ }
|
||||
+ return mi.MessageOf(x)
|
||||
+}
|
||||
+
|
||||
+// Deprecated: Use ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_LocalPortValueExtractor.ProtoReflect.Descriptor instead.
|
||||
+func (*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_LocalPortValueExtractor) Descriptor() ([]byte, []int) {
|
||||
+ return file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_rawDescGZIP(), []int{5, 0, 0, 2}
|
||||
+}
|
||||
+
|
||||
// Specifies a header field's key value pair to match on.
|
||||
type ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement struct {
|
||||
state protoimpl.MessageState
|
||||
@@ -2494,7 +2610,7 @@
|
||||
func (x *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement) Reset() {
|
||||
*x = ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
- mi := &file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_msgTypes[18]
|
||||
+ mi := &file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_msgTypes[20]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -2507,7 +2623,7 @@
|
||||
func (*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement) ProtoMessage() {}
|
||||
|
||||
func (x *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement) ProtoReflect() protoreflect.Message {
|
||||
- mi := &file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_msgTypes[18]
|
||||
+ mi := &file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_msgTypes[20]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -3079,7 +3195,7 @@
|
||||
0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61,
|
||||
0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52,
|
||||
0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f,
|
||||
- 0x6e, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x22, 0xe9, 0x0e, 0x0a, 0x0c, 0x53, 0x63, 0x6f, 0x70, 0x65,
|
||||
+ 0x6e, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x22, 0xe1, 0x14, 0x0a, 0x0c, 0x53, 0x63, 0x6f, 0x70, 0x65,
|
||||
0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04,
|
||||
0x6e, 0x61, 0x6d, 0x65, 0x12, 0x8f, 0x01, 0x0a, 0x11, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x5f, 0x6b,
|
||||
@@ -3114,7 +3230,7 @@
|
||||
0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f,
|
||||
0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65,
|
||||
0x64, 0x52, 0x64, 0x73, 0x48, 0x00, 0x52, 0x09, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x64,
|
||||
- 0x73, 0x1a, 0xd9, 0x09, 0x0a, 0x0f, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x4b, 0x65, 0x79, 0x42, 0x75,
|
||||
+ 0x73, 0x1a, 0xd1, 0x0f, 0x0a, 0x0f, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x4b, 0x65, 0x79, 0x42, 0x75,
|
||||
0x69, 0x6c, 0x64, 0x65, 0x72, 0x12, 0x91, 0x01, 0x0a, 0x09, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65,
|
||||
0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x69, 0x2e, 0x65, 0x6e, 0x76, 0x6f,
|
||||
0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c,
|
||||
@@ -3124,7 +3240,7 @@
|
||||
0x75, 0x74, 0x65, 0x73, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x4b, 0x65, 0x79, 0x42, 0x75, 0x69,
|
||||
0x6c, 0x64, 0x65, 0x72, 0x2e, 0x46, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x75, 0x69,
|
||||
0x6c, 0x64, 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x09,
|
||||
- 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x1a, 0xd5, 0x07, 0x0a, 0x0f, 0x46, 0x72,
|
||||
+ 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x1a, 0xcd, 0x0d, 0x0a, 0x0f, 0x46, 0x72,
|
||||
0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x12, 0xb6, 0x01,
|
||||
0x0a, 0x16, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x65,
|
||||
0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x7e,
|
||||
@@ -3137,131 +3253,178 @@
|
||||
0x6e, 0x74, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72,
|
||||
0x56, 0x61, 0x6c, 0x75, 0x65, 0x45, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x48, 0x00,
|
||||
0x52, 0x14, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x45, 0x78, 0x74,
|
||||
- 0x72, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x1a, 0x8f, 0x05, 0x0a, 0x14, 0x48, 0x65, 0x61, 0x64, 0x65,
|
||||
- 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x45, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x12,
|
||||
- 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa,
|
||||
- 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2b, 0x0a, 0x11,
|
||||
- 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x65, 0x70, 0x61, 0x72, 0x61, 0x74, 0x6f,
|
||||
- 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74,
|
||||
- 0x53, 0x65, 0x70, 0x61, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x16, 0x0a, 0x05, 0x69, 0x6e, 0x64,
|
||||
- 0x65, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65,
|
||||
- 0x78, 0x12, 0xa5, 0x01, 0x0a, 0x07, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20,
|
||||
- 0x01, 0x28, 0x0b, 0x32, 0x88, 0x01, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74,
|
||||
- 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e,
|
||||
+ 0x72, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x12, 0xb0, 0x01, 0x0a, 0x14, 0x68, 0x6f, 0x73, 0x74, 0x5f,
|
||||
+ 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x65, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x18,
|
||||
+ 0x65, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x7c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78,
|
||||
+ 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73,
|
||||
+ 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f,
|
||||
+ 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72,
|
||||
+ 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73,
|
||||
+ 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x4b, 0x65, 0x79, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72,
|
||||
+ 0x2e, 0x46, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72,
|
||||
+ 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x45, 0x78, 0x74, 0x72, 0x61, 0x63,
|
||||
+ 0x74, 0x6f, 0x72, 0x48, 0x00, 0x52, 0x12, 0x68, 0x6f, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65,
|
||||
+ 0x45, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x12, 0xc1, 0x01, 0x0a, 0x1a, 0x6c, 0x6f,
|
||||
+ 0x63, 0x61, 0x6c, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x65,
|
||||
+ 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x66, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x81,
|
||||
+ 0x01, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f,
|
||||
+ 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f,
|
||||
+ 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69,
|
||||
+ 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x63,
|
||||
+ 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65,
|
||||
+ 0x4b, 0x65, 0x79, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x2e, 0x46, 0x72, 0x61, 0x67, 0x6d,
|
||||
+ 0x65, 0x6e, 0x74, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x6c,
|
||||
+ 0x50, 0x6f, 0x72, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x45, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74,
|
||||
+ 0x6f, 0x72, 0x48, 0x00, 0x52, 0x17, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x50, 0x6f, 0x72, 0x74, 0x56,
|
||||
+ 0x61, 0x6c, 0x75, 0x65, 0x45, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x1a, 0x8f, 0x05,
|
||||
+ 0x0a, 0x14, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x45, 0x78, 0x74,
|
||||
+ 0x72, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01,
|
||||
+ 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e,
|
||||
+ 0x61, 0x6d, 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x73,
|
||||
+ 0x65, 0x70, 0x61, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10,
|
||||
+ 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x70, 0x61, 0x72, 0x61, 0x74, 0x6f, 0x72,
|
||||
+ 0x12, 0x16, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48,
|
||||
+ 0x00, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0xa5, 0x01, 0x0a, 0x07, 0x65, 0x6c, 0x65,
|
||||
+ 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x88, 0x01, 0x2e, 0x65, 0x6e,
|
||||
+ 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66,
|
||||
+ 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68,
|
||||
+ 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d,
|
||||
+ 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64,
|
||||
+ 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x4b, 0x65, 0x79, 0x42,
|
||||
+ 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x2e, 0x46, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x42,
|
||||
+ 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c,
|
||||
+ 0x75, 0x65, 0x45, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x4b, 0x76, 0x45, 0x6c,
|
||||
+ 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x07, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74,
|
||||
+ 0x1a, 0xdb, 0x01, 0x0a, 0x09, 0x4b, 0x76, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x25,
|
||||
+ 0x0a, 0x09, 0x73, 0x65, 0x70, 0x61, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
+ 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x09, 0x73, 0x65, 0x70, 0x61,
|
||||
+ 0x72, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x19, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01,
|
||||
+ 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x03, 0x6b, 0x65, 0x79,
|
||||
+ 0x3a, 0x8b, 0x01, 0x9a, 0xc5, 0x88, 0x1e, 0x85, 0x01, 0x0a, 0x82, 0x01, 0x65, 0x6e, 0x76, 0x6f,
|
||||
+ 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e,
|
||||
0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e,
|
||||
0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e,
|
||||
- 0x76, 0x33, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x2e,
|
||||
+ 0x76, 0x32, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x2e,
|
||||
0x53, 0x63, 0x6f, 0x70, 0x65, 0x4b, 0x65, 0x79, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x2e,
|
||||
0x46, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x2e,
|
||||
0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x45, 0x78, 0x74, 0x72, 0x61,
|
||||
- 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x4b, 0x76, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x48, 0x00,
|
||||
- 0x52, 0x07, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x1a, 0xdb, 0x01, 0x0a, 0x09, 0x4b, 0x76,
|
||||
- 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x25, 0x0a, 0x09, 0x73, 0x65, 0x70, 0x61, 0x72,
|
||||
- 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72,
|
||||
- 0x02, 0x10, 0x01, 0x52, 0x09, 0x73, 0x65, 0x70, 0x61, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x19,
|
||||
- 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04,
|
||||
- 0x72, 0x02, 0x10, 0x01, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x3a, 0x8b, 0x01, 0x9a, 0xc5, 0x88, 0x1e,
|
||||
- 0x85, 0x01, 0x0a, 0x82, 0x01, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69,
|
||||
+ 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x4b, 0x76, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x3a, 0x7f,
|
||||
+ 0x9a, 0xc5, 0x88, 0x1e, 0x7a, 0x0a, 0x78, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e,
|
||||
+ 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f,
|
||||
+ 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69,
|
||||
+ 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x63,
|
||||
+ 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65,
|
||||
+ 0x4b, 0x65, 0x79, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x2e, 0x46, 0x72, 0x61, 0x67, 0x6d,
|
||||
+ 0x65, 0x6e, 0x74, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65,
|
||||
+ 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x45, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x42,
|
||||
+ 0x0e, 0x0a, 0x0c, 0x65, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x1a,
|
||||
+ 0xdd, 0x01, 0x0a, 0x12, 0x48, 0x6f, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x45, 0x78, 0x74,
|
||||
+ 0x72, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x48, 0x0a, 0x11, 0x6d, 0x61, 0x78, 0x5f, 0x72, 0x65,
|
||||
+ 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
+ 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
+ 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52,
|
||||
+ 0x0f, 0x6d, 0x61, 0x78, 0x52, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x4e, 0x75, 0x6d,
|
||||
+ 0x3a, 0x7d, 0x9a, 0xc5, 0x88, 0x1e, 0x78, 0x0a, 0x76, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63,
|
||||
+ 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74,
|
||||
+ 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63,
|
||||
+ 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e,
|
||||
+ 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x53, 0x63, 0x6f,
|
||||
+ 0x70, 0x65, 0x4b, 0x65, 0x79, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x2e, 0x46, 0x72, 0x61,
|
||||
+ 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x2e, 0x48, 0x6f, 0x73,
|
||||
+ 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x45, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x1a,
|
||||
+ 0x9e, 0x01, 0x0a, 0x17, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x50, 0x6f, 0x72, 0x74, 0x56, 0x61, 0x6c,
|
||||
+ 0x75, 0x65, 0x45, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x3a, 0x82, 0x01, 0x9a, 0xc5,
|
||||
+ 0x88, 0x1e, 0x7d, 0x0a, 0x7b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69,
|
||||
0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b,
|
||||
0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e,
|
||||
0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x63, 0x6f, 0x70,
|
||||
0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x4b, 0x65,
|
||||
0x79, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x2e, 0x46, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e,
|
||||
- 0x74, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56,
|
||||
- 0x61, 0x6c, 0x75, 0x65, 0x45, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x4b, 0x76,
|
||||
- 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x3a, 0x7f, 0x9a, 0xc5, 0x88, 0x1e, 0x7a, 0x0a, 0x78,
|
||||
- 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c,
|
||||
- 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70,
|
||||
- 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61,
|
||||
- 0x67, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75,
|
||||
- 0x74, 0x65, 0x73, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x4b, 0x65, 0x79, 0x42, 0x75, 0x69, 0x6c,
|
||||
- 0x64, 0x65, 0x72, 0x2e, 0x46, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x75, 0x69, 0x6c,
|
||||
- 0x64, 0x65, 0x72, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x45,
|
||||
- 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x42, 0x0e, 0x0a, 0x0c, 0x65, 0x78, 0x74, 0x72,
|
||||
- 0x61, 0x63, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x3a, 0x6a, 0x9a, 0xc5, 0x88, 0x1e, 0x65, 0x0a,
|
||||
- 0x63, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69,
|
||||
- 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74,
|
||||
- 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e,
|
||||
- 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f,
|
||||
- 0x75, 0x74, 0x65, 0x73, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x4b, 0x65, 0x79, 0x42, 0x75, 0x69,
|
||||
- 0x6c, 0x64, 0x65, 0x72, 0x2e, 0x46, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x75, 0x69,
|
||||
- 0x6c, 0x64, 0x65, 0x72, 0x42, 0x0b, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x03, 0xf8, 0x42,
|
||||
- 0x01, 0x3a, 0x5a, 0x9a, 0xc5, 0x88, 0x1e, 0x55, 0x0a, 0x53, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e,
|
||||
- 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65,
|
||||
- 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65,
|
||||
- 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x32,
|
||||
- 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x53, 0x63,
|
||||
- 0x6f, 0x70, 0x65, 0x4b, 0x65, 0x79, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x3a, 0x4a, 0x9a,
|
||||
- 0xc5, 0x88, 0x1e, 0x45, 0x0a, 0x43, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66,
|
||||
- 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72,
|
||||
- 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f,
|
||||
- 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x63, 0x6f,
|
||||
- 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x42, 0x17, 0x0a, 0x10, 0x63, 0x6f, 0x6e,
|
||||
- 0x66, 0x69, 0x67, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8,
|
||||
- 0x42, 0x01, 0x22, 0xf1, 0x01, 0x0a, 0x09, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x64, 0x73,
|
||||
- 0x12, 0x65, 0x0a, 0x18, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x5f, 0x72, 0x64, 0x73, 0x5f, 0x63,
|
||||
- 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01,
|
||||
- 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69,
|
||||
- 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67,
|
||||
- 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01,
|
||||
- 0x52, 0x15, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x64, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69,
|
||||
- 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x34, 0x0a, 0x16, 0x73, 0x72, 0x64, 0x73, 0x5f,
|
||||
- 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x6f,
|
||||
- 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x73, 0x72, 0x64, 0x73, 0x52, 0x65, 0x73,
|
||||
- 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x6f, 0x72, 0x3a, 0x47, 0x9a,
|
||||
- 0xc5, 0x88, 0x1e, 0x42, 0x0a, 0x40, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66,
|
||||
- 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72,
|
||||
- 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f,
|
||||
- 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x63, 0x6f,
|
||||
- 0x70, 0x65, 0x64, 0x52, 0x64, 0x73, 0x22, 0xcc, 0x02, 0x0a, 0x0a, 0x48, 0x74, 0x74, 0x70, 0x46,
|
||||
- 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20,
|
||||
- 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x61,
|
||||
- 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x0c, 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66,
|
||||
- 0x69, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
|
||||
- 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x48, 0x00,
|
||||
- 0x52, 0x0b, 0x74, 0x79, 0x70, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x58, 0x0a,
|
||||
- 0x10, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72,
|
||||
- 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e,
|
||||
- 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x45,
|
||||
- 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f,
|
||||
- 0x75, 0x72, 0x63, 0x65, 0x48, 0x00, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x69,
|
||||
- 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x73, 0x5f, 0x6f, 0x70,
|
||||
- 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x73,
|
||||
- 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x3a, 0x48, 0x9a, 0xc5, 0x88, 0x1e, 0x43, 0x0a,
|
||||
- 0x41, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69,
|
||||
- 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74,
|
||||
- 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e,
|
||||
- 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x46, 0x69, 0x6c, 0x74,
|
||||
- 0x65, 0x72, 0x42, 0x0d, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x74, 0x79, 0x70,
|
||||
- 0x65, 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x52, 0x06, 0x63,
|
||||
- 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x9f, 0x01, 0x0a, 0x12, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||
- 0x74, 0x49, 0x44, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x37, 0x0a, 0x0c,
|
||||
- 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01,
|
||||
- 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
|
||||
- 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x74, 0x79, 0x70, 0x65, 0x64, 0x43,
|
||||
- 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x50, 0x9a, 0xc5, 0x88, 0x1e, 0x4b, 0x0a, 0x49, 0x65, 0x6e,
|
||||
+ 0x74, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x50, 0x6f,
|
||||
+ 0x72, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x45, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x6f, 0x72,
|
||||
+ 0x3a, 0x6a, 0x9a, 0xc5, 0x88, 0x1e, 0x65, 0x0a, 0x63, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63,
|
||||
+ 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74,
|
||||
+ 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63,
|
||||
+ 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e,
|
||||
+ 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x53, 0x63, 0x6f,
|
||||
+ 0x70, 0x65, 0x4b, 0x65, 0x79, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x2e, 0x46, 0x72, 0x61,
|
||||
+ 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x42, 0x0b, 0x0a, 0x04,
|
||||
+ 0x74, 0x79, 0x70, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x3a, 0x5a, 0x9a, 0xc5, 0x88, 0x1e, 0x55,
|
||||
+ 0x0a, 0x53, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66,
|
||||
+ 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74,
|
||||
+ 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61,
|
||||
+ 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52,
|
||||
+ 0x6f, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x4b, 0x65, 0x79, 0x42, 0x75,
|
||||
+ 0x69, 0x6c, 0x64, 0x65, 0x72, 0x3a, 0x4a, 0x9a, 0xc5, 0x88, 0x1e, 0x45, 0x0a, 0x43, 0x65, 0x6e,
|
||||
0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65,
|
||||
0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63,
|
||||
0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65,
|
||||
- 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x44, 0x45, 0x78,
|
||||
- 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x8e, 0x01, 0x0a, 0x20, 0x45, 0x6e, 0x76, 0x6f,
|
||||
- 0x79, 0x4d, 0x6f, 0x62, 0x69, 0x6c, 0x65, 0x48, 0x74, 0x74, 0x70, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
|
||||
- 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x12, 0x6a, 0x0a, 0x06,
|
||||
- 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x52, 0x2e, 0x65,
|
||||
- 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e,
|
||||
- 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e,
|
||||
- 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f,
|
||||
- 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x43,
|
||||
- 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72,
|
||||
- 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x71, 0x0a, 0x49, 0x69, 0x6f, 0x2e, 0x65,
|
||||
- 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e,
|
||||
- 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65,
|
||||
- 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f,
|
||||
- 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67,
|
||||
- 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x1a, 0x48, 0x74, 0x74, 0x70, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
|
||||
- 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74,
|
||||
- 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f,
|
||||
- 0x74, 0x6f, 0x33,
|
||||
+ 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65,
|
||||
+ 0x73, 0x42, 0x17, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x73, 0x70, 0x65, 0x63,
|
||||
+ 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0xf1, 0x01, 0x0a, 0x09, 0x53,
|
||||
+ 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x64, 0x73, 0x12, 0x65, 0x0a, 0x18, 0x73, 0x63, 0x6f, 0x70,
|
||||
+ 0x65, 0x64, 0x5f, 0x72, 0x64, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x73, 0x6f,
|
||||
+ 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76,
|
||||
+ 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76,
|
||||
+ 0x33, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x08,
|
||||
+ 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x15, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x64,
|
||||
+ 0x52, 0x64, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12,
|
||||
+ 0x34, 0x0a, 0x16, 0x73, 0x72, 0x64, 0x73, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
|
||||
+ 0x73, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
+ 0x14, 0x73, 0x72, 0x64, 0x73, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x4c, 0x6f,
|
||||
+ 0x63, 0x61, 0x74, 0x6f, 0x72, 0x3a, 0x47, 0x9a, 0xc5, 0x88, 0x1e, 0x42, 0x0a, 0x40, 0x65, 0x6e,
|
||||
+ 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65,
|
||||
+ 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63,
|
||||
+ 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65,
|
||||
+ 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x64, 0x73, 0x22, 0xcc,
|
||||
+ 0x02, 0x0a, 0x0a, 0x48, 0x74, 0x74, 0x70, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x1b, 0x0a,
|
||||
+ 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04,
|
||||
+ 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x0c, 0x74, 0x79,
|
||||
+ 0x70, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b,
|
||||
+ 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
|
||||
+ 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x48, 0x00, 0x52, 0x0b, 0x74, 0x79, 0x70, 0x65, 0x64, 0x43,
|
||||
+ 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x58, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f,
|
||||
+ 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32,
|
||||
+ 0x2b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63,
|
||||
+ 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e,
|
||||
+ 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x48, 0x00, 0x52, 0x0f,
|
||||
+ 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x12,
|
||||
+ 0x1f, 0x0a, 0x0b, 0x69, 0x73, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x18, 0x06,
|
||||
+ 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x73, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c,
|
||||
+ 0x3a, 0x48, 0x9a, 0xc5, 0x88, 0x1e, 0x43, 0x0a, 0x41, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63,
|
||||
+ 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74,
|
||||
+ 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63,
|
||||
+ 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e,
|
||||
+ 0x48, 0x74, 0x74, 0x70, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x42, 0x0d, 0x0a, 0x0b, 0x63, 0x6f,
|
||||
+ 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, 0x4a,
|
||||
+ 0x04, 0x08, 0x02, 0x10, 0x03, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x9f, 0x01,
|
||||
+ 0x0a, 0x12, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x44, 0x45, 0x78, 0x74, 0x65, 0x6e,
|
||||
+ 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x37, 0x0a, 0x0c, 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x63, 0x6f,
|
||||
+ 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f,
|
||||
+ 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79,
|
||||
+ 0x52, 0x0b, 0x74, 0x79, 0x70, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x50, 0x9a,
|
||||
+ 0xc5, 0x88, 0x1e, 0x4b, 0x0a, 0x49, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66,
|
||||
+ 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72,
|
||||
+ 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f,
|
||||
+ 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x71,
|
||||
+ 0x75, 0x65, 0x73, 0x74, 0x49, 0x44, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22,
|
||||
+ 0x8e, 0x01, 0x0a, 0x20, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x4d, 0x6f, 0x62, 0x69, 0x6c, 0x65, 0x48,
|
||||
+ 0x74, 0x74, 0x70, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x6e,
|
||||
+ 0x61, 0x67, 0x65, 0x72, 0x12, 0x6a, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01,
|
||||
+ 0x20, 0x01, 0x28, 0x0b, 0x32, 0x52, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74,
|
||||
+ 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e,
|
||||
+ 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e,
|
||||
+ 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e,
|
||||
+ 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f,
|
||||
+ 0x6e, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67,
|
||||
+ 0x42, 0x71, 0x0a, 0x49, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78,
|
||||
+ 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f,
|
||||
+ 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f,
|
||||
+ 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69,
|
||||
+ 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x1a, 0x48,
|
||||
+ 0x74, 0x74, 0x70, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x6e,
|
||||
+ 0x61, 0x67, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06,
|
||||
+ 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
@@ -3277,7 +3440,7 @@
|
||||
}
|
||||
|
||||
var file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_enumTypes = make([]protoimpl.EnumInfo, 5)
|
||||
-var file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_msgTypes = make([]protoimpl.MessageInfo, 19)
|
||||
+var file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_msgTypes = make([]protoimpl.MessageInfo, 21)
|
||||
var file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_goTypes = []interface{}{
|
||||
(HttpConnectionManager_CodecType)(0), // 0: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.CodecType
|
||||
(HttpConnectionManager_ServerHeaderTransformation)(0), // 1: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.ServerHeaderTransformation
|
||||
@@ -3302,102 +3465,107 @@
|
||||
(*ScopedRoutes_ScopeKeyBuilder)(nil), // 20: envoy.extensions.filters.network.http_connection_manager.v3.ScopedRoutes.ScopeKeyBuilder
|
||||
(*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder)(nil), // 21: envoy.extensions.filters.network.http_connection_manager.v3.ScopedRoutes.ScopeKeyBuilder.FragmentBuilder
|
||||
(*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor)(nil), // 22: envoy.extensions.filters.network.http_connection_manager.v3.ScopedRoutes.ScopeKeyBuilder.FragmentBuilder.HeaderValueExtractor
|
||||
- (*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement)(nil), // 23: envoy.extensions.filters.network.http_connection_manager.v3.ScopedRoutes.ScopeKeyBuilder.FragmentBuilder.HeaderValueExtractor.KvElement
|
||||
- (*v32.RouteConfiguration)(nil), // 24: envoy.config.route.v3.RouteConfiguration
|
||||
- (*wrappers.BoolValue)(nil), // 25: google.protobuf.BoolValue
|
||||
- (*v3.HttpProtocolOptions)(nil), // 26: envoy.config.core.v3.HttpProtocolOptions
|
||||
- (*v3.Http1ProtocolOptions)(nil), // 27: envoy.config.core.v3.Http1ProtocolOptions
|
||||
- (*v3.Http2ProtocolOptions)(nil), // 28: envoy.config.core.v3.Http2ProtocolOptions
|
||||
- (*v3.Http3ProtocolOptions)(nil), // 29: envoy.config.core.v3.Http3ProtocolOptions
|
||||
- (*v3.SchemeHeaderTransformation)(nil), // 30: envoy.config.core.v3.SchemeHeaderTransformation
|
||||
- (*wrappers.UInt32Value)(nil), // 31: google.protobuf.UInt32Value
|
||||
- (*duration.Duration)(nil), // 32: google.protobuf.Duration
|
||||
- (*v31.AccessLog)(nil), // 33: envoy.config.accesslog.v3.AccessLog
|
||||
- (*v3.TypedExtensionConfig)(nil), // 34: envoy.config.core.v3.TypedExtensionConfig
|
||||
- (*v3.SubstitutionFormatString)(nil), // 35: envoy.config.core.v3.SubstitutionFormatString
|
||||
- (*v31.AccessLogFilter)(nil), // 36: envoy.config.accesslog.v3.AccessLogFilter
|
||||
- (*v3.DataSource)(nil), // 37: envoy.config.core.v3.DataSource
|
||||
- (*v3.HeaderValueOption)(nil), // 38: envoy.config.core.v3.HeaderValueOption
|
||||
- (*v3.ConfigSource)(nil), // 39: envoy.config.core.v3.ConfigSource
|
||||
- (*v32.ScopedRouteConfiguration)(nil), // 40: envoy.config.route.v3.ScopedRouteConfiguration
|
||||
- (*any.Any)(nil), // 41: google.protobuf.Any
|
||||
- (*v3.ExtensionConfigSource)(nil), // 42: envoy.config.core.v3.ExtensionConfigSource
|
||||
- (*v33.Percent)(nil), // 43: envoy.type.v3.Percent
|
||||
- (*v34.CustomTag)(nil), // 44: envoy.type.tracing.v3.CustomTag
|
||||
- (*v35.Tracing_Http)(nil), // 45: envoy.config.trace.v3.Tracing.Http
|
||||
- (*v36.PathTransformation)(nil), // 46: envoy.type.http.v3.PathTransformation
|
||||
+ (*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HostValueExtractor)(nil), // 23: envoy.extensions.filters.network.http_connection_manager.v3.ScopedRoutes.ScopeKeyBuilder.FragmentBuilder.HostValueExtractor
|
||||
+ (*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_LocalPortValueExtractor)(nil), // 24: envoy.extensions.filters.network.http_connection_manager.v3.ScopedRoutes.ScopeKeyBuilder.FragmentBuilder.LocalPortValueExtractor
|
||||
+ (*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement)(nil), // 25: envoy.extensions.filters.network.http_connection_manager.v3.ScopedRoutes.ScopeKeyBuilder.FragmentBuilder.HeaderValueExtractor.KvElement
|
||||
+ (*v32.RouteConfiguration)(nil), // 26: envoy.config.route.v3.RouteConfiguration
|
||||
+ (*wrappers.BoolValue)(nil), // 27: google.protobuf.BoolValue
|
||||
+ (*v3.HttpProtocolOptions)(nil), // 28: envoy.config.core.v3.HttpProtocolOptions
|
||||
+ (*v3.Http1ProtocolOptions)(nil), // 29: envoy.config.core.v3.Http1ProtocolOptions
|
||||
+ (*v3.Http2ProtocolOptions)(nil), // 30: envoy.config.core.v3.Http2ProtocolOptions
|
||||
+ (*v3.Http3ProtocolOptions)(nil), // 31: envoy.config.core.v3.Http3ProtocolOptions
|
||||
+ (*v3.SchemeHeaderTransformation)(nil), // 32: envoy.config.core.v3.SchemeHeaderTransformation
|
||||
+ (*wrappers.UInt32Value)(nil), // 33: google.protobuf.UInt32Value
|
||||
+ (*duration.Duration)(nil), // 34: google.protobuf.Duration
|
||||
+ (*v31.AccessLog)(nil), // 35: envoy.config.accesslog.v3.AccessLog
|
||||
+ (*v3.TypedExtensionConfig)(nil), // 36: envoy.config.core.v3.TypedExtensionConfig
|
||||
+ (*v3.SubstitutionFormatString)(nil), // 37: envoy.config.core.v3.SubstitutionFormatString
|
||||
+ (*v31.AccessLogFilter)(nil), // 38: envoy.config.accesslog.v3.AccessLogFilter
|
||||
+ (*v3.DataSource)(nil), // 39: envoy.config.core.v3.DataSource
|
||||
+ (*v3.HeaderValueOption)(nil), // 40: envoy.config.core.v3.HeaderValueOption
|
||||
+ (*v3.ConfigSource)(nil), // 41: envoy.config.core.v3.ConfigSource
|
||||
+ (*v32.ScopedRouteConfiguration)(nil), // 42: envoy.config.route.v3.ScopedRouteConfiguration
|
||||
+ (*any.Any)(nil), // 43: google.protobuf.Any
|
||||
+ (*v3.ExtensionConfigSource)(nil), // 44: envoy.config.core.v3.ExtensionConfigSource
|
||||
+ (*v33.Percent)(nil), // 45: envoy.type.v3.Percent
|
||||
+ (*v34.CustomTag)(nil), // 46: envoy.type.tracing.v3.CustomTag
|
||||
+ (*v35.Tracing_Http)(nil), // 47: envoy.config.trace.v3.Tracing.Http
|
||||
+ (*v36.PathTransformation)(nil), // 48: envoy.type.http.v3.PathTransformation
|
||||
}
|
||||
var file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_depIdxs = []int32{
|
||||
0, // 0: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.codec_type:type_name -> envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.CodecType
|
||||
8, // 1: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.rds:type_name -> envoy.extensions.filters.network.http_connection_manager.v3.Rds
|
||||
- 24, // 2: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.route_config:type_name -> envoy.config.route.v3.RouteConfiguration
|
||||
+ 26, // 2: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.route_config:type_name -> envoy.config.route.v3.RouteConfiguration
|
||||
10, // 3: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.scoped_routes:type_name -> envoy.extensions.filters.network.http_connection_manager.v3.ScopedRoutes
|
||||
12, // 4: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.http_filters:type_name -> envoy.extensions.filters.network.http_connection_manager.v3.HttpFilter
|
||||
- 25, // 5: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.add_user_agent:type_name -> google.protobuf.BoolValue
|
||||
+ 27, // 5: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.add_user_agent:type_name -> google.protobuf.BoolValue
|
||||
15, // 6: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.tracing:type_name -> envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.Tracing
|
||||
- 26, // 7: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.common_http_protocol_options:type_name -> envoy.config.core.v3.HttpProtocolOptions
|
||||
- 27, // 8: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.http_protocol_options:type_name -> envoy.config.core.v3.Http1ProtocolOptions
|
||||
- 28, // 9: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.http2_protocol_options:type_name -> envoy.config.core.v3.Http2ProtocolOptions
|
||||
- 29, // 10: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.http3_protocol_options:type_name -> envoy.config.core.v3.Http3ProtocolOptions
|
||||
+ 28, // 7: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.common_http_protocol_options:type_name -> envoy.config.core.v3.HttpProtocolOptions
|
||||
+ 29, // 8: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.http_protocol_options:type_name -> envoy.config.core.v3.Http1ProtocolOptions
|
||||
+ 30, // 9: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.http2_protocol_options:type_name -> envoy.config.core.v3.Http2ProtocolOptions
|
||||
+ 31, // 10: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.http3_protocol_options:type_name -> envoy.config.core.v3.Http3ProtocolOptions
|
||||
1, // 11: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.server_header_transformation:type_name -> envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.ServerHeaderTransformation
|
||||
- 30, // 12: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.scheme_header_transformation:type_name -> envoy.config.core.v3.SchemeHeaderTransformation
|
||||
- 31, // 13: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.max_request_headers_kb:type_name -> google.protobuf.UInt32Value
|
||||
- 32, // 14: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.stream_idle_timeout:type_name -> google.protobuf.Duration
|
||||
- 32, // 15: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.request_timeout:type_name -> google.protobuf.Duration
|
||||
- 32, // 16: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.request_headers_timeout:type_name -> google.protobuf.Duration
|
||||
- 32, // 17: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.drain_timeout:type_name -> google.protobuf.Duration
|
||||
- 32, // 18: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.delayed_close_timeout:type_name -> google.protobuf.Duration
|
||||
- 33, // 19: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.access_log:type_name -> envoy.config.accesslog.v3.AccessLog
|
||||
- 25, // 20: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.use_remote_address:type_name -> google.protobuf.BoolValue
|
||||
- 34, // 21: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.original_ip_detection_extensions:type_name -> envoy.config.core.v3.TypedExtensionConfig
|
||||
+ 32, // 12: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.scheme_header_transformation:type_name -> envoy.config.core.v3.SchemeHeaderTransformation
|
||||
+ 33, // 13: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.max_request_headers_kb:type_name -> google.protobuf.UInt32Value
|
||||
+ 34, // 14: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.stream_idle_timeout:type_name -> google.protobuf.Duration
|
||||
+ 34, // 15: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.request_timeout:type_name -> google.protobuf.Duration
|
||||
+ 34, // 16: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.request_headers_timeout:type_name -> google.protobuf.Duration
|
||||
+ 34, // 17: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.drain_timeout:type_name -> google.protobuf.Duration
|
||||
+ 34, // 18: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.delayed_close_timeout:type_name -> google.protobuf.Duration
|
||||
+ 35, // 19: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.access_log:type_name -> envoy.config.accesslog.v3.AccessLog
|
||||
+ 27, // 20: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.use_remote_address:type_name -> google.protobuf.BoolValue
|
||||
+ 36, // 21: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.original_ip_detection_extensions:type_name -> envoy.config.core.v3.TypedExtensionConfig
|
||||
16, // 22: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.internal_address_config:type_name -> envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.InternalAddressConfig
|
||||
- 25, // 23: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.generate_request_id:type_name -> google.protobuf.BoolValue
|
||||
+ 27, // 23: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.generate_request_id:type_name -> google.protobuf.BoolValue
|
||||
2, // 24: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.forward_client_cert_details:type_name -> envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.ForwardClientCertDetails
|
||||
17, // 25: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.set_current_client_cert_details:type_name -> envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.SetCurrentClientCertDetails
|
||||
18, // 26: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.upgrade_configs:type_name -> envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.UpgradeConfig
|
||||
- 25, // 27: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.normalize_path:type_name -> google.protobuf.BoolValue
|
||||
+ 27, // 27: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.normalize_path:type_name -> google.protobuf.BoolValue
|
||||
3, // 28: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.path_with_escaped_slashes_action:type_name -> envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.PathWithEscapedSlashesAction
|
||||
13, // 29: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.request_id_extension:type_name -> envoy.extensions.filters.network.http_connection_manager.v3.RequestIDExtension
|
||||
6, // 30: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.local_reply_config:type_name -> envoy.extensions.filters.network.http_connection_manager.v3.LocalReplyConfig
|
||||
- 25, // 31: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.stream_error_on_invalid_http_message:type_name -> google.protobuf.BoolValue
|
||||
+ 27, // 31: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.stream_error_on_invalid_http_message:type_name -> google.protobuf.BoolValue
|
||||
19, // 32: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.path_normalization_options:type_name -> envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.PathNormalizationOptions
|
||||
7, // 33: envoy.extensions.filters.network.http_connection_manager.v3.LocalReplyConfig.mappers:type_name -> envoy.extensions.filters.network.http_connection_manager.v3.ResponseMapper
|
||||
- 35, // 34: envoy.extensions.filters.network.http_connection_manager.v3.LocalReplyConfig.body_format:type_name -> envoy.config.core.v3.SubstitutionFormatString
|
||||
- 36, // 35: envoy.extensions.filters.network.http_connection_manager.v3.ResponseMapper.filter:type_name -> envoy.config.accesslog.v3.AccessLogFilter
|
||||
- 31, // 36: envoy.extensions.filters.network.http_connection_manager.v3.ResponseMapper.status_code:type_name -> google.protobuf.UInt32Value
|
||||
- 37, // 37: envoy.extensions.filters.network.http_connection_manager.v3.ResponseMapper.body:type_name -> envoy.config.core.v3.DataSource
|
||||
- 35, // 38: envoy.extensions.filters.network.http_connection_manager.v3.ResponseMapper.body_format_override:type_name -> envoy.config.core.v3.SubstitutionFormatString
|
||||
- 38, // 39: envoy.extensions.filters.network.http_connection_manager.v3.ResponseMapper.headers_to_add:type_name -> envoy.config.core.v3.HeaderValueOption
|
||||
- 39, // 40: envoy.extensions.filters.network.http_connection_manager.v3.Rds.config_source:type_name -> envoy.config.core.v3.ConfigSource
|
||||
- 40, // 41: envoy.extensions.filters.network.http_connection_manager.v3.ScopedRouteConfigurationsList.scoped_route_configurations:type_name -> envoy.config.route.v3.ScopedRouteConfiguration
|
||||
+ 37, // 34: envoy.extensions.filters.network.http_connection_manager.v3.LocalReplyConfig.body_format:type_name -> envoy.config.core.v3.SubstitutionFormatString
|
||||
+ 38, // 35: envoy.extensions.filters.network.http_connection_manager.v3.ResponseMapper.filter:type_name -> envoy.config.accesslog.v3.AccessLogFilter
|
||||
+ 33, // 36: envoy.extensions.filters.network.http_connection_manager.v3.ResponseMapper.status_code:type_name -> google.protobuf.UInt32Value
|
||||
+ 39, // 37: envoy.extensions.filters.network.http_connection_manager.v3.ResponseMapper.body:type_name -> envoy.config.core.v3.DataSource
|
||||
+ 37, // 38: envoy.extensions.filters.network.http_connection_manager.v3.ResponseMapper.body_format_override:type_name -> envoy.config.core.v3.SubstitutionFormatString
|
||||
+ 40, // 39: envoy.extensions.filters.network.http_connection_manager.v3.ResponseMapper.headers_to_add:type_name -> envoy.config.core.v3.HeaderValueOption
|
||||
+ 41, // 40: envoy.extensions.filters.network.http_connection_manager.v3.Rds.config_source:type_name -> envoy.config.core.v3.ConfigSource
|
||||
+ 42, // 41: envoy.extensions.filters.network.http_connection_manager.v3.ScopedRouteConfigurationsList.scoped_route_configurations:type_name -> envoy.config.route.v3.ScopedRouteConfiguration
|
||||
20, // 42: envoy.extensions.filters.network.http_connection_manager.v3.ScopedRoutes.scope_key_builder:type_name -> envoy.extensions.filters.network.http_connection_manager.v3.ScopedRoutes.ScopeKeyBuilder
|
||||
- 39, // 43: envoy.extensions.filters.network.http_connection_manager.v3.ScopedRoutes.rds_config_source:type_name -> envoy.config.core.v3.ConfigSource
|
||||
+ 41, // 43: envoy.extensions.filters.network.http_connection_manager.v3.ScopedRoutes.rds_config_source:type_name -> envoy.config.core.v3.ConfigSource
|
||||
9, // 44: envoy.extensions.filters.network.http_connection_manager.v3.ScopedRoutes.scoped_route_configurations_list:type_name -> envoy.extensions.filters.network.http_connection_manager.v3.ScopedRouteConfigurationsList
|
||||
11, // 45: envoy.extensions.filters.network.http_connection_manager.v3.ScopedRoutes.scoped_rds:type_name -> envoy.extensions.filters.network.http_connection_manager.v3.ScopedRds
|
||||
- 39, // 46: envoy.extensions.filters.network.http_connection_manager.v3.ScopedRds.scoped_rds_config_source:type_name -> envoy.config.core.v3.ConfigSource
|
||||
- 41, // 47: envoy.extensions.filters.network.http_connection_manager.v3.HttpFilter.typed_config:type_name -> google.protobuf.Any
|
||||
- 42, // 48: envoy.extensions.filters.network.http_connection_manager.v3.HttpFilter.config_discovery:type_name -> envoy.config.core.v3.ExtensionConfigSource
|
||||
- 41, // 49: envoy.extensions.filters.network.http_connection_manager.v3.RequestIDExtension.typed_config:type_name -> google.protobuf.Any
|
||||
+ 41, // 46: envoy.extensions.filters.network.http_connection_manager.v3.ScopedRds.scoped_rds_config_source:type_name -> envoy.config.core.v3.ConfigSource
|
||||
+ 43, // 47: envoy.extensions.filters.network.http_connection_manager.v3.HttpFilter.typed_config:type_name -> google.protobuf.Any
|
||||
+ 44, // 48: envoy.extensions.filters.network.http_connection_manager.v3.HttpFilter.config_discovery:type_name -> envoy.config.core.v3.ExtensionConfigSource
|
||||
+ 43, // 49: envoy.extensions.filters.network.http_connection_manager.v3.RequestIDExtension.typed_config:type_name -> google.protobuf.Any
|
||||
5, // 50: envoy.extensions.filters.network.http_connection_manager.v3.EnvoyMobileHttpConnectionManager.config:type_name -> envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
|
||||
- 43, // 51: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.Tracing.client_sampling:type_name -> envoy.type.v3.Percent
|
||||
- 43, // 52: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.Tracing.random_sampling:type_name -> envoy.type.v3.Percent
|
||||
- 43, // 53: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.Tracing.overall_sampling:type_name -> envoy.type.v3.Percent
|
||||
- 31, // 54: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.Tracing.max_path_tag_length:type_name -> google.protobuf.UInt32Value
|
||||
- 44, // 55: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.Tracing.custom_tags:type_name -> envoy.type.tracing.v3.CustomTag
|
||||
- 45, // 56: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.Tracing.provider:type_name -> envoy.config.trace.v3.Tracing.Http
|
||||
- 25, // 57: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.SetCurrentClientCertDetails.subject:type_name -> google.protobuf.BoolValue
|
||||
+ 45, // 51: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.Tracing.client_sampling:type_name -> envoy.type.v3.Percent
|
||||
+ 45, // 52: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.Tracing.random_sampling:type_name -> envoy.type.v3.Percent
|
||||
+ 45, // 53: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.Tracing.overall_sampling:type_name -> envoy.type.v3.Percent
|
||||
+ 33, // 54: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.Tracing.max_path_tag_length:type_name -> google.protobuf.UInt32Value
|
||||
+ 46, // 55: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.Tracing.custom_tags:type_name -> envoy.type.tracing.v3.CustomTag
|
||||
+ 47, // 56: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.Tracing.provider:type_name -> envoy.config.trace.v3.Tracing.Http
|
||||
+ 27, // 57: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.SetCurrentClientCertDetails.subject:type_name -> google.protobuf.BoolValue
|
||||
12, // 58: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.UpgradeConfig.filters:type_name -> envoy.extensions.filters.network.http_connection_manager.v3.HttpFilter
|
||||
- 25, // 59: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.UpgradeConfig.enabled:type_name -> google.protobuf.BoolValue
|
||||
- 46, // 60: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.PathNormalizationOptions.forwarding_transformation:type_name -> envoy.type.http.v3.PathTransformation
|
||||
- 46, // 61: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.PathNormalizationOptions.http_filter_transformation:type_name -> envoy.type.http.v3.PathTransformation
|
||||
+ 27, // 59: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.UpgradeConfig.enabled:type_name -> google.protobuf.BoolValue
|
||||
+ 48, // 60: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.PathNormalizationOptions.forwarding_transformation:type_name -> envoy.type.http.v3.PathTransformation
|
||||
+ 48, // 61: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.PathNormalizationOptions.http_filter_transformation:type_name -> envoy.type.http.v3.PathTransformation
|
||||
21, // 62: envoy.extensions.filters.network.http_connection_manager.v3.ScopedRoutes.ScopeKeyBuilder.fragments:type_name -> envoy.extensions.filters.network.http_connection_manager.v3.ScopedRoutes.ScopeKeyBuilder.FragmentBuilder
|
||||
22, // 63: envoy.extensions.filters.network.http_connection_manager.v3.ScopedRoutes.ScopeKeyBuilder.FragmentBuilder.header_value_extractor:type_name -> envoy.extensions.filters.network.http_connection_manager.v3.ScopedRoutes.ScopeKeyBuilder.FragmentBuilder.HeaderValueExtractor
|
||||
- 23, // 64: envoy.extensions.filters.network.http_connection_manager.v3.ScopedRoutes.ScopeKeyBuilder.FragmentBuilder.HeaderValueExtractor.element:type_name -> envoy.extensions.filters.network.http_connection_manager.v3.ScopedRoutes.ScopeKeyBuilder.FragmentBuilder.HeaderValueExtractor.KvElement
|
||||
- 65, // [65:65] is the sub-list for method output_type
|
||||
- 65, // [65:65] is the sub-list for method input_type
|
||||
- 65, // [65:65] is the sub-list for extension type_name
|
||||
- 65, // [65:65] is the sub-list for extension extendee
|
||||
- 0, // [0:65] is the sub-list for field type_name
|
||||
+ 23, // 64: envoy.extensions.filters.network.http_connection_manager.v3.ScopedRoutes.ScopeKeyBuilder.FragmentBuilder.host_value_extractor:type_name -> envoy.extensions.filters.network.http_connection_manager.v3.ScopedRoutes.ScopeKeyBuilder.FragmentBuilder.HostValueExtractor
|
||||
+ 24, // 65: envoy.extensions.filters.network.http_connection_manager.v3.ScopedRoutes.ScopeKeyBuilder.FragmentBuilder.local_port_value_extractor:type_name -> envoy.extensions.filters.network.http_connection_manager.v3.ScopedRoutes.ScopeKeyBuilder.FragmentBuilder.LocalPortValueExtractor
|
||||
+ 25, // 66: envoy.extensions.filters.network.http_connection_manager.v3.ScopedRoutes.ScopeKeyBuilder.FragmentBuilder.HeaderValueExtractor.element:type_name -> envoy.extensions.filters.network.http_connection_manager.v3.ScopedRoutes.ScopeKeyBuilder.FragmentBuilder.HeaderValueExtractor.KvElement
|
||||
+ 33, // 67: envoy.extensions.filters.network.http_connection_manager.v3.ScopedRoutes.ScopeKeyBuilder.FragmentBuilder.HostValueExtractor.max_recompute_num:type_name -> google.protobuf.UInt32Value
|
||||
+ 68, // [68:68] is the sub-list for method output_type
|
||||
+ 68, // [68:68] is the sub-list for method input_type
|
||||
+ 68, // [68:68] is the sub-list for extension type_name
|
||||
+ 68, // [68:68] is the sub-list for extension extendee
|
||||
+ 0, // [0:68] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() {
|
||||
@@ -3625,6 +3793,30 @@
|
||||
}
|
||||
}
|
||||
file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} {
|
||||
+ switch v := v.(*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HostValueExtractor); i {
|
||||
+ case 0:
|
||||
+ return &v.state
|
||||
+ case 1:
|
||||
+ return &v.sizeCache
|
||||
+ case 2:
|
||||
+ return &v.unknownFields
|
||||
+ default:
|
||||
+ return nil
|
||||
+ }
|
||||
+ }
|
||||
+ file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} {
|
||||
+ switch v := v.(*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_LocalPortValueExtractor); i {
|
||||
+ case 0:
|
||||
+ return &v.state
|
||||
+ case 1:
|
||||
+ return &v.sizeCache
|
||||
+ case 2:
|
||||
+ return &v.unknownFields
|
||||
+ default:
|
||||
+ return nil
|
||||
+ }
|
||||
+ }
|
||||
+ file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@@ -3653,6 +3845,8 @@
|
||||
}
|
||||
file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_msgTypes[16].OneofWrappers = []interface{}{
|
||||
(*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_)(nil),
|
||||
+ (*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HostValueExtractor_)(nil),
|
||||
+ (*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_LocalPortValueExtractor_)(nil),
|
||||
}
|
||||
file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_msgTypes[17].OneofWrappers = []interface{}{
|
||||
(*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_Index)(nil),
|
||||
@@ -3664,7 +3858,7 @@
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_rawDesc,
|
||||
NumEnums: 5,
|
||||
- NumMessages: 19,
|
||||
+ NumMessages: 21,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
diff -Naur go-control-plane/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.pb.validate.go go-control-plane-new/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.pb.validate.go
|
||||
--- go-control-plane/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.pb.validate.go 2024-01-04 21:07:22.000000000 +0800
|
||||
+++ go-control-plane-new/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.pb.validate.go 2024-01-04 21:02:10.000000000 +0800
|
||||
@@ -1986,6 +1986,30 @@
|
||||
}
|
||||
}
|
||||
|
||||
+ case *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HostValueExtractor_:
|
||||
+
|
||||
+ if v, ok := interface{}(m.GetHostValueExtractor()).(interface{ Validate() error }); ok {
|
||||
+ if err := v.Validate(); err != nil {
|
||||
+ return ScopedRoutes_ScopeKeyBuilder_FragmentBuilderValidationError{
|
||||
+ field: "HostValueExtractor",
|
||||
+ reason: "embedded message failed validation",
|
||||
+ cause: err,
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ case *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_LocalPortValueExtractor_:
|
||||
+
|
||||
+ if v, ok := interface{}(m.GetLocalPortValueExtractor()).(interface{ Validate() error }); ok {
|
||||
+ if err := v.Validate(); err != nil {
|
||||
+ return ScopedRoutes_ScopeKeyBuilder_FragmentBuilderValidationError{
|
||||
+ field: "LocalPortValueExtractor",
|
||||
+ reason: "embedded message failed validation",
|
||||
+ cause: err,
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
default:
|
||||
return ScopedRoutes_ScopeKeyBuilder_FragmentBuilderValidationError{
|
||||
field: "Type",
|
||||
@@ -2162,6 +2186,172 @@
|
||||
} = ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractorValidationError{}
|
||||
|
||||
// Validate checks the field values on
|
||||
+// ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HostValueExtractor with the
|
||||
+// rules defined in the proto definition for this message. If any rules are
|
||||
+// violated, an error is returned.
|
||||
+func (m *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HostValueExtractor) Validate() error {
|
||||
+ if m == nil {
|
||||
+ return nil
|
||||
+ }
|
||||
+
|
||||
+ if v, ok := interface{}(m.GetMaxRecomputeNum()).(interface{ Validate() error }); ok {
|
||||
+ if err := v.Validate(); err != nil {
|
||||
+ return ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HostValueExtractorValidationError{
|
||||
+ field: "MaxRecomputeNum",
|
||||
+ reason: "embedded message failed validation",
|
||||
+ cause: err,
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ return nil
|
||||
+}
|
||||
+
|
||||
+// ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HostValueExtractorValidationError
|
||||
+// is the validation error returned by
|
||||
+// ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HostValueExtractor.Validate if
|
||||
+// the designated constraints aren't met.
|
||||
+type ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HostValueExtractorValidationError struct {
|
||||
+ field string
|
||||
+ reason string
|
||||
+ cause error
|
||||
+ key bool
|
||||
+}
|
||||
+
|
||||
+// Field function returns field value.
|
||||
+func (e ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HostValueExtractorValidationError) Field() string {
|
||||
+ return e.field
|
||||
+}
|
||||
+
|
||||
+// Reason function returns reason value.
|
||||
+func (e ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HostValueExtractorValidationError) Reason() string {
|
||||
+ return e.reason
|
||||
+}
|
||||
+
|
||||
+// Cause function returns cause value.
|
||||
+func (e ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HostValueExtractorValidationError) Cause() error {
|
||||
+ return e.cause
|
||||
+}
|
||||
+
|
||||
+// Key function returns key value.
|
||||
+func (e ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HostValueExtractorValidationError) Key() bool {
|
||||
+ return e.key
|
||||
+}
|
||||
+
|
||||
+// ErrorName returns error name.
|
||||
+func (e ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HostValueExtractorValidationError) ErrorName() string {
|
||||
+ return "ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HostValueExtractorValidationError"
|
||||
+}
|
||||
+
|
||||
+// Error satisfies the builtin error interface
|
||||
+func (e ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HostValueExtractorValidationError) Error() string {
|
||||
+ cause := ""
|
||||
+ if e.cause != nil {
|
||||
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
|
||||
+ }
|
||||
+
|
||||
+ key := ""
|
||||
+ if e.key {
|
||||
+ key = "key for "
|
||||
+ }
|
||||
+
|
||||
+ return fmt.Sprintf(
|
||||
+ "invalid %sScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HostValueExtractor.%s: %s%s",
|
||||
+ key,
|
||||
+ e.field,
|
||||
+ e.reason,
|
||||
+ cause)
|
||||
+}
|
||||
+
|
||||
+var _ error = ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HostValueExtractorValidationError{}
|
||||
+
|
||||
+var _ interface {
|
||||
+ Field() string
|
||||
+ Reason() string
|
||||
+ Key() bool
|
||||
+ Cause() error
|
||||
+ ErrorName() string
|
||||
+} = ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HostValueExtractorValidationError{}
|
||||
+
|
||||
+// Validate checks the field values on
|
||||
+// ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_LocalPortValueExtractor with
|
||||
+// the rules defined in the proto definition for this message. If any rules
|
||||
+// are violated, an error is returned.
|
||||
+func (m *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_LocalPortValueExtractor) Validate() error {
|
||||
+ if m == nil {
|
||||
+ return nil
|
||||
+ }
|
||||
+
|
||||
+ return nil
|
||||
+}
|
||||
+
|
||||
+// ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_LocalPortValueExtractorValidationError
|
||||
+// is the validation error returned by
|
||||
+// ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_LocalPortValueExtractor.Validate
|
||||
+// if the designated constraints aren't met.
|
||||
+type ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_LocalPortValueExtractorValidationError struct {
|
||||
+ field string
|
||||
+ reason string
|
||||
+ cause error
|
||||
+ key bool
|
||||
+}
|
||||
+
|
||||
+// Field function returns field value.
|
||||
+func (e ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_LocalPortValueExtractorValidationError) Field() string {
|
||||
+ return e.field
|
||||
+}
|
||||
+
|
||||
+// Reason function returns reason value.
|
||||
+func (e ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_LocalPortValueExtractorValidationError) Reason() string {
|
||||
+ return e.reason
|
||||
+}
|
||||
+
|
||||
+// Cause function returns cause value.
|
||||
+func (e ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_LocalPortValueExtractorValidationError) Cause() error {
|
||||
+ return e.cause
|
||||
+}
|
||||
+
|
||||
+// Key function returns key value.
|
||||
+func (e ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_LocalPortValueExtractorValidationError) Key() bool {
|
||||
+ return e.key
|
||||
+}
|
||||
+
|
||||
+// ErrorName returns error name.
|
||||
+func (e ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_LocalPortValueExtractorValidationError) ErrorName() string {
|
||||
+ return "ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_LocalPortValueExtractorValidationError"
|
||||
+}
|
||||
+
|
||||
+// Error satisfies the builtin error interface
|
||||
+func (e ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_LocalPortValueExtractorValidationError) Error() string {
|
||||
+ cause := ""
|
||||
+ if e.cause != nil {
|
||||
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
|
||||
+ }
|
||||
+
|
||||
+ key := ""
|
||||
+ if e.key {
|
||||
+ key = "key for "
|
||||
+ }
|
||||
+
|
||||
+ return fmt.Sprintf(
|
||||
+ "invalid %sScopedRoutes_ScopeKeyBuilder_FragmentBuilder_LocalPortValueExtractor.%s: %s%s",
|
||||
+ key,
|
||||
+ e.field,
|
||||
+ e.reason,
|
||||
+ cause)
|
||||
+}
|
||||
+
|
||||
+var _ error = ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_LocalPortValueExtractorValidationError{}
|
||||
+
|
||||
+var _ interface {
|
||||
+ Field() string
|
||||
+ Reason() string
|
||||
+ Key() bool
|
||||
+ Cause() error
|
||||
+ ErrorName() string
|
||||
+} = ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_LocalPortValueExtractorValidationError{}
|
||||
+
|
||||
+// Validate checks the field values on
|
||||
// ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement
|
||||
// with the rules defined in the proto definition for this message. If any
|
||||
// rules are violated, an error is returned.
|
||||
File diff suppressed because it is too large
Load Diff
253
go.mod
253
go.mod
@@ -10,47 +10,61 @@ replace github.com/chzyer/logex => github.com/chzyer/logex v1.1.11-0.20170329064
|
||||
// Avoid pulling in incompatible libraries
|
||||
replace github.com/docker/distribution => github.com/docker/distribution v0.0.0-20191216044856-a8371794149d
|
||||
|
||||
replace github.com/docker/docker => github.com/moby/moby v17.12.0-ce-rc1.0.20200618181300-9dc6525e6118+incompatible
|
||||
|
||||
// Client-go does not handle different versions of mergo due to some breaking changes - use the matching version
|
||||
replace github.com/imdario/mergo => github.com/imdario/mergo v0.3.5
|
||||
|
||||
require (
|
||||
github.com/agiledragon/gomonkey/v2 v2.9.0
|
||||
github.com/AlecAivazis/survey/v2 v2.3.6
|
||||
github.com/agiledragon/gomonkey/v2 v2.11.0
|
||||
github.com/avast/retry-go/v4 v4.3.4
|
||||
github.com/compose-spec/compose-go v1.8.2
|
||||
github.com/docker/cli v20.10.20+incompatible
|
||||
github.com/docker/compose/v2 v2.0.0-00010101000000-000000000000
|
||||
github.com/docker/docker v20.10.20+incompatible
|
||||
github.com/dubbogo/go-zookeeper v1.0.4-0.20211212162352-f9d2183d89d5
|
||||
github.com/dubbogo/gost v1.13.1
|
||||
github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1
|
||||
github.com/fatih/color v1.14.1
|
||||
github.com/fatih/structtag v1.2.0
|
||||
github.com/gogo/protobuf v1.3.2
|
||||
github.com/golang/protobuf v1.5.2
|
||||
github.com/google/go-cmp v0.5.8
|
||||
github.com/google/go-cmp v0.5.9
|
||||
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0
|
||||
github.com/hashicorp/consul/api v1.23.0
|
||||
github.com/hashicorp/go-multierror v1.1.1
|
||||
github.com/hudl/fargo v1.4.0
|
||||
github.com/iancoleman/orderedmap v0.3.0
|
||||
github.com/mitchellh/go-homedir v1.1.0
|
||||
github.com/mitchellh/mapstructure v1.5.0
|
||||
github.com/nacos-group/nacos-sdk-go v1.0.8
|
||||
github.com/nacos-group/nacos-sdk-go/v2 v2.1.2
|
||||
github.com/pkg/errors v0.9.1
|
||||
github.com/spf13/cobra v1.2.1
|
||||
github.com/santhosh-tekuri/jsonschema/v5 v5.3.1
|
||||
github.com/spf13/cobra v1.6.1
|
||||
github.com/spf13/pflag v1.0.5
|
||||
github.com/stretchr/testify v1.8.1
|
||||
github.com/spf13/viper v1.8.1
|
||||
github.com/stretchr/testify v1.8.3
|
||||
go.uber.org/atomic v1.9.0
|
||||
google.golang.org/grpc v1.48.0
|
||||
google.golang.org/protobuf v1.28.0
|
||||
google.golang.org/protobuf v1.28.1
|
||||
gopkg.in/yaml.v2 v2.4.0
|
||||
gopkg.in/yaml.v3 v3.0.1
|
||||
istio.io/api v0.0.0-20211122181927-8da52c66ff23
|
||||
istio.io/client-go v1.12.0-rc.1.0.20211118171212-b744b6f111e4
|
||||
istio.io/gogo-genproto v0.0.0-20211115195057-0e34bdd2be67
|
||||
istio.io/istio v0.0.0
|
||||
istio.io/pkg v0.0.0-20211115195056-e379f31ee62a
|
||||
k8s.io/api v0.22.2
|
||||
k8s.io/apimachinery v0.22.2
|
||||
k8s.io/api v0.24.1
|
||||
k8s.io/apimachinery v0.24.1
|
||||
k8s.io/cli-runtime v0.22.2
|
||||
k8s.io/client-go v0.22.2
|
||||
k8s.io/client-go v0.24.1
|
||||
k8s.io/kubectl v0.22.2
|
||||
sigs.k8s.io/controller-runtime v0.10.2
|
||||
sigs.k8s.io/yaml v1.3.0
|
||||
)
|
||||
|
||||
require (
|
||||
cloud.google.com/go v0.97.0 // indirect
|
||||
cloud.google.com/go v0.98.0 // indirect
|
||||
cloud.google.com/go/logging v1.4.2 // indirect
|
||||
contrib.go.opencensus.io/exporter/prometheus v0.4.0 // indirect
|
||||
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
|
||||
@@ -60,47 +74,69 @@ require (
|
||||
github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect
|
||||
github.com/Azure/go-autorest/logger v0.2.1 // indirect
|
||||
github.com/Azure/go-autorest/tracing v0.6.0 // indirect
|
||||
github.com/BurntSushi/toml v0.3.1 // indirect
|
||||
github.com/MakeNowJust/heredoc v0.0.0-20170808103936-bb23615498cd // indirect
|
||||
github.com/Masterminds/goutils v1.1.1 // indirect
|
||||
github.com/Masterminds/semver/v3 v3.1.1 // indirect
|
||||
github.com/Masterminds/sprig/v3 v3.2.2 // indirect
|
||||
github.com/Microsoft/go-winio v0.5.0 // indirect
|
||||
github.com/Microsoft/hcsshim v0.8.21 // indirect
|
||||
github.com/Masterminds/squirrel v1.5.0 // indirect
|
||||
github.com/Microsoft/go-winio v0.5.2 // indirect
|
||||
github.com/Microsoft/hcsshim v0.9.6 // indirect
|
||||
github.com/PuerkitoBio/purell v1.1.1 // indirect
|
||||
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect
|
||||
github.com/RageCage64/multilinediff v0.2.0 // indirect
|
||||
github.com/aliyun/alibaba-cloud-sdk-go v1.61.1704 // indirect
|
||||
github.com/aws/aws-sdk-go v1.41.7 // indirect
|
||||
github.com/armon/go-metrics v0.4.1 // indirect
|
||||
github.com/asaskevich/govalidator v0.0.0-20200428143746-21a406dcc535 // indirect
|
||||
github.com/aws/aws-sdk-go v1.43.16 // indirect
|
||||
github.com/beorn7/perks v1.0.1 // indirect
|
||||
github.com/bmatcuk/doublestar/v4 v4.6.0 // indirect
|
||||
github.com/braydonk/yaml v0.7.0 // indirect
|
||||
github.com/buger/goterm v1.0.4 // indirect
|
||||
github.com/buger/jsonparser v1.1.1 // indirect
|
||||
github.com/cenkalti/backoff/v4 v4.1.1 // indirect
|
||||
github.com/cenkalti/backoff/v4 v4.1.2 // indirect
|
||||
github.com/census-instrumentation/opencensus-proto v0.3.0 // indirect
|
||||
github.com/cespare/xxhash/v2 v2.1.2 // indirect
|
||||
github.com/chai2010/gettext-go v0.0.0-20160711120539-c6fed771bfd5 // indirect
|
||||
github.com/clbanning/mxj v1.8.4 // indirect
|
||||
github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4 // indirect
|
||||
github.com/cncf/xds/go v0.0.0-20220520190051-1e77728a1eaa // indirect
|
||||
github.com/containerd/continuity v0.1.0 // indirect
|
||||
github.com/compose-spec/godotenv v1.1.1 // indirect
|
||||
github.com/containerd/cgroups v1.0.4 // indirect
|
||||
github.com/containerd/console v1.0.3 // indirect
|
||||
github.com/containerd/containerd v1.6.14 // indirect
|
||||
github.com/containerd/continuity v0.3.0 // indirect
|
||||
github.com/containerd/typeurl v1.0.2 // indirect
|
||||
github.com/coreos/go-oidc/v3 v3.1.0 // indirect
|
||||
github.com/davecgh/go-spew v1.1.1 // indirect
|
||||
github.com/cyphar/filepath-securejoin v0.2.3 // indirect
|
||||
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
|
||||
github.com/decred/dcrd/dcrec/secp256k1/v3 v3.0.0 // indirect
|
||||
github.com/docker/cli v20.10.7+incompatible // indirect
|
||||
github.com/docker/distribution v2.7.1+incompatible // indirect
|
||||
github.com/docker/docker v20.10.7+incompatible // indirect
|
||||
github.com/docker/docker-credential-helpers v0.6.3 // indirect
|
||||
github.com/docker/go-units v0.4.0 // indirect
|
||||
github.com/distribution/distribution/v3 v3.0.0-20221201083218-92d136e113cf // indirect
|
||||
github.com/docker/buildx v0.9.1 // indirect
|
||||
github.com/docker/distribution v2.8.1+incompatible // indirect
|
||||
github.com/docker/docker-credential-helpers v0.7.0 // indirect
|
||||
github.com/docker/go v1.5.1-1.0.20160303222718-d30aec9fd63c // indirect
|
||||
github.com/docker/go-connections v0.4.0 // indirect
|
||||
github.com/docker/go-metrics v0.0.1 // indirect
|
||||
github.com/docker/go-units v0.5.0 // indirect
|
||||
github.com/envoyproxy/protoc-gen-validate v0.1.0 // indirect
|
||||
github.com/evanphx/json-patch v4.12.0+incompatible // indirect
|
||||
github.com/evanphx/json-patch/v5 v5.6.0 // indirect
|
||||
github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d // indirect
|
||||
github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8 // indirect
|
||||
github.com/fsnotify/fsnotify v1.5.1 // indirect
|
||||
github.com/fvbommel/sortorder v1.0.1 // indirect
|
||||
github.com/fvbommel/sortorder v1.0.2 // indirect
|
||||
github.com/ghodss/yaml v1.0.0 // indirect
|
||||
github.com/go-errors/errors v1.0.1 // indirect
|
||||
github.com/go-kit/log v0.1.0 // indirect
|
||||
github.com/go-logfmt/logfmt v0.5.0 // indirect
|
||||
github.com/go-logr/logr v0.4.0 // indirect
|
||||
github.com/go-logr/logr v1.2.3 // indirect
|
||||
github.com/go-openapi/jsonpointer v0.19.5 // indirect
|
||||
github.com/go-openapi/jsonreference v0.19.5 // indirect
|
||||
github.com/go-openapi/swag v0.19.14 // indirect
|
||||
github.com/go-openapi/swag v0.19.15 // indirect
|
||||
github.com/gobwas/glob v0.2.3 // indirect
|
||||
github.com/goccy/go-json v0.4.8 // indirect
|
||||
github.com/gofrs/flock v0.8.0 // indirect
|
||||
github.com/gogo/googleapis v1.4.1 // indirect
|
||||
github.com/golang-jwt/jwt/v4 v4.2.0 // indirect
|
||||
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
|
||||
github.com/golang/mock v1.6.0 // indirect
|
||||
@@ -111,18 +147,35 @@ require (
|
||||
github.com/google/uuid v1.3.0 // indirect
|
||||
github.com/googleapis/gax-go/v2 v2.1.1 // indirect
|
||||
github.com/googleapis/gnostic v0.5.5 // indirect
|
||||
github.com/gorilla/mux v1.8.0 // indirect
|
||||
github.com/gosuri/uitable v0.0.4 // indirect
|
||||
github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7 // indirect
|
||||
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect
|
||||
github.com/hashicorp/errwrap v1.0.0 // indirect
|
||||
github.com/hashicorp/go-version v1.3.0 // indirect
|
||||
github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645 // indirect
|
||||
github.com/hashicorp/errwrap v1.1.0 // indirect
|
||||
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
|
||||
github.com/hashicorp/go-hclog v1.5.0 // indirect
|
||||
github.com/hashicorp/go-immutable-radix v1.3.1 // indirect
|
||||
github.com/hashicorp/go-rootcerts v1.0.2 // indirect
|
||||
github.com/hashicorp/go-version v1.6.0 // indirect
|
||||
github.com/hashicorp/golang-lru v0.5.4 // indirect
|
||||
github.com/hashicorp/hcl v1.0.0 // indirect
|
||||
github.com/hashicorp/serf v0.10.1 // indirect
|
||||
github.com/huandu/xstrings v1.3.2 // indirect
|
||||
github.com/imdario/mergo v0.3.12 // indirect
|
||||
github.com/inconshreveable/mousetrap v1.0.0 // indirect
|
||||
github.com/imdario/mergo v0.3.13 // indirect
|
||||
github.com/inconshreveable/mousetrap v1.0.1 // indirect
|
||||
github.com/jaguilar/vt100 v0.0.0-20150826170717-2703a27b14ea // indirect
|
||||
github.com/jmespath/go-jmespath v0.4.0 // indirect
|
||||
github.com/jmoiron/sqlx v1.3.1 // indirect
|
||||
github.com/jonboulle/clockwork v0.2.2 // indirect
|
||||
github.com/josharian/intern v1.0.0 // indirect
|
||||
github.com/json-iterator/go v1.1.12 // indirect
|
||||
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect
|
||||
github.com/klauspost/compress v1.15.9 // indirect
|
||||
github.com/kr/pretty v0.3.0 // indirect
|
||||
github.com/kr/text v0.2.0 // indirect
|
||||
github.com/lann/builder v0.0.0-20180802200727-47ae307949d0 // indirect
|
||||
github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0 // indirect
|
||||
github.com/lestrrat-go/backoff/v2 v2.0.7 // indirect
|
||||
github.com/lestrrat-go/blackmagic v1.0.0 // indirect
|
||||
github.com/lestrrat-go/httpcc v1.0.0 // indirect
|
||||
@@ -131,66 +184,103 @@ require (
|
||||
github.com/lestrrat-go/option v1.0.0 // indirect
|
||||
github.com/lestrrat/go-file-rotatelogs v0.0.0-20180223000712-d3151e2a480f // indirect
|
||||
github.com/lestrrat/go-strftime v0.0.0-20180220042222-ba3bf9c1d042 // indirect
|
||||
github.com/lib/pq v1.10.0 // indirect
|
||||
github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de // indirect
|
||||
github.com/mailru/easyjson v0.7.6 // indirect
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
|
||||
github.com/magiconair/properties v1.8.5 // indirect
|
||||
github.com/mailru/easyjson v0.7.7 // indirect
|
||||
github.com/mattn/go-colorable v0.1.13 // indirect
|
||||
github.com/mattn/go-isatty v0.0.17 // indirect
|
||||
github.com/mattn/go-runewidth v0.0.12 // indirect
|
||||
github.com/mattn/go-shellwords v1.0.12 // indirect
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
|
||||
github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b // indirect
|
||||
github.com/miekg/dns v1.1.43 // indirect
|
||||
github.com/miekg/pkcs11 v1.1.1 // indirect
|
||||
github.com/mitchellh/copystructure v1.2.0 // indirect
|
||||
github.com/mitchellh/go-wordwrap v1.0.0 // indirect
|
||||
github.com/mitchellh/reflectwalk v1.0.2 // indirect
|
||||
github.com/moby/buildkit v0.10.4 // indirect
|
||||
github.com/moby/locker v1.0.1 // indirect
|
||||
github.com/moby/spdystream v0.2.0 // indirect
|
||||
github.com/moby/term v0.0.0-20210610120745-9d4ed1856297 // indirect
|
||||
github.com/moby/sys/mount v0.3.0 // indirect
|
||||
github.com/moby/sys/mountinfo v0.6.0 // indirect
|
||||
github.com/moby/sys/signal v0.7.0 // indirect
|
||||
github.com/moby/sys/symlink v0.2.0 // indirect
|
||||
github.com/moby/term v0.0.0-20221128092401-c43b287e0e0f // indirect
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
|
||||
github.com/modern-go/reflect2 v1.0.2 // indirect
|
||||
github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 // indirect
|
||||
github.com/morikuni/aec v1.0.0 // indirect
|
||||
github.com/natefinch/lumberjack v2.0.0+incompatible // indirect
|
||||
github.com/op/go-logging v0.0.0-20160315200505-970db520ece7 // indirect
|
||||
github.com/opencontainers/go-digest v1.0.0 // indirect
|
||||
github.com/opencontainers/image-spec v1.0.1 // indirect
|
||||
github.com/opencontainers/runc v1.0.2 // indirect
|
||||
github.com/opencontainers/image-spec v1.1.0-rc2 // indirect
|
||||
github.com/opencontainers/runc v1.1.3 // indirect
|
||||
github.com/openshift/api v0.0.0-20200713203337-b2494ecb17dd // indirect
|
||||
github.com/opentracing/opentracing-go v1.2.0 // indirect
|
||||
github.com/pelletier/go-toml v1.9.4 // indirect
|
||||
github.com/peterbourgon/diskv v2.0.1+incompatible // indirect
|
||||
github.com/pmezard/go-difflib v1.0.0 // indirect
|
||||
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
|
||||
github.com/prometheus/client_golang v1.12.2 // indirect
|
||||
github.com/prometheus/client_model v0.2.0 // indirect
|
||||
github.com/prometheus/common v0.32.1 // indirect
|
||||
github.com/prometheus/procfs v0.7.3 // indirect
|
||||
github.com/prometheus/statsd_exporter v0.21.0 // indirect
|
||||
github.com/russross/blackfriday v1.5.2 // indirect
|
||||
github.com/rivo/uniseg v0.2.0 // indirect
|
||||
github.com/rogpeppe/go-internal v1.6.1 // indirect
|
||||
github.com/rubenv/sql-migrate v0.0.0-20210614095031-55d5740dbbcc // indirect
|
||||
github.com/russross/blackfriday v1.6.0 // indirect
|
||||
github.com/sanathkr/go-yaml v0.0.0-20170819195128-ed9d249f429b // indirect
|
||||
github.com/shopspring/decimal v1.2.0 // indirect
|
||||
github.com/sirupsen/logrus v1.8.1 // indirect
|
||||
github.com/sirupsen/logrus v1.9.0 // indirect
|
||||
github.com/spaolacci/murmur3 v1.1.0 // indirect
|
||||
github.com/spf13/afero v1.2.2 // indirect
|
||||
github.com/spf13/cast v1.3.1 // indirect
|
||||
github.com/spf13/jwalterweatherman v1.1.0 // indirect
|
||||
github.com/theupdateframework/notary v0.7.0 // indirect
|
||||
github.com/tidwall/match v1.1.1 // indirect
|
||||
github.com/tidwall/pretty v1.2.0 // indirect
|
||||
github.com/tonistiigi/fsutil v0.0.0-20220930225714-4638ad635be5 // indirect
|
||||
github.com/tonistiigi/units v0.0.0-20180711220420-6950e57a87ea // indirect
|
||||
github.com/toolkits/concurrent v0.0.0-20150624120057-a4371d70e3e3 // indirect
|
||||
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect
|
||||
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
|
||||
github.com/xeipuuv/gojsonschema v1.2.0 // indirect
|
||||
github.com/xlab/treeprint v0.0.0-20181112141820-a009c3971eca // indirect
|
||||
github.com/yl2chen/cidranger v1.0.2 // indirect
|
||||
go.opencensus.io v0.23.0 // indirect
|
||||
go.opentelemetry.io/proto/otlp v0.7.0 // indirect
|
||||
go.opentelemetry.io/proto/otlp v0.12.0 // indirect
|
||||
go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5 // indirect
|
||||
go.uber.org/multierr v1.7.0 // indirect
|
||||
go.uber.org/zap v1.21.0 // indirect
|
||||
golang.org/x/crypto v0.0.0-20220315160706-3147a52a75dd // indirect
|
||||
golang.org/x/net v0.0.0-20220722155237-a158d28d115b // indirect
|
||||
golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 // indirect
|
||||
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 // indirect
|
||||
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f // indirect
|
||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect
|
||||
golang.org/x/text v0.3.7 // indirect
|
||||
golang.org/x/crypto v0.11.0 // indirect
|
||||
golang.org/x/exp v0.0.0-20230321023759-10a507213a29 // indirect
|
||||
golang.org/x/net v0.12.0 // indirect
|
||||
golang.org/x/oauth2 v0.6.0 // indirect
|
||||
golang.org/x/sync v0.2.0 // indirect
|
||||
golang.org/x/sys v0.10.0 // indirect
|
||||
golang.org/x/term v0.10.0 // indirect
|
||||
golang.org/x/text v0.11.0 // indirect
|
||||
golang.org/x/time v0.0.0-20220722155302-e5dcc9cfc0b9 // indirect
|
||||
gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect
|
||||
gomodules.xyz/jsonpatch/v3 v3.0.1 // indirect
|
||||
gomodules.xyz/orderedmap v0.1.0 // indirect
|
||||
google.golang.org/api v0.59.0 // indirect
|
||||
google.golang.org/api v0.61.0 // indirect
|
||||
google.golang.org/appengine v1.6.7 // indirect
|
||||
google.golang.org/genproto v0.0.0-20211020151524-b7c3a969101a // indirect
|
||||
google.golang.org/genproto v0.0.0-20220502173005-c8bf987b8c21 // indirect
|
||||
gopkg.in/gcfg.v1 v1.2.3 // indirect
|
||||
gopkg.in/gorp.v1 v1.7.2 // indirect
|
||||
gopkg.in/inf.v0 v0.9.1 // indirect
|
||||
gopkg.in/ini.v1 v1.66.2 // indirect
|
||||
gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect
|
||||
gopkg.in/square/go-jose.v2 v2.6.0 // indirect
|
||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||
k8s.io/apiextensions-apiserver v0.22.2 // indirect
|
||||
k8s.io/component-base v0.22.2 // indirect
|
||||
k8s.io/klog/v2 v2.10.0 // indirect
|
||||
k8s.io/kube-openapi v0.0.0-20211020163157-7327e2aaee2b // indirect
|
||||
gopkg.in/warnings.v0 v0.1.2 // indirect
|
||||
k8s.io/apiserver v0.22.5 // indirect
|
||||
k8s.io/component-base v0.22.5 // indirect
|
||||
k8s.io/klog/v2 v2.60.1 // indirect
|
||||
k8s.io/kube-openapi v0.0.0-20211109043538-20434351676c // indirect
|
||||
k8s.io/utils v0.0.0-20220728103510-ee6ede2d64ed // indirect
|
||||
oras.land/oras-go v0.4.0 // indirect
|
||||
sigs.k8s.io/gateway-api v0.4.0 // indirect
|
||||
sigs.k8s.io/kustomize/api v0.8.11 // indirect
|
||||
sigs.k8s.io/kustomize/kyaml v0.11.0 // indirect
|
||||
@@ -209,3 +299,60 @@ replace istio.io/pkg => ./external/pkg
|
||||
replace istio.io/client-go => ./external/client-go
|
||||
|
||||
replace istio.io/istio => ./external/istio
|
||||
|
||||
require (
|
||||
github.com/evanphx/json-patch/v5 v5.6.0
|
||||
github.com/google/yamlfmt v0.10.0
|
||||
github.com/kylelemons/godebug v1.1.0
|
||||
github.com/tidwall/gjson v1.17.0
|
||||
helm.sh/helm/v3 v3.7.1
|
||||
k8s.io/apiextensions-apiserver v0.25.4
|
||||
knative.dev/networking v0.0.0-20220302134042-e8b2eb995165
|
||||
knative.dev/pkg v0.0.0-20220301181942-2fdd5f232e77
|
||||
)
|
||||
|
||||
replace (
|
||||
github.com/Sirupsen/logrus => github.com/sirupsen/logrus v1.9.3
|
||||
github.com/go-logr/logr => github.com/go-logr/logr v0.4.0
|
||||
|
||||
k8s.io/api => k8s.io/api v0.22.2
|
||||
k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.22.2
|
||||
k8s.io/apimachinery => k8s.io/apimachinery v0.22.2
|
||||
k8s.io/cli-runtime => k8s.io/cli-runtime v0.22.2
|
||||
k8s.io/client-go => k8s.io/client-go v0.22.2
|
||||
k8s.io/code-generator => k8s.io/code-generator v0.22.2
|
||||
k8s.io/component-base => k8s.io/component-base v0.22.2
|
||||
k8s.io/component-helpers => k8s.io/component-helpers v0.22.2
|
||||
k8s.io/klog/v2 => k8s.io/klog/v2 v2.10.0
|
||||
k8s.io/kube-openapi => k8s.io/kube-openapi v0.0.0-20210421082810-95288971da7e
|
||||
k8s.io/kubectl => k8s.io/kubectl v0.22.2
|
||||
k8s.io/metrics => k8s.io/metrics v0.22.2
|
||||
|
||||
k8s.io/utils => k8s.io/utils v0.0.0-20220728103510-ee6ede2d64ed // indirect
|
||||
sigs.k8s.io/kustomize/api => sigs.k8s.io/kustomize/api v0.8.11 // indirect
|
||||
sigs.k8s.io/kustomize/kyaml => sigs.k8s.io/kustomize/kyaml v0.11.0 // indirect
|
||||
)
|
||||
|
||||
// for pkg/cmd/hgctl/docker/compose.go
|
||||
// TODO(WeixinX): Wait for the dependency library to upgrade, such as github.com/go-logr/logr from v0.4.0 to v1.2+
|
||||
// replace (
|
||||
// github.com/compose-spec/compose-go => github.com/compose-spec/compose-go v1.8.2
|
||||
// github.com/cucumber/godog => github.com/laurazard/godog v0.0.0-20220922095256-4c4b17abdae7
|
||||
// github.com/docker/buildx => github.com/docker/buildx v0.9.1
|
||||
// github.com/docker/cli => github.com/docker/cli v20.10.3-0.20221013132413-1d6c6e2367e2+incompatible
|
||||
// github.com/docker/compose/v2 => github.com/docker/compose/v2 v2.15.1
|
||||
// github.com/docker/docker => github.com/moby/moby v20.10.3-0.20221021173910-5aac513617f0+incompatible
|
||||
// github.com/moby/buildkit => github.com/moby/buildkit v0.10.1-0.20220816171719-55ba9d14360a
|
||||
// )
|
||||
|
||||
replace (
|
||||
github.com/compose-spec/compose-go => github.com/compose-spec/compose-go v1.0.8
|
||||
github.com/docker/buildx => github.com/docker/buildx v0.5.2-0.20210422185057-908a856079fc
|
||||
github.com/docker/cli => github.com/docker/cli v20.10.7+incompatible
|
||||
github.com/docker/compose/v2 => github.com/docker/compose/v2 v2.2.0
|
||||
github.com/docker/docker => github.com/docker/docker v20.10.3+incompatible
|
||||
github.com/jaguilar/vt100 => github.com/tonistiigi/vt100 v0.0.0-20190402012908-ad4c4a574305
|
||||
github.com/moby/buildkit => github.com/moby/buildkit v0.8.2-0.20210401015549-df49b648c8bf
|
||||
github.com/tonistiigi/fsutil => github.com/tonistiigi/fsutil v0.0.0-20201103201449-0834f99b7b85
|
||||
sigs.k8s.io/gateway-api => github.com/johnlanni/gateway-api v0.0.0-20231031082632-72137664e7c7
|
||||
)
|
||||
|
||||
1
helm/core/.helmignore
Normal file
1
helm/core/.helmignore
Normal file
@@ -0,0 +1 @@
|
||||
crds/customresourcedefinitions.gen_lt1.16.yaml
|
||||
@@ -1,5 +1,5 @@
|
||||
apiVersion: v2
|
||||
appVersion: 1.0.0-rc
|
||||
appVersion: 1.3.5
|
||||
description: Helm chart for deploying higress gateways
|
||||
icon: https://higress.io/img/higress_logo_small.png
|
||||
home: http://higress.io/
|
||||
@@ -10,4 +10,4 @@ name: higress-core
|
||||
sources:
|
||||
- http://github.com/alibaba/higress
|
||||
type: application
|
||||
version: 1.0.0-rc
|
||||
version: 1.3.5
|
||||
|
||||
@@ -104,6 +104,93 @@ spec:
|
||||
subresources:
|
||||
status: {}
|
||||
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
"helm.sh/resource-policy": keep
|
||||
name: http2rpcs.networking.higress.io
|
||||
spec:
|
||||
group: networking.higress.io
|
||||
names:
|
||||
categories:
|
||||
- higress-io
|
||||
kind: Http2Rpc
|
||||
listKind: Http2RpcList
|
||||
plural: http2rpcs
|
||||
singular: http2rpc
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- name: v1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
properties:
|
||||
spec:
|
||||
oneOf:
|
||||
- not:
|
||||
anyOf:
|
||||
- required:
|
||||
- dubbo
|
||||
- required:
|
||||
- grpc
|
||||
- required:
|
||||
- dubbo
|
||||
- required:
|
||||
- grpc
|
||||
properties:
|
||||
dubbo:
|
||||
properties:
|
||||
group:
|
||||
type: string
|
||||
methods:
|
||||
items:
|
||||
properties:
|
||||
headersAttach:
|
||||
type: string
|
||||
httpMethods:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
httpPath:
|
||||
type: string
|
||||
paramFromEntireBody:
|
||||
properties:
|
||||
paramType:
|
||||
type: string
|
||||
type: object
|
||||
params:
|
||||
items:
|
||||
properties:
|
||||
paramKey:
|
||||
type: string
|
||||
paramSource:
|
||||
type: string
|
||||
paramType:
|
||||
type: string
|
||||
type: object
|
||||
type: array
|
||||
serviceMethod:
|
||||
type: string
|
||||
type: object
|
||||
type: array
|
||||
service:
|
||||
type: string
|
||||
version:
|
||||
type: string
|
||||
type: object
|
||||
grpc:
|
||||
type: object
|
||||
type: object
|
||||
status:
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources:
|
||||
status: {}
|
||||
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
@@ -131,8 +218,17 @@ spec:
|
||||
registries:
|
||||
items:
|
||||
properties:
|
||||
authSecretName:
|
||||
type: string
|
||||
consulDatacenter:
|
||||
type: string
|
||||
consulNamespace:
|
||||
type: string
|
||||
consulRefreshInterval:
|
||||
format: int64
|
||||
type: integer
|
||||
consulServiceTag:
|
||||
type: string
|
||||
domain:
|
||||
type: string
|
||||
nacosAccessKey:
|
||||
|
||||
176
helm/core/crds/customresourcedefinitions.gen_lt1.16.yaml
Normal file
176
helm/core/crds/customresourcedefinitions.gen_lt1.16.yaml
Normal file
@@ -0,0 +1,176 @@
|
||||
# DO NOT EDIT - Generated by Cue OpenAPI generator based on Istio APIs.
|
||||
apiVersion: apiextensions.k8s.io/v1beta1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
"helm.sh/resource-policy": keep
|
||||
name: wasmplugins.extensions.higress.io
|
||||
spec:
|
||||
group: extensions.higress.io
|
||||
names:
|
||||
categories:
|
||||
- higress-io
|
||||
- extensions-higress-io
|
||||
kind: WasmPlugin
|
||||
listKind: WasmPluginList
|
||||
plural: wasmplugins
|
||||
singular: wasmplugin
|
||||
scope: Namespaced
|
||||
additionalPrinterColumns:
|
||||
- description: 'CreationTimestamp is a timestamp representing the server time
|
||||
when this object was created. It is not guaranteed to be set in happens-before
|
||||
order across separate operations. Clients may not set this value. It is represented
|
||||
in RFC3339 form and is in UTC. Populated by the system. Read-only. Null for
|
||||
lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata'
|
||||
JSONPath: .metadata.creationTimestamp
|
||||
name: Age
|
||||
type: date
|
||||
versions:
|
||||
- name: v1alpha1
|
||||
served: true
|
||||
storage: true
|
||||
version: v1alpha1
|
||||
validation:
|
||||
openAPIV3Schema:
|
||||
properties:
|
||||
spec:
|
||||
properties:
|
||||
defaultConfig:
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
defaultConfigDisable:
|
||||
type: boolean
|
||||
imagePullPolicy:
|
||||
description: The pull behaviour to be applied when fetching an OCI
|
||||
image.
|
||||
enum:
|
||||
- UNSPECIFIED_POLICY
|
||||
- IfNotPresent
|
||||
- Always
|
||||
type: string
|
||||
imagePullSecret:
|
||||
description: Credentials to use for OCI image pulling.
|
||||
type: string
|
||||
matchRules:
|
||||
items:
|
||||
properties:
|
||||
config:
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
configDisable:
|
||||
type: boolean
|
||||
domain:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
ingress:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
type: object
|
||||
type: array
|
||||
phase:
|
||||
description: Determines where in the filter chain this `WasmPlugin`
|
||||
is to be injected.
|
||||
enum:
|
||||
- UNSPECIFIED_PHASE
|
||||
- AUTHN
|
||||
- AUTHZ
|
||||
- STATS
|
||||
type: string
|
||||
pluginConfig:
|
||||
description: The configuration that will be passed on to the plugin.
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
pluginName:
|
||||
type: string
|
||||
priority:
|
||||
description: Determines ordering of `WasmPlugins` in the same `phase`.
|
||||
nullable: true
|
||||
type: integer
|
||||
sha256:
|
||||
description: SHA256 checksum that will be used to verify Wasm module
|
||||
or OCI container.
|
||||
type: string
|
||||
url:
|
||||
description: URL of a Wasm module or OCI container.
|
||||
type: string
|
||||
verificationKey:
|
||||
type: string
|
||||
type: object
|
||||
status:
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
type: object
|
||||
subresources:
|
||||
status: {}
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1beta1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
"helm.sh/resource-policy": keep
|
||||
name: mcpbridges.networking.higress.io
|
||||
spec:
|
||||
group: networking.higress.io
|
||||
names:
|
||||
categories:
|
||||
- higress-io
|
||||
kind: McpBridge
|
||||
listKind: McpBridgeList
|
||||
plural: mcpbridges
|
||||
singular: mcpbridge
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- name: v1
|
||||
served: true
|
||||
storage: true
|
||||
version: v1
|
||||
validation:
|
||||
openAPIV3Schema:
|
||||
properties:
|
||||
spec:
|
||||
properties:
|
||||
registries:
|
||||
items:
|
||||
properties:
|
||||
consulNamespace:
|
||||
type: string
|
||||
domain:
|
||||
type: string
|
||||
nacosAccessKey:
|
||||
type: string
|
||||
nacosAddressServer:
|
||||
type: string
|
||||
nacosGroups:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
nacosNamespace:
|
||||
type: string
|
||||
nacosNamespaceId:
|
||||
type: string
|
||||
nacosRefreshInterval:
|
||||
format: int64
|
||||
type: integer
|
||||
nacosSecretKey:
|
||||
type: string
|
||||
name:
|
||||
type: string
|
||||
port:
|
||||
type: integer
|
||||
type:
|
||||
type: string
|
||||
zkServicesPath:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
type: object
|
||||
type: array
|
||||
type: object
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
type: object
|
||||
subresources:
|
||||
status: {}
|
||||
---
|
||||
@@ -95,3 +95,9 @@ higress: {{ include "controller.name" . }}
|
||||
{{- print "first-party-jwt" }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "skywalking.enabled" -}}
|
||||
{{- if and .Values.skywalking.enabled .Values.skywalking.service.address }}
|
||||
true
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
configSources:
|
||||
- address: "xds://127.0.0.1:15051"
|
||||
{{- if .Values.global.enableIstioAPI }}
|
||||
{{- if or .Values.global.enableIstioAPI .Values.global.enableGatewayAPI }}
|
||||
- address: "k8s://"
|
||||
{{- end }}
|
||||
|
||||
@@ -122,7 +122,7 @@ data:
|
||||
{{- include "mesh" . }}
|
||||
{{- end }}
|
||||
---
|
||||
{{- if .Values.enableSkywalking }}
|
||||
{{- if include "skywalking.enabled" . }}
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
@@ -154,7 +154,6 @@ data:
|
||||
"type": "LOGICAL_DNS",
|
||||
"connect_timeout": "5s",
|
||||
"http2_protocol_options": {
|
||||
|
||||
},
|
||||
"dns_lookup_family": "V4_ONLY",
|
||||
"lb_policy": "ROUND_ROBIN",
|
||||
@@ -167,8 +166,8 @@ data:
|
||||
"endpoint": {
|
||||
"address": {
|
||||
"socket_address": {
|
||||
"address": "{{ .Values.Skywalking.address }}",
|
||||
"port_value": "{{ .Values.Skywalking.port }}"
|
||||
"address": "{{ .Values.skywalking.service.address }}",
|
||||
"port_value": "{{ .Values.skywalking.service.port }}"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,6 +46,10 @@ rules:
|
||||
resources: ["wasmplugins"]
|
||||
verbs: ["get", "list", "watch"]
|
||||
|
||||
- apiGroups: ["networking.higress.io"]
|
||||
resources: ["http2rpcs"]
|
||||
verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]
|
||||
|
||||
- apiGroups: [""]
|
||||
resources: ["services"]
|
||||
verbs: ["get", "watch", "list", "update", "patch", "create", "delete"]
|
||||
@@ -113,3 +117,10 @@ rules:
|
||||
- apiGroups: ["config.istio.io", "security.istio.io", "networking.istio.io", "authentication.istio.io", "rbac.istio.io", "telemetry.istio.io", "extensions.istio.io"]
|
||||
verbs: ["get", "watch", "list"]
|
||||
resources: ["*"]
|
||||
# knative KIngress configuration
|
||||
- apiGroups: ["networking.internal.knative.dev"]
|
||||
verbs: ["get","list","watch"]
|
||||
resources: ["ingresses"]
|
||||
- apiGroups: ["networking.internal.knative.dev"]
|
||||
resources: ["ingresses/status"]
|
||||
verbs: ["get","patch","update"]
|
||||
@@ -2,6 +2,7 @@ apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ include "controller.name" . }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels:
|
||||
{{- include "controller.labels" . | nindent 4 }}
|
||||
spec:
|
||||
@@ -30,11 +31,7 @@ spec:
|
||||
containers:
|
||||
{{- if not .Values.global.enableHigressIstio }}
|
||||
- name: discovery
|
||||
{{- if contains "/" .Values.pilot.image }}
|
||||
image: "{{ .Values.pilot.image }}"
|
||||
{{- else }}
|
||||
image: "{{ .Values.pilot.hub | default .Values.global.hub }}/{{ .Values.pilot.image | default "pilot" }}:{{ .Values.pilot.tag | default .Values.global.tag }}"
|
||||
{{- end }}
|
||||
image: "{{ .Values.pilot.hub | default .Values.global.hub }}/{{ .Values.pilot.image | default "pilot" }}:{{ .Values.pilot.tag | default .Chart.AppVersion }}"
|
||||
{{- if .Values.global.imagePullPolicy }}
|
||||
imagePullPolicy: {{ .Values.global.imagePullPolicy }}
|
||||
{{- end }}
|
||||
@@ -73,6 +70,18 @@ spec:
|
||||
periodSeconds: 3
|
||||
timeoutSeconds: 5
|
||||
env:
|
||||
- name: DEFAULT_UPSTREAM_CONCURRENCY_THRESHOLD
|
||||
value: "{{ .Values.global.defaultUpstreamConcurrencyThreshold }}"
|
||||
- name: ISTIO_GPRC_MAXRECVMSGSIZE
|
||||
value: "{{ .Values.global.xdsMaxRecvMsgSize }}"
|
||||
- name: ENBALE_SCOPED_RDS
|
||||
value: "{{ .Values.global.enableSRDS }}"
|
||||
- name: ON_DEMAND_RDS
|
||||
value: "{{ .Values.global.onDemandRDS }}"
|
||||
- name: HOST_RDS_MERGE_SUBSET
|
||||
value: "{{ .Values.global.hostRDSMergeSubset }}"
|
||||
- name: PILOT_FILTER_GATEWAY_CLUSTER_CONFIG
|
||||
value: "{{ .Values.global.onlyPushRouteCluster }}"
|
||||
- name: HIGRESS_CONTROLLER_SVC
|
||||
value: "127.0.0.1"
|
||||
- name: HIGRESS_CONTROLLER_PORT
|
||||
@@ -100,6 +109,10 @@ spec:
|
||||
fieldPath: spec.serviceAccountName
|
||||
- name: KUBECONFIG
|
||||
value: /var/run/secrets/remote/config
|
||||
- name: PRIORITIZED_LEADER_ELECTION
|
||||
value: "false"
|
||||
- name: INJECT_ENABLED
|
||||
value: "false"
|
||||
{{- if .Values.pilot.env }}
|
||||
{{- range $key, $val := .Values.pilot.env }}
|
||||
- name: {{ $key }}
|
||||
@@ -120,10 +133,19 @@ spec:
|
||||
value: "{{ .Values.global.istiod.enableAnalysis }}"
|
||||
- name: CLUSTER_ID
|
||||
value: "{{ $.Values.global.multiCluster.clusterName | default `Kubernetes` }}"
|
||||
# HIGRESS_ENABLE_ISTIO_API is only used to restart the controller pod after the config change
|
||||
{{- if .Values.global.enableIstioAPI }}
|
||||
- name: HIGRESS_ENABLE_ISTIO_API
|
||||
value: "true"
|
||||
{{- end }}
|
||||
{{- if .Values.global.enableGatewayAPI }}
|
||||
- name: PILOT_ENABLE_GATEWAY_API
|
||||
value: "true"
|
||||
- name: PILOT_ENABLE_GATEWAY_API_STATUS
|
||||
value: "true"
|
||||
- name: PILOT_ENABLE_GATEWAY_API_DEPLOYMENT_CONTROLLER
|
||||
value: "false"
|
||||
{{- end }}
|
||||
{{- if not .Values.global.enableHigressIstio }}
|
||||
- name: CUSTOM_CA_CERT_NAME
|
||||
value: "higress-ca-root-cert"
|
||||
@@ -168,11 +190,13 @@ spec:
|
||||
- name: {{ .Chart.Name }}
|
||||
securityContext:
|
||||
{{- toYaml .Values.controller.securityContext | nindent 12 }}
|
||||
image: "{{ .Values.hub }}/{{ .Values.controller.image }}:{{ .Values.controller.tag | default .Chart.AppVersion }}"
|
||||
image: "{{ .Values.controller.hub | default .Values.global.hub }}/{{ .Values.controller.image | default "higress" }}:{{ .Values.controller.tag | default .Chart.AppVersion }}"
|
||||
args:
|
||||
- "serve"
|
||||
- --gatewaySelectorKey=higress
|
||||
- --gatewaySelectorValue={{ .Release.Namespace }}-{{ include "gateway.name" . }}
|
||||
- --gatewayHttpPort={{ .Values.gateway.httpPort }}
|
||||
- --gatewayHttpsPort={{ .Values.gateway.httpsPort }}
|
||||
{{- if not .Values.global.enableStatus }}
|
||||
- --enableStatus={{ .Values.global.enableStatus }}
|
||||
{{- end }}
|
||||
@@ -196,6 +220,8 @@ spec:
|
||||
fieldRef:
|
||||
apiVersion: v1
|
||||
fieldPath: spec.serviceAccountName
|
||||
- name: DOMAIN_SUFFIX
|
||||
value: {{ .Values.global.proxy.clusterDomain }}
|
||||
{{- if .Values.controller.env }}
|
||||
{{- range $key, $val := .Values.controller.env }}
|
||||
- name: {{ $key }}
|
||||
|
||||
@@ -2,6 +2,7 @@ apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ include "controller.name" . }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels:
|
||||
{{- include "controller.labels" . | nindent 4 }}
|
||||
spec:
|
||||
|
||||
@@ -68,7 +68,7 @@ spec:
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: higress-gateway
|
||||
image: "{{ .Values.hub }}/{{ .Values.gateway.image }}:{{ .Values.gateway.tag | default .Chart.AppVersion }}"
|
||||
image: "{{ .Values.gateway.hub | default .Values.global.hub }}/{{ .Values.gateway.image | default "gateway" }}:{{ .Values.gateway.tag | default .Chart.AppVersion }}"
|
||||
args:
|
||||
- proxy
|
||||
- router
|
||||
@@ -134,6 +134,8 @@ spec:
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: spec.serviceAccountName
|
||||
- name: PILOT_XDS_SEND_TIMEOUT
|
||||
value: 60s
|
||||
- name: PROXY_XDS_VIA_AGENT
|
||||
value: "true"
|
||||
- name: ENABLE_INGRESS_GATEWAY_SDS
|
||||
@@ -146,7 +148,7 @@ spec:
|
||||
value: "{{ $.Values.clusterName | default `Kubernetes` }}"
|
||||
- name: INSTANCE_NAME
|
||||
value: "higress-gateway"
|
||||
{{- if .Values.enableSkywalking }}
|
||||
{{- if include "skywalking.enabled" . }}
|
||||
- name: ISTIO_BOOTSTRAP_OVERRIDE
|
||||
value: /etc/istio/custom-bootstrap/custom_bootstrap.json
|
||||
{{- end }}
|
||||
@@ -163,25 +165,25 @@ spec:
|
||||
protocol: TCP
|
||||
name: http-envoy-prom
|
||||
{{- if or .Values.global.local .Values.global.kind }}
|
||||
- containerPort: 80
|
||||
hostPort: 80
|
||||
- containerPort: {{ .Values.gateway.httpPort }}
|
||||
hostPort: {{ .Values.gateway.httpPort }}
|
||||
name: http
|
||||
protocol: TCP
|
||||
- containerPort: 443
|
||||
hostPort: 443
|
||||
- containerPort: {{ .Values.gateway.httpsPort }}
|
||||
hostPort: {{ .Values.gateway.httpsPort }}
|
||||
name: https
|
||||
protocol: TCP
|
||||
{{- end }}
|
||||
readinessProbe:
|
||||
failureThreshold: 30
|
||||
failureThreshold: {{ .Values.gateway.readinessFailureThreshold }}
|
||||
httpGet:
|
||||
path: /healthz/ready
|
||||
port: 15021
|
||||
scheme: HTTP
|
||||
initialDelaySeconds: 1
|
||||
periodSeconds: 2
|
||||
successThreshold: 1
|
||||
timeoutSeconds: 3
|
||||
initialDelaySeconds: {{ .Values.gateway.readinessInitialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.gateway.readinessPeriodSeconds }}
|
||||
successThreshold: {{ .Values.gateway.readinessSuccessThreshold }}
|
||||
timeoutSeconds: {{ .Values.gateway.readinessTimeoutSeconds }}
|
||||
{{- if not (or .Values.global.local .Values.global.kind) }}
|
||||
resources:
|
||||
{{- toYaml .Values.gateway.resources | nindent 12 }}
|
||||
@@ -202,10 +204,14 @@ spec:
|
||||
mountPath: /etc/istio/pod
|
||||
- name: proxy-socket
|
||||
mountPath: /etc/istio/proxy
|
||||
{{- if .Values.enableSkywalking }}
|
||||
{{- if include "skywalking.enabled" . }}
|
||||
- mountPath: /etc/istio/custom-bootstrap
|
||||
name: custom-bootstrap-volume
|
||||
{{- end }}
|
||||
{{- if .Values.global.volumeWasmPlugins }}
|
||||
- mountPath: /opt/plugins
|
||||
name: local-wasmplugins-volume
|
||||
{{- end }}
|
||||
{{- if .Values.gateway.hostNetwork }}
|
||||
hostNetwork: {{ .Values.gateway.hostNetwork }}
|
||||
dnsPolicy: ClusterFirstWithHostNet
|
||||
@@ -242,7 +248,7 @@ spec:
|
||||
- name: config
|
||||
configMap:
|
||||
name: higress-config
|
||||
{{- if .Values.enableSkywalking }}
|
||||
{{- if include "skywalking.enabled" . }}
|
||||
- configMap:
|
||||
defaultMode: 420
|
||||
name: higress-custom-bootstrap
|
||||
@@ -274,3 +280,9 @@ spec:
|
||||
containerName: higress-gateway
|
||||
divisor: 1m
|
||||
resource: limits.cpu
|
||||
{{- if .Values.global.volumeWasmPlugins }}
|
||||
- name: local-wasmplugins-volume
|
||||
hostPath:
|
||||
path: /opt/plugins
|
||||
type: Directory
|
||||
{{- end }}
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
revision: ""
|
||||
global:
|
||||
xdsMaxRecvMsgSize: 104857600
|
||||
defaultUpstreamConcurrencyThreshold: 10000
|
||||
enableSRDS: true
|
||||
onDemandRDS: false
|
||||
hostRDSMergeSubset: false
|
||||
onlyPushRouteCluster: true
|
||||
# IngressClass filters which ingress resources the higress controller watches.
|
||||
# The default ingress class is higress.
|
||||
# There are some special cases for special ingress class.
|
||||
@@ -9,7 +15,7 @@ global:
|
||||
# resources in the k8s cluster.
|
||||
ingressClass: "higress"
|
||||
watchNamespace: ""
|
||||
disableAlpnH2: true
|
||||
disableAlpnH2: false
|
||||
enableStatus: true
|
||||
# whether to use autoscaling/v2 template for HPA settings
|
||||
# for internal usage only, not to be configured by users.
|
||||
@@ -17,6 +23,7 @@ global:
|
||||
local: false # When deploying to a local cluster (e.g.: kind cluster), set this to true.
|
||||
kind: false # Deprecated. Please use "global.local" instead. Will be removed later.
|
||||
enableIstioAPI: false
|
||||
enableGatewayAPI: false
|
||||
# Deprecated
|
||||
enableHigressIstio: false
|
||||
# Used to locate istiod.
|
||||
@@ -44,8 +51,6 @@ global:
|
||||
# Releases are published to docker hub under 'istio' project.
|
||||
# Dev builds from prow are on gcr.io
|
||||
hub: higress-registry.cn-hangzhou.cr.aliyuncs.com/higress
|
||||
# Default tag for Istio images.
|
||||
tag: 1.0.0-rc
|
||||
|
||||
# Specify image pull policy if default behavior isn't desired.
|
||||
# Default behavior: latest images will be Always else IfNotPresent.
|
||||
@@ -148,12 +153,18 @@ global:
|
||||
# The number of successive failed probes before indicating readiness failure.
|
||||
readinessFailureThreshold: 30
|
||||
|
||||
# The number of successive successed probes before indicating readiness success.
|
||||
readinessSuccessThreshold: 30
|
||||
|
||||
# The initial delay for readiness probes in seconds.
|
||||
readinessInitialDelaySeconds: 1
|
||||
|
||||
# The period between readiness probes.
|
||||
readinessPeriodSeconds: 2
|
||||
|
||||
# The readiness timeout seconds
|
||||
readinessTimeoutSeconds: 3
|
||||
|
||||
# Resources for the sidecar.
|
||||
resources:
|
||||
requests:
|
||||
@@ -369,7 +380,24 @@ gateway:
|
||||
name: "higress-gateway"
|
||||
replicas: 2
|
||||
image: gateway
|
||||
tag: "1.0.0-rc"
|
||||
|
||||
# The number of successive failed probes before indicating readiness failure.
|
||||
readinessFailureThreshold: 30
|
||||
|
||||
# The number of successive successed probes before indicating readiness success.
|
||||
readinessSuccessThreshold: 1
|
||||
|
||||
# The initial delay for readiness probes in seconds.
|
||||
readinessInitialDelaySeconds: 1
|
||||
|
||||
# The period between readiness probes.
|
||||
readinessPeriodSeconds: 2
|
||||
|
||||
# The readiness timeout seconds
|
||||
readinessTimeoutSeconds: 3
|
||||
|
||||
hub: higress-registry.cn-hangzhou.cr.aliyuncs.com/higress
|
||||
tag: ""
|
||||
# revision declares which revision this gateway is a part of
|
||||
revision: ""
|
||||
|
||||
@@ -389,7 +417,8 @@ gateway:
|
||||
|
||||
# Pod environment variables
|
||||
env: {}
|
||||
|
||||
httpPort: 80
|
||||
httpsPort: 443
|
||||
hostNetwork: false
|
||||
|
||||
# Labels to apply to all resources
|
||||
@@ -457,7 +486,9 @@ controller:
|
||||
name: "higress-controller"
|
||||
replicas: 1
|
||||
image: higress
|
||||
tag: "1.0.0-rc"
|
||||
|
||||
hub: higress-registry.cn-hangzhou.cr.aliyuncs.com/higress
|
||||
tag: ""
|
||||
env: {}
|
||||
|
||||
labels: {}
|
||||
@@ -547,7 +578,7 @@ pilot:
|
||||
rollingMaxUnavailable: 25%
|
||||
|
||||
hub: higress-registry.cn-hangzhou.cr.aliyuncs.com/higress
|
||||
tag: 1.0.0-rc
|
||||
tag: ""
|
||||
|
||||
# Can be a full hub/image:tag
|
||||
image: pilot
|
||||
@@ -560,7 +591,7 @@ pilot:
|
||||
memory: 2048Mi
|
||||
|
||||
env:
|
||||
PILOT_SCOPE_GATEWAY_TO_NAMESPACE: "true"
|
||||
PILOT_SCOPE_GATEWAY_TO_NAMESPACE: "false"
|
||||
PILOT_ENABLE_METADATA_EXCHANGE: "false"
|
||||
PILOT_ENABLE_CROSS_CLUSTER_WORKLOAD_ENTRY: "false"
|
||||
VALIDATION_ENABLED: "false"
|
||||
@@ -583,7 +614,7 @@ pilot:
|
||||
jwksResolverExtraRootCA: ""
|
||||
|
||||
# This is used to set the source of configuration for
|
||||
# the associated address in configSource, if nothing is specificed
|
||||
# the associated address in configSource, if nothing is specified
|
||||
# the default MCP is assumed.
|
||||
configSource:
|
||||
subscribedResources: []
|
||||
@@ -610,7 +641,8 @@ pilot:
|
||||
|
||||
|
||||
# Skywalking config settings
|
||||
enableSkywalking: false
|
||||
Skywalking:
|
||||
address: "skywalking-oap.higress-system.svc"
|
||||
port: 11800
|
||||
skywalking:
|
||||
enabled: false
|
||||
service:
|
||||
address: ~
|
||||
port: 11800
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
dependencies:
|
||||
- name: higress-core
|
||||
repository: file://../core
|
||||
version: 1.0.0-rc
|
||||
version: 1.3.5
|
||||
- name: higress-console
|
||||
repository: https://higress.io/helm-charts/
|
||||
version: 1.0.0-rc.2
|
||||
digest: sha256:6cd5c09946a6d365b03fe9bd5e8cf266bc8bdc94017fae8703920a2cb700e4f7
|
||||
generated: "2023-05-09T17:16:27.7257491+08:00"
|
||||
version: 1.3.3
|
||||
digest: sha256:ce2dba66d3b961eceb2de8bde4f271b06ae9bf677bda2c3bb621c51d29b76c71
|
||||
generated: "2024-03-04T19:04:15.731018+08:00"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
apiVersion: v2
|
||||
appVersion: 1.0.0-rc.2
|
||||
appVersion: 1.3.5
|
||||
description: Helm chart for deploying Higress gateways
|
||||
icon: https://higress.io/img/higress_logo_small.png
|
||||
home: http://higress.io/
|
||||
@@ -12,9 +12,9 @@ sources:
|
||||
dependencies:
|
||||
- name: higress-core
|
||||
repository: "file://../core"
|
||||
version: 1.0.0-rc
|
||||
version: 1.3.5
|
||||
- name: higress-console
|
||||
repository: "https://higress.io/helm-charts/"
|
||||
version: 1.0.0-rc.2
|
||||
version: 1.3.3
|
||||
type: application
|
||||
version: 1.0.0-rc.2
|
||||
version: 1.3.5
|
||||
|
||||
@@ -40,6 +40,7 @@ The command removes all the Kubernetes components associated with the chart and
|
||||
| global.disableAlpnH2 | Whether to disable HTTP/2 in ALPN | true |
|
||||
| global.enableStatus | If `true`, Higress Controller will update the `status` field of Ingress resources.<br />When migrating from Nginx Ingress, in order to avoid `status` field of Ingress objects being overwritten, this parameter needs to be set to false, so Higress won't write the entry IP to the `status` field of the corresponding Ingress object. | true |
|
||||
| global.enableIstioAPI | If `true`, Higress Controller will monitor istio resources as well | false |
|
||||
| global.enableGatewayAPI | If `true`, Higress Controller will monitor Gateway API resources as well | false |
|
||||
| global.istioNamespace | The namespace istio is installed to | istio-system |
|
||||
| **Core Paramters** | | |
|
||||
| higress-core.gateway.replicas | Number of Higress Gateway pods | 2 |
|
||||
|
||||
@@ -140,7 +140,7 @@ index 25479439b7..bd34442260 100755
|
||||
|
||||
# This script builds and version stamps the output
|
||||
|
||||
+export GOPROXY="https://proxy.golang.com.cn,direct"
|
||||
+export GOPROXY=${GOPROXY:-"https://proxy.golang.com.cn,direct"}
|
||||
+
|
||||
VERBOSE=${VERBOSE:-"0"}
|
||||
V=""
|
||||
@@ -215,10 +215,11 @@ index 271fe77a2d..c9e625efdc 100755
|
||||
--init \
|
||||
--sig-proxy=true \
|
||||
${DOCKER_SOCKET_MOUNT:--v /var/run/docker.sock:/var/run/docker.sock} \
|
||||
@@ -55,7 +59,15 @@ read -ra DOCKER_RUN_OPTIONS <<< "${DOCKER_RUN_OPTIONS:-}"
|
||||
@@ -55,7 +59,16 @@ read -ra DOCKER_RUN_OPTIONS <<< "${DOCKER_RUN_OPTIONS:-}"
|
||||
--env-file <(env | grep -v ${ENV_BLOCKLIST}) \
|
||||
-e IN_BUILD_CONTAINER=1 \
|
||||
-e TZ="${TIMEZONE:-$TZ}" \
|
||||
+ -e GOPROXY="${GOPROXY}" \
|
||||
+ -e HUB="${HUB}" \
|
||||
+ -e ENVOY_TAR_PATH="${ENVOY_TAR_PATH}" \
|
||||
+ --mount "type=bind,source=${MOUNT_PACKAGE_SOURCE},destination=/home/package" \
|
||||
|
||||
30
istio/1.12/patches/istio/20230618-debug-api-anonymous.patch
Normal file
30
istio/1.12/patches/istio/20230618-debug-api-anonymous.patch
Normal file
@@ -0,0 +1,30 @@
|
||||
diff --color -Naur istio/pilot/pkg/features/pilot.go istio_new/pilot/pkg/features/pilot.go
|
||||
--- istio/pilot/pkg/features/pilot.go 2023-06-18 20:13:57.715044832 +0800
|
||||
+++ istio_new/pilot/pkg/features/pilot.go 2023-06-18 20:11:40.310406690 +0800
|
||||
@@ -359,6 +359,9 @@
|
||||
EnableUnsafeAdminEndpoints = env.RegisterBoolVar("UNSAFE_ENABLE_ADMIN_ENDPOINTS", false,
|
||||
"If this is set to true, dangerous admin endpoints will be exposed on the debug interface. Not recommended for production.").Get()
|
||||
|
||||
+ DebugAuth = env.RegisterBoolVar("DEBUG_AUTH", true,
|
||||
+ "If this is set to false, the debug interface will allow all anonymous request from any remote host, which is not recommended for production").Get()
|
||||
+
|
||||
XDSAuth = env.RegisterBoolVar("XDS_AUTH", true,
|
||||
"If true, will authenticate XDS clients.").Get()
|
||||
|
||||
diff --color -Naur istio/pilot/pkg/xds/debug.go istio_new/pilot/pkg/xds/debug.go
|
||||
--- istio/pilot/pkg/xds/debug.go 2023-06-18 20:13:57.695044739 +0800
|
||||
+++ istio_new/pilot/pkg/xds/debug.go 2023-06-18 20:11:40.286406579 +0800
|
||||
@@ -218,8 +218,12 @@
|
||||
if internalMux != nil {
|
||||
internalMux.HandleFunc(path, handler)
|
||||
}
|
||||
+ handlerFunc := http.HandlerFunc(handler)
|
||||
+ if features.DebugAuth {
|
||||
+ handlerFunc = s.allowAuthenticatedOrLocalhost(handlerFunc)
|
||||
+ }
|
||||
// Add handler with auth; this is expose on an HTTP server
|
||||
- mux.HandleFunc(path, s.allowAuthenticatedOrLocalhost(http.HandlerFunc(handler)))
|
||||
+ mux.HandleFunc(path, handlerFunc)
|
||||
}
|
||||
|
||||
func (s *DiscoveryServer) allowAuthenticatedOrLocalhost(next http.Handler) http.HandlerFunc {
|
||||
15
istio/1.12/patches/istio/20230627-debug-fix-configz.patch
Normal file
15
istio/1.12/patches/istio/20230627-debug-fix-configz.patch
Normal file
@@ -0,0 +1,15 @@
|
||||
diff -Naur istio/pilot/pkg/xds/debug.go istio-new/pilot/pkg/xds/debug.go
|
||||
--- istio/pilot/pkg/xds/debug.go 2023-06-27 14:08:00.000000000 +0800
|
||||
+++ istio-new/pilot/pkg/xds/debug.go 2023-06-27 14:07:04.000000000 +0800
|
||||
@@ -469,6 +469,11 @@
|
||||
s.Env.IstioConfigStore.Schemas().ForEach(func(schema collection.Schema) bool {
|
||||
cfg, _ := s.Env.IstioConfigStore.List(schema.Resource().GroupVersionKind(), "")
|
||||
// Added by ingress
|
||||
+ copied := make([]config.Config, len(cfg))
|
||||
+ for i := range copied {
|
||||
+ copied[i] = cfg[i].DeepCopy()
|
||||
+ }
|
||||
+ cfg = copied
|
||||
switch schema.Resource().GroupVersionKind().String() {
|
||||
case gvk.Gateway.String():
|
||||
cfg = model.GatewayFilter(cfg)
|
||||
124
istio/1.12/patches/istio/20230815-multi-arch.patch
Normal file
124
istio/1.12/patches/istio/20230815-multi-arch.patch
Normal file
@@ -0,0 +1,124 @@
|
||||
diff -Naur istio/bin/init.sh istio-new/bin/init.sh
|
||||
--- istio/bin/init.sh 2023-08-15 21:01:53.601636573 +0800
|
||||
+++ istio-new/bin/init.sh 2023-08-15 21:04:56.144783484 +0800
|
||||
@@ -151,7 +151,8 @@
|
||||
# download_envoy_if_necessary "${ISTIO_ENVOY_LINUX_RELEASE_URL}" "$ISTIO_ENVOY_LINUX_RELEASE_PATH" "${SIDECAR}"
|
||||
# download_envoy_if_necessary "${ISTIO_ENVOY_CENTOS_RELEASE_URL}" "$ISTIO_ENVOY_CENTOS_LINUX_RELEASE_PATH" "${SIDECAR}-centos"
|
||||
|
||||
-untar_envoy_if_necessary "${ENVOY_TAR_PATH}" "$ISTIO_ENVOY_LINUX_RELEASE_PATH" "${SIDECAR}"
|
||||
+untar_envoy_if_necessary "${ENVOY_TAR_DIR}/envoy-arm64.tar.gz" "$ISTIO_ENVOY_LINUX_ARM64_RELEASE_PATH" "${SIDECAR}"
|
||||
+untar_envoy_if_necessary "${ENVOY_TAR_DIR}/envoy-amd64.tar.gz" "$ISTIO_ENVOY_LINUX_AMD64_RELEASE_PATH" "${SIDECAR}"
|
||||
|
||||
if [[ "$GOOS_LOCAL" == "darwin" ]]; then
|
||||
# Download and extract the Envoy macOS release binary
|
||||
diff -Naur istio/common/scripts/run.sh istio-new/common/scripts/run.sh
|
||||
--- istio/common/scripts/run.sh 2023-08-15 21:01:53.601636573 +0800
|
||||
+++ istio-new/common/scripts/run.sh 2023-08-15 17:37:57.754600731 +0800
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
HUB="${HUB:-istio}"
|
||||
MOUNT_SOURCE="${MOUNT_SOURCE:-${PWD}}"
|
||||
-ENVOY_TAR_PATH="${ENVOY_TAR_PATH:-/home/package/envoy.tar.gz}"
|
||||
+ENVOY_TAR_DIR="${ENVOY_TAR_DIR:-/home/package}"
|
||||
MOUNT_DEST="${MOUNT_DEST:-/work}"
|
||||
MOUNT_ROOT_SOURCE="${MOUNT_ROOT_SOURCE:-`cd $MOUNT_SOURCE/..;pwd`}"
|
||||
MOUNT_PACKAGE_SOURCE="${MOUNT_PACKAGE_SOURCE:-`cd $MOUNT_SOURCE/../package;pwd`}"
|
||||
@@ -61,7 +61,7 @@
|
||||
-e TZ="${TIMEZONE:-$TZ}" \
|
||||
-e GOPROXY="${GOPROXY}" \
|
||||
-e HUB="${HUB}" \
|
||||
- -e ENVOY_TAR_PATH="${ENVOY_TAR_PATH}" \
|
||||
+ -e ENVOY_TAR_DIR="${ENVOY_TAR_DIR}" \
|
||||
--mount "type=bind,source=${MOUNT_PACKAGE_SOURCE},destination=/home/package" \
|
||||
--mount "type=bind,source=${MOUNT_SOURCE},destination=/work" \
|
||||
--mount "type=bind,source=${MOUNT_ROOT_SOURCE}/..,destination=/parent" \
|
||||
diff -Naur istio/common/scripts/setup_env.sh istio-new/common/scripts/setup_env.sh
|
||||
--- istio/common/scripts/setup_env.sh 2023-08-15 21:01:53.601636573 +0800
|
||||
+++ istio-new/common/scripts/setup_env.sh 2023-08-15 20:15:23.292391629 +0800
|
||||
@@ -81,6 +81,9 @@
|
||||
export TARGET_OUT="${TARGET_OUT:-$(pwd)/out/${TARGET_OS}_${TARGET_ARCH}}"
|
||||
export TARGET_OUT_LINUX="${TARGET_OUT_LINUX:-$(pwd)/out/linux_${TARGET_ARCH}}"
|
||||
|
||||
+export ARM64_OUT_LINUX=/work/out/linux_arm64
|
||||
+export AMD64_OUT_LINUX=/work/out/linux_amd64
|
||||
+
|
||||
export CONTAINER_TARGET_OUT="${CONTAINER_TARGET_OUT:-/work/out/${TARGET_OS}_${TARGET_ARCH}}"
|
||||
export CONTAINER_TARGET_OUT_LINUX="${CONTAINER_TARGET_OUT_LINUX:-/work/out/linux_${TARGET_ARCH}}"
|
||||
|
||||
diff -Naur istio/Makefile.core.mk istio-new/Makefile.core.mk
|
||||
--- istio/Makefile.core.mk 2023-08-15 21:01:53.601636573 +0800
|
||||
+++ istio-new/Makefile.core.mk 2023-08-15 20:03:25.384280274 +0800
|
||||
@@ -150,6 +150,11 @@
|
||||
export ISTIO_ENVOY_CENTOS_LINUX_RELEASE_NAME ?= envoy-centos-${ISTIO_ENVOY_LINUX_VERSION}
|
||||
export ISTIO_ENVOY_CENTOS_LINUX_RELEASE_PATH ?= ${ISTIO_ENVOY_LINUX_RELEASE_DIR}/${ISTIO_ENVOY_CENTOS_LINUX_RELEASE_NAME}
|
||||
|
||||
+export ISTIO_ENVOY_LINUX_ARM64_RELEASE_DIR ?= ${ARM64_OUT_LINUX}/release
|
||||
+export ISTIO_ENVOY_LINUX_ARM64_RELEASE_PATH ?= ${ISTIO_ENVOY_LINUX_ARM64_RELEASE_DIR}/${ISTIO_ENVOY_LINUX_RELEASE_NAME}
|
||||
+export ISTIO_ENVOY_LINUX_AMD64_RELEASE_DIR ?= ${AMD64_OUT_LINUX}/release
|
||||
+export ISTIO_ENVOY_LINUX_AMD64_RELEASE_PATH ?= ${ISTIO_ENVOY_LINUX_AMD64_RELEASE_DIR}/${ISTIO_ENVOY_LINUX_RELEASE_NAME}
|
||||
+
|
||||
# Envoy macOS vars.
|
||||
# TODO Change url when official envoy release for macOS is available
|
||||
export ISTIO_ENVOY_MACOS_VERSION ?= 1.0.2
|
||||
@@ -240,6 +245,8 @@
|
||||
${ISTIO_ENVOY_LINUX_DEBUG_PATH}: init
|
||||
${ISTIO_ENVOY_LINUX_RELEASE_PATH}: init
|
||||
${ISTIO_ENVOY_MACOS_RELEASE_PATH}: init
|
||||
+${ISTIO_ENVOY_LINUX_ARM64_RELEASE_PATH}: init
|
||||
+${ISTIO_ENVOY_LINUX_AMD64_RELEASE_PATH}: init
|
||||
|
||||
# Pull dependencies, based on the checked in Gopkg.lock file.
|
||||
# Developers must manually run `dep ensure` if adding new deps
|
||||
@@ -312,8 +319,8 @@
|
||||
# various platform images.
|
||||
.PHONY: build-linux
|
||||
build-linux: depend
|
||||
- GOOS=linux GOARCH=$(GOARCH_LOCAL) LDFLAGS=$(RELEASE_LDFLAGS) common/scripts/gobuild.sh $(ISTIO_OUT_LINUX)/ $(STANDARD_BINARIES)
|
||||
- GOOS=linux GOARCH=$(GOARCH_LOCAL) LDFLAGS=$(RELEASE_LDFLAGS) common/scripts/gobuild.sh $(ISTIO_OUT_LINUX)/ -tags=agent $(AGENT_BINARIES)
|
||||
+ GOOS=linux GOARCH=$(GOARCH_LOCAL) LDFLAGS=$(RELEASE_LDFLAGS) GOBUILDFLAGS='-buildvcs=false' common/scripts/gobuild.sh $(ISTIO_OUT_LINUX)/ $(STANDARD_BINARIES)
|
||||
+ GOOS=linux GOARCH=$(GOARCH_LOCAL) LDFLAGS=$(RELEASE_LDFLAGS) GOBUILDFLAGS='-buildvcs=false' common/scripts/gobuild.sh $(ISTIO_OUT_LINUX)/ -tags=agent $(AGENT_BINARIES)
|
||||
|
||||
# Create targets for ISTIO_OUT_LINUX/binary
|
||||
# There are two use cases here:
|
||||
diff -Naur istio/tools/istio-docker.mk istio-new/tools/istio-docker.mk
|
||||
--- istio/tools/istio-docker.mk 2023-08-15 21:01:53.621637356 +0800
|
||||
+++ istio-new/tools/istio-docker.mk 2023-08-15 20:02:11.881402098 +0800
|
||||
@@ -77,6 +77,14 @@
|
||||
${ISTIO_ENVOY_BOOTSTRAP_CONFIG_DIR}/envoy_bootstrap.json: ${ISTIO_ENVOY_BOOTSTRAP_CONFIG_PATH}
|
||||
cp ${ISTIO_ENVOY_BOOTSTRAP_CONFIG_PATH} ${ISTIO_ENVOY_BOOTSTRAP_CONFIG_DIR}/envoy_bootstrap.json
|
||||
|
||||
+${ISTIO_ENVOY_LINUX_ARM64_RELEASE_DIR}/${SIDECAR}: ${ISTIO_ENVOY_LINUX_ARM64_RELEASE_PATH}
|
||||
+ mkdir -p $(DOCKER_BUILD_TOP)/proxyv2
|
||||
+ cp ${ISTIO_ENVOY_LINUX_ARM64_RELEASE_PATH} ${ISTIO_ENVOY_LINUX_ARM64_RELEASE_DIR}/${SIDECAR}
|
||||
+
|
||||
+${ISTIO_ENVOY_LINUX_AMD64_RELEASE_DIR}/${SIDECAR}: ${ISTIO_ENVOY_LINUX_AMD64_RELEASE_PATH}
|
||||
+ mkdir -p $(DOCKER_BUILD_TOP)/proxyv2
|
||||
+ cp ${ISTIO_ENVOY_LINUX_AMD64_RELEASE_PATH} ${ISTIO_ENVOY_LINUX_AMD64_RELEASE_DIR}/${SIDECAR}
|
||||
+
|
||||
# rule for wasm extensions.
|
||||
$(ISTIO_ENVOY_LINUX_RELEASE_DIR)/stats-filter.wasm: init
|
||||
$(ISTIO_ENVOY_LINUX_RELEASE_DIR)/stats-filter.compiled.wasm: init
|
||||
@@ -88,7 +96,8 @@
|
||||
docker.proxyv2: BUILD_ARGS=--build-arg proxy_version=istio-proxy:${PROXY_REPO_SHA} --build-arg istio_version=${VERSION} --build-arg BASE_VERSION=${BASE_VERSION} --build-arg SIDECAR=${SIDECAR} --build-arg HUB=${HUB}
|
||||
docker.proxyv2: ${ISTIO_ENVOY_BOOTSTRAP_CONFIG_DIR}/envoy_bootstrap.json
|
||||
docker.proxyv2: ${ISTIO_ENVOY_BOOTSTRAP_CONFIG_DIR}/gcp_envoy_bootstrap.json
|
||||
-docker.proxyv2: $(ISTIO_ENVOY_LINUX_RELEASE_DIR)/${SIDECAR}
|
||||
+docker.proxyv2: ${ISTIO_ENVOY_LINUX_ARM64_RELEASE_DIR}/${SIDECAR}
|
||||
+docker.proxyv2: ${ISTIO_ENVOY_LINUX_AMD64_RELEASE_DIR}/${SIDECAR}
|
||||
docker.proxyv2: $(ISTIO_OUT_LINUX)/pilot-agent
|
||||
docker.proxyv2: pilot/docker/Dockerfile.proxyv2
|
||||
# docker.proxyv2: $(ISTIO_ENVOY_LINUX_RELEASE_DIR)/stats-filter.wasm
|
||||
@@ -324,7 +333,13 @@
|
||||
# This can be done with DOCKER_BUILD_VARIANTS="default debug" as well, but at the expense of building twice vs building once and tagging twice
|
||||
INCLUDE_UNTAGGED_DEFAULT ?= false
|
||||
DEFAULT_DISTRIBUTION=debug
|
||||
+
|
||||
+
|
||||
+ifeq ($(BUILDX_PLATFORM), true)
|
||||
+DOCKER_RULE ?= $(foreach VARIANT,$(DOCKER_BUILD_VARIANTS), time (mkdir -p $(DOCKER_BUILD_TOP)/$@ && TARGET_ARCH=$(TARGET_ARCH) ./tools/docker-copy.sh $^ $(DOCKER_BUILD_TOP)/$@ && cd $(DOCKER_BUILD_TOP)/$@ $(BUILD_PRE) && docker buildx create --use && docker buildx build --no-cache --platform linux/amd64,linux/arm64 $(BUILD_ARGS) --build-arg BASE_DISTRIBUTION=$(call normalize-tag,$(VARIANT)) -t $(HUB)/$(subst docker.,,$@):$(TAG)$(call variant-tag,$(VARIANT)) -f Dockerfile$(suffix $@) . --push ); )
|
||||
+else
|
||||
DOCKER_RULE ?= $(foreach VARIANT,$(DOCKER_BUILD_VARIANTS), time (mkdir -p $(DOCKER_BUILD_TOP)/$@ && TARGET_ARCH=$(TARGET_ARCH) ./tools/docker-copy.sh $^ $(DOCKER_BUILD_TOP)/$@ && cd $(DOCKER_BUILD_TOP)/$@ $(BUILD_PRE) && docker build $(BUILD_ARGS) --build-arg BASE_DISTRIBUTION=$(call normalize-tag,$(VARIANT)) -t $(HUB)/$(subst docker.,,$@):$(TAG)$(call variant-tag,$(VARIANT)) -f Dockerfile$(suffix $@) . ); )
|
||||
+endif
|
||||
RENAME_TEMPLATE ?= mkdir -p $(DOCKER_BUILD_TOP)/$@ && cp $(ECHO_DOCKER)/$(VM_OS_DOCKERFILE_TEMPLATE) $(DOCKER_BUILD_TOP)/$@/Dockerfile$(suffix $@)
|
||||
|
||||
# This target will package all docker images used in test and release, without re-building
|
||||
14
istio/1.12/patches/istio/20230922-gateway-class.patch
Normal file
14
istio/1.12/patches/istio/20230922-gateway-class.patch
Normal file
@@ -0,0 +1,14 @@
|
||||
diff -Naur istio/pilot/pkg/config/kube/gateway/conversion.go istio_new/pilot/pkg/config/kube/gateway/conversion.go
|
||||
--- istio/pilot/pkg/config/kube/gateway/conversion.go 2023-09-22 11:06:50.400535200 +0800
|
||||
+++ istio_new/pilot/pkg/config/kube/gateway/conversion.go 2023-09-22 11:07:52.954982700 +0800
|
||||
@@ -37,8 +37,8 @@
|
||||
)
|
||||
|
||||
const (
|
||||
- DefaultClassName = "istio"
|
||||
- ControllerName = "istio.io/gateway-controller"
|
||||
+ DefaultClassName = "higress"
|
||||
+ ControllerName = "higress.io/gateway-controller"
|
||||
)
|
||||
|
||||
// KubernetesResources stores all inputs to our conversion
|
||||
71
istio/1.12/patches/istio/20230925-gateway-httproute.patch
Normal file
71
istio/1.12/patches/istio/20230925-gateway-httproute.patch
Normal file
@@ -0,0 +1,71 @@
|
||||
diff -Naur istio/pilot/pkg/config/kube/gateway/conversion.go istio-new/pilot/pkg/config/kube/gateway/conversion.go
|
||||
--- istio/pilot/pkg/config/kube/gateway/conversion.go 2023-09-25 17:26:32.000000000 +0800
|
||||
+++ istio-new/pilot/pkg/config/kube/gateway/conversion.go 2023-09-25 17:25:27.000000000 +0800
|
||||
@@ -656,6 +656,16 @@
|
||||
Port: &istio.PortSelector{Number: uint32(*to.Port)},
|
||||
}, nil
|
||||
}
|
||||
+ if equal((*string)(to.Group), "networking.higress.io") && nilOrEqual((*string)(to.Kind), "Service") {
|
||||
+ var port *istio.PortSelector
|
||||
+ if to.Port != nil {
|
||||
+ port = &istio.PortSelector{Number: uint32(*to.Port)}
|
||||
+ }
|
||||
+ return &istio.Destination{
|
||||
+ Host: string(to.Name),
|
||||
+ Port: port,
|
||||
+ }, nil
|
||||
+ }
|
||||
return nil, &ConfigError{
|
||||
Reason: InvalidDestination,
|
||||
Message: fmt.Sprintf("referencing unsupported backendRef: group %q kind %q", emptyIfNil((*string)(to.Group)), emptyIfNil((*string)(to.Kind))),
|
||||
@@ -912,7 +922,7 @@
|
||||
ObservedGeneration: obj.Generation,
|
||||
LastTransitionTime: metav1.Now(),
|
||||
Reason: string(k8s.GatewayClassConditionStatusAccepted),
|
||||
- Message: "Handled by Istio controller",
|
||||
+ Message: "Handled by Higress controller",
|
||||
})
|
||||
return gcs
|
||||
})
|
||||
@@ -1371,6 +1381,10 @@
|
||||
return d
|
||||
}
|
||||
|
||||
+func equal(have *string, expected string) bool {
|
||||
+ return have != nil && *have == expected
|
||||
+}
|
||||
+
|
||||
func nilOrEqual(have *string, expected string) bool {
|
||||
return have == nil || *have == expected
|
||||
}
|
||||
diff -Naur istio/pilot/pkg/leaderelection/leaderelection.go istio-new/pilot/pkg/leaderelection/leaderelection.go
|
||||
--- istio/pilot/pkg/leaderelection/leaderelection.go 2023-09-25 17:26:31.000000000 +0800
|
||||
+++ istio-new/pilot/pkg/leaderelection/leaderelection.go 2023-09-25 14:59:39.000000000 +0800
|
||||
@@ -35,20 +35,20 @@
|
||||
|
||||
// Various locks used throughout the code
|
||||
const (
|
||||
- NamespaceController = "istio-namespace-controller-election"
|
||||
- ServiceExportController = "istio-serviceexport-controller-election"
|
||||
+ NamespaceController = "higress-namespace-controller-election"
|
||||
+ ServiceExportController = "higress-serviceexport-controller-election"
|
||||
// This holds the legacy name to not conflict with older control plane deployments which are just
|
||||
// doing the ingress syncing.
|
||||
- IngressController = "istio-leader"
|
||||
+ IngressController = "higress-leader"
|
||||
// GatewayStatusController controls the status of gateway.networking.k8s.io objects. For the v1alpha1
|
||||
// this was formally "istio-gateway-leader"; because they are a different API group we need a different
|
||||
// election to ensure we do not only handle one or the other.
|
||||
- GatewayStatusController = "istio-gateway-status-leader"
|
||||
+ GatewayStatusController = "higress-gateway-status-leader"
|
||||
// GatewayDeploymentController controls the Deployment/Service generation from Gateways. This is
|
||||
// separate from GatewayStatusController to allow running in a separate process (for low priv).
|
||||
- GatewayDeploymentController = "istio-gateway-deployment-leader"
|
||||
- StatusController = "istio-status-leader"
|
||||
- AnalyzeController = "istio-analyze-leader"
|
||||
+ GatewayDeploymentController = "higress-gateway-deployment-leader"
|
||||
+ StatusController = "higress-status-leader"
|
||||
+ AnalyzeController = "higress-analyze-leader"
|
||||
)
|
||||
|
||||
var ClusterScopedNamespaceController = NamespaceController
|
||||
90
istio/1.12/patches/istio/20231008-gateway-fallback.patch
Normal file
90
istio/1.12/patches/istio/20231008-gateway-fallback.patch
Normal file
@@ -0,0 +1,90 @@
|
||||
diff -Naur istio/pilot/pkg/config/kube/gateway/conversion.go istio-new/pilot/pkg/config/kube/gateway/conversion.go
|
||||
--- istio/pilot/pkg/config/kube/gateway/conversion.go 2023-10-08 19:54:47.000000000 +0800
|
||||
+++ istio-new/pilot/pkg/config/kube/gateway/conversion.go 2023-09-27 16:10:42.000000000 +0800
|
||||
@@ -18,6 +18,7 @@
|
||||
"fmt"
|
||||
"regexp"
|
||||
"sort"
|
||||
+ "strconv"
|
||||
"strings"
|
||||
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
@@ -176,7 +177,9 @@
|
||||
hosts := hostnameToStringList(route.Hostnames)
|
||||
for _, r := range route.Rules {
|
||||
// TODO: implement rewrite, timeout, mirror, corspolicy, retries
|
||||
- vs := &istio.HTTPRoute{}
|
||||
+ vs := &istio.HTTPRoute{
|
||||
+ Name: obj.Name,
|
||||
+ }
|
||||
for _, match := range r.Matches {
|
||||
uri, err := createURIMatch(match)
|
||||
if err != nil {
|
||||
@@ -246,7 +249,9 @@
|
||||
}}
|
||||
}
|
||||
|
||||
- route, err := buildHTTPDestination(r.BackendRefs, obj.Namespace, domain, zero)
|
||||
+ fallbackCluster := obj.Annotations["higress.io/fallback-service"]
|
||||
+
|
||||
+ route, err := buildHTTPDestination(r.BackendRefs, obj.Namespace, domain, zero, fallbackCluster)
|
||||
if err != nil {
|
||||
reportError(err)
|
||||
return nil
|
||||
@@ -581,11 +586,33 @@
|
||||
return r
|
||||
}
|
||||
|
||||
-func buildHTTPDestination(forwardTo []k8s.HTTPBackendRef, ns string, domain string, totalZero bool) ([]*istio.HTTPRouteDestination, *ConfigError) {
|
||||
+func buildHTTPDestination(forwardTo []k8s.HTTPBackendRef, ns string, domain string, totalZero bool, fallbackCluster string) ([]*istio.HTTPRouteDestination, *ConfigError) {
|
||||
if forwardTo == nil {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
+ var fallbackDest *istio.Destination
|
||||
+ if fallbackCluster != "" {
|
||||
+ var port uint64
|
||||
+ host := fallbackCluster
|
||||
+ colon := strings.LastIndex(fallbackCluster, ":")
|
||||
+ if colon != -1 {
|
||||
+ var err error
|
||||
+ port, err = strconv.ParseUint(fallbackCluster[colon+1:], 10, 32)
|
||||
+ if err == nil && port > 0 && port < 65536 {
|
||||
+ host = fallbackCluster[:colon]
|
||||
+ }
|
||||
+ }
|
||||
+ fallbackDest = &istio.Destination{
|
||||
+ Host: host,
|
||||
+ }
|
||||
+ if port > 0 {
|
||||
+ fallbackDest.Port = &istio.PortSelector{
|
||||
+ Number: uint32(port),
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
weights := []int{}
|
||||
action := []k8s.HTTPBackendRef{}
|
||||
for i, w := range forwardTo {
|
||||
@@ -612,6 +639,9 @@
|
||||
Destination: dst,
|
||||
Weight: int32(weights[i]),
|
||||
}
|
||||
+ if fallbackDest != nil {
|
||||
+ rd.FallbackClusters = append(rd.FallbackClusters, fallbackDest)
|
||||
+ }
|
||||
for _, filter := range fwd.Filters {
|
||||
switch filter.Type {
|
||||
case k8s.HTTPRouteFilterRequestHeaderModifier:
|
||||
diff -Naur istio/pilot/pkg/networking/core/v1alpha3/route/route.go istio-new/pilot/pkg/networking/core/v1alpha3/route/route.go
|
||||
--- istio/pilot/pkg/networking/core/v1alpha3/route/route.go 2023-10-08 19:54:46.000000000 +0800
|
||||
+++ istio-new/pilot/pkg/networking/core/v1alpha3/route/route.go 2023-09-27 16:18:16.000000000 +0800
|
||||
@@ -669,7 +669,7 @@
|
||||
}
|
||||
var singleClusterConfig *fallback.ClusterFallbackConfig
|
||||
var weightedClusterConfig *fallback.ClusterFallbackConfig
|
||||
- isSupportFallback := supportFallback(node)
|
||||
+ isSupportFallback := true
|
||||
// Added by ingress
|
||||
if len(in.Route) == 1 {
|
||||
route := in.Route[0]
|
||||
13
istio/1.12/patches/istio/20231024-cds-add-fallback.patch
Normal file
13
istio/1.12/patches/istio/20231024-cds-add-fallback.patch
Normal file
@@ -0,0 +1,13 @@
|
||||
diff -Naur istio/pilot/pkg/model/push_context.go istio-new/pilot/pkg/model/push_context.go
|
||||
--- istio/pilot/pkg/model/push_context.go 2023-10-24 10:55:51.000000000 +0800
|
||||
+++ istio-new/pilot/pkg/model/push_context.go 2023-10-20 17:00:06.000000000 +0800
|
||||
@@ -704,6 +704,9 @@
|
||||
if r.Destination != nil {
|
||||
out = append(out, r.Destination.Host)
|
||||
}
|
||||
+ for _, d := range r.FallbackClusters {
|
||||
+ out = append(out, d.Host)
|
||||
+ }
|
||||
}
|
||||
if h.Mirror != nil {
|
||||
out = append(out, h.Mirror.Host)
|
||||
2202
istio/1.12/patches/istio/20231031-gatewayapi-v1beta1.patch
Normal file
2202
istio/1.12/patches/istio/20231031-gatewayapi-v1beta1.patch
Normal file
File diff suppressed because it is too large
Load Diff
377
istio/1.12/patches/istio/20231103-gatewayapi-sort.patch
Normal file
377
istio/1.12/patches/istio/20231103-gatewayapi-sort.patch
Normal file
@@ -0,0 +1,377 @@
|
||||
diff -Naur istio/pilot/pkg/config/kube/gateway/conversion.go istio-new/pilot/pkg/config/kube/gateway/conversion.go
|
||||
--- istio/pilot/pkg/config/kube/gateway/conversion.go 2023-11-03 17:18:56.000000000 +0800
|
||||
+++ istio-new/pilot/pkg/config/kube/gateway/conversion.go 2023-11-03 17:14:50.000000000 +0800
|
||||
@@ -151,15 +151,113 @@
|
||||
}
|
||||
}
|
||||
|
||||
+ // for gateway routes, build one VS per gateway+host
|
||||
+ gatewayRoutes := make(map[string]map[string]*config.Config)
|
||||
+
|
||||
for _, obj := range r.HTTPRoute {
|
||||
- if vsConfig := buildHTTPVirtualServices(obj, gatewayMap, r.Domain); vsConfig != nil {
|
||||
+ buildHTTPVirtualServices(r, obj, gatewayMap, gatewayRoutes, r.Domain)
|
||||
+ }
|
||||
+ for _, vsByHost := range gatewayRoutes {
|
||||
+ for _, vsConfig := range vsByHost {
|
||||
result = append(result, *vsConfig)
|
||||
}
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
||||
-func buildHTTPVirtualServices(obj config.Config, gateways map[parentKey]map[gatewayapiV1beta1.SectionName]*parentInfo, domain string) *config.Config {
|
||||
+// getURIRank ranks a URI match type. Exact > Prefix > Regex
|
||||
+func getURIRank(match *istio.HTTPMatchRequest) int {
|
||||
+ if match.Uri == nil {
|
||||
+ return -1
|
||||
+ }
|
||||
+ switch match.Uri.MatchType.(type) {
|
||||
+ case *istio.StringMatch_Exact:
|
||||
+ return 3
|
||||
+ case *istio.StringMatch_Prefix:
|
||||
+ return 2
|
||||
+ case *istio.StringMatch_Regex:
|
||||
+ // TODO optimize in new verison envoy
|
||||
+ if strings.HasSuffix(match.Uri.GetRegex(), prefixMatchRegex) &&
|
||||
+ !strings.ContainsAny(strings.TrimSuffix(match.Uri.GetRegex(), prefixMatchRegex), `\.+*?()|[]{}^$`) {
|
||||
+ return 2
|
||||
+ }
|
||||
+ return 1
|
||||
+ }
|
||||
+ // should not happen
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+func getURILength(match *istio.HTTPMatchRequest) int {
|
||||
+ if match.Uri == nil {
|
||||
+ return 0
|
||||
+ }
|
||||
+ switch match.Uri.MatchType.(type) {
|
||||
+ case *istio.StringMatch_Prefix:
|
||||
+ return len(match.Uri.GetPrefix())
|
||||
+ case *istio.StringMatch_Exact:
|
||||
+ return len(match.Uri.GetExact())
|
||||
+ case *istio.StringMatch_Regex:
|
||||
+ return len(match.Uri.GetRegex())
|
||||
+ }
|
||||
+ // should not happen
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+// sortHTTPRoutes sorts generated vs routes to meet gateway-api requirements
|
||||
+// see https://gateway-api.sigs.k8s.io/v1alpha2/references/spec/#gateway.networking.k8s.io/v1alpha2.HTTPRouteRule
|
||||
+func sortHTTPRoutes(routes []*istio.HTTPRoute) {
|
||||
+ sort.SliceStable(routes, func(i, j int) bool {
|
||||
+ if len(routes[i].Match) == 0 {
|
||||
+ return false
|
||||
+ } else if len(routes[j].Match) == 0 {
|
||||
+ return true
|
||||
+ }
|
||||
+ // Only look at match[0], we always generate only one match
|
||||
+ m1, m2 := routes[i].Match[0], routes[j].Match[0]
|
||||
+ r1, r2 := getURIRank(m1), getURIRank(m2)
|
||||
+ len1, len2 := getURILength(m1), getURILength(m2)
|
||||
+ switch {
|
||||
+ // 1: Exact/Prefix/Regex
|
||||
+ case r1 != r2:
|
||||
+ return r1 > r2
|
||||
+ case len1 != len2:
|
||||
+ return len1 > len2
|
||||
+ // 2: method math
|
||||
+ case (m1.Method == nil) != (m2.Method == nil):
|
||||
+ return m1.Method != nil
|
||||
+ // 3: number of header matches
|
||||
+ case len(m1.Headers) != len(m2.Headers):
|
||||
+ return len(m1.Headers) > len(m2.Headers)
|
||||
+ // 4: number of query matches
|
||||
+ default:
|
||||
+ return len(m1.QueryParams) > len(m2.QueryParams)
|
||||
+ }
|
||||
+ })
|
||||
+}
|
||||
+
|
||||
+func routeMeta(obj config.Config) map[string]string {
|
||||
+ m := parentMeta(obj, nil)
|
||||
+ m[constants.InternalRouteSemantics] = constants.RouteSemanticsGateway
|
||||
+ return m
|
||||
+}
|
||||
+
|
||||
+func filteredReferences(parents []routeParentReference) []routeParentReference {
|
||||
+ ret := make([]routeParentReference, 0, len(parents))
|
||||
+ for _, p := range parents {
|
||||
+ if p.DeniedReason != nil {
|
||||
+ // We should filter this out
|
||||
+ continue
|
||||
+ }
|
||||
+ ret = append(ret, p)
|
||||
+ }
|
||||
+ // To ensure deterministic order, sort them
|
||||
+ sort.Slice(ret, func(i, j int) bool {
|
||||
+ return ret[i].InternalName < ret[j].InternalName
|
||||
+ })
|
||||
+ return ret
|
||||
+}
|
||||
+
|
||||
+func buildHTTPVirtualServices(ctx *KubernetesResources, obj config.Config, gateways map[parentKey]map[gatewayapiV1beta1.SectionName]*parentInfo, gatewayRoutes map[string]map[string]*config.Config, domain string) {
|
||||
route := obj.Spec.(*gatewayapiV1beta1.HTTPRouteSpec)
|
||||
|
||||
parentRefs := extractParentReferenceInfo(gateways, route.ParentRefs, route.Hostnames, gvk.HTTPRoute, obj.Namespace)
|
||||
@@ -172,10 +270,7 @@
|
||||
})
|
||||
}
|
||||
|
||||
- name := fmt.Sprintf("%s-%s", obj.Name, constants.KubernetesGatewayName)
|
||||
-
|
||||
httproutes := []*istio.HTTPRoute{}
|
||||
- hosts := hostnameToStringList(route.Hostnames)
|
||||
for _, r := range route.Rules {
|
||||
// TODO: implement rewrite, timeout, mirror, corspolicy, retries
|
||||
vs := &istio.HTTPRoute{
|
||||
@@ -185,22 +280,22 @@
|
||||
uri, err := createURIMatch(match)
|
||||
if err != nil {
|
||||
reportError(err)
|
||||
- return nil
|
||||
+ return
|
||||
}
|
||||
headers, err := createHeadersMatch(match)
|
||||
if err != nil {
|
||||
reportError(err)
|
||||
- return nil
|
||||
+ return
|
||||
}
|
||||
qp, err := createQueryParamsMatch(match)
|
||||
if err != nil {
|
||||
reportError(err)
|
||||
- return nil
|
||||
+ return
|
||||
}
|
||||
method, err := createMethodMatch(match)
|
||||
if err != nil {
|
||||
reportError(err)
|
||||
- return nil
|
||||
+ return
|
||||
}
|
||||
vs.Match = append(vs.Match, &istio.HTTPMatchRequest{
|
||||
Uri: uri,
|
||||
@@ -219,7 +314,7 @@
|
||||
mirror, err := createMirrorFilter(filter.RequestMirror, obj.Namespace, domain)
|
||||
if err != nil {
|
||||
reportError(err)
|
||||
- return nil
|
||||
+ return
|
||||
}
|
||||
vs.Mirror = mirror
|
||||
default:
|
||||
@@ -227,7 +322,7 @@
|
||||
Reason: InvalidFilter,
|
||||
Message: fmt.Sprintf("unsupported filter type %q", filter.Type),
|
||||
})
|
||||
- return nil
|
||||
+ return
|
||||
}
|
||||
}
|
||||
|
||||
@@ -255,33 +350,65 @@
|
||||
route, err := buildHTTPDestination(r.BackendRefs, obj.Namespace, domain, zero, fallbackCluster)
|
||||
if err != nil {
|
||||
reportError(err)
|
||||
- return nil
|
||||
+ return
|
||||
}
|
||||
vs.Route = route
|
||||
|
||||
httproutes = append(httproutes, vs)
|
||||
}
|
||||
reportError(nil)
|
||||
- gatewayNames := referencesToInternalNames(parentRefs)
|
||||
- if len(gatewayNames) == 0 {
|
||||
- return nil
|
||||
+
|
||||
+ count := 0
|
||||
+ for _, parent := range filteredReferences(parentRefs) {
|
||||
+ // for gateway routes, build one VS per gateway+host
|
||||
+ routeMap := gatewayRoutes
|
||||
+ routeKey := parent.InternalName
|
||||
+ vsHosts := hostnameToStringList(route.Hostnames)
|
||||
+ routes := httproutes
|
||||
+ if len(routes) == 0 {
|
||||
+ continue
|
||||
+ }
|
||||
+ if _, f := routeMap[routeKey]; !f {
|
||||
+ routeMap[routeKey] = make(map[string]*config.Config)
|
||||
+ }
|
||||
+
|
||||
+ // Create one VS per hostname with a single hostname.
|
||||
+ // This ensures we can treat each hostname independently, as the spec requires
|
||||
+ for _, h := range vsHosts {
|
||||
+ if cfg := routeMap[routeKey][h]; cfg != nil {
|
||||
+ // merge http routes
|
||||
+ vs := cfg.Spec.(*istio.VirtualService)
|
||||
+ vs.Http = append(vs.Http, routes...)
|
||||
+ // append parents
|
||||
+ cfg.Annotations[constants.InternalParentNames] = fmt.Sprintf("%s,%s/%s.%s",
|
||||
+ cfg.Annotations[constants.InternalParentNames], obj.GroupVersionKind.Kind, obj.Name, obj.Namespace)
|
||||
+ } else {
|
||||
+ name := fmt.Sprintf("%s-%d-%s", obj.Name, count, constants.KubernetesGatewayName)
|
||||
+ routeMap[routeKey][h] = &config.Config{
|
||||
+ Meta: config.Meta{
|
||||
+ CreationTimestamp: obj.CreationTimestamp,
|
||||
+ GroupVersionKind: gvk.VirtualService,
|
||||
+ Name: name,
|
||||
+ Annotations: routeMeta(obj),
|
||||
+ Namespace: obj.Namespace,
|
||||
+ Domain: ctx.Domain,
|
||||
+ },
|
||||
+ Spec: &istio.VirtualService{
|
||||
+ Hosts: []string{h},
|
||||
+ Gateways: []string{parent.InternalName},
|
||||
+ Http: routes,
|
||||
+ },
|
||||
+ }
|
||||
+ count++
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
- vsConfig := config.Config{
|
||||
- Meta: config.Meta{
|
||||
- CreationTimestamp: obj.CreationTimestamp,
|
||||
- GroupVersionKind: gvk.VirtualService,
|
||||
- Name: name,
|
||||
- Annotations: parentMeta(obj, nil),
|
||||
- Namespace: obj.Namespace,
|
||||
- Domain: domain,
|
||||
- },
|
||||
- Spec: &istio.VirtualService{
|
||||
- Hosts: hosts,
|
||||
- Gateways: gatewayNames,
|
||||
- Http: httproutes,
|
||||
- },
|
||||
+ for _, vsByHost := range gatewayRoutes {
|
||||
+ for _, cfg := range vsByHost {
|
||||
+ vs := cfg.Spec.(*istio.VirtualService)
|
||||
+ sortHTTPRoutes(vs.Http)
|
||||
+ }
|
||||
}
|
||||
- return &vsConfig
|
||||
}
|
||||
|
||||
func parentMeta(obj config.Config, sectionName *gatewayapiV1beta1.SectionName) map[string]string {
|
||||
@@ -1155,9 +1282,11 @@
|
||||
}
|
||||
gs.Addresses = make([]gatewayapiV1beta1.GatewayAddress, 0, len(addressesToReport))
|
||||
for _, addr := range addressesToReport {
|
||||
+ addrPairs := strings.Split(addr, ":")
|
||||
gs.Addresses = append(gs.Addresses, gatewayapiV1beta1.GatewayAddress{
|
||||
- Type: &addrType,
|
||||
- Value: addr,
|
||||
+ Type: &addrType,
|
||||
+ // strip the port
|
||||
+ Value: addrPairs[0],
|
||||
})
|
||||
}
|
||||
return gs
|
||||
diff -Naur istio/pilot/pkg/model/push_context.go istio-new/pilot/pkg/model/push_context.go
|
||||
--- istio/pilot/pkg/model/push_context.go 2023-11-03 17:18:56.000000000 +0800
|
||||
+++ istio-new/pilot/pkg/model/push_context.go 2023-11-03 17:05:47.000000000 +0800
|
||||
@@ -841,7 +841,19 @@
|
||||
func (ps *PushContext) VirtualServicesForGateway(proxy *Proxy, gateway string) []config.Config {
|
||||
res := ps.virtualServiceIndex.privateByNamespaceAndGateway[proxy.ConfigNamespace][gateway]
|
||||
res = append(res, ps.virtualServiceIndex.exportedToNamespaceByGateway[proxy.ConfigNamespace][gateway]...)
|
||||
- res = append(res, ps.virtualServiceIndex.publicByGateway[gateway]...)
|
||||
+
|
||||
+ // Favor same-namespace Gateway routes, to give the "consumer override" preference.
|
||||
+ // We do 2 iterations here to avoid extra allocations.
|
||||
+ for _, vs := range ps.virtualServiceIndex.publicByGateway[gateway] {
|
||||
+ if UseGatewaySemantics(vs) && vs.Namespace == proxy.ConfigNamespace {
|
||||
+ res = append(res, vs)
|
||||
+ }
|
||||
+ }
|
||||
+ for _, vs := range ps.virtualServiceIndex.publicByGateway[gateway] {
|
||||
+ if !(UseGatewaySemantics(vs) && vs.Namespace == proxy.ConfigNamespace) {
|
||||
+ res = append(res, vs)
|
||||
+ }
|
||||
+ }
|
||||
return res
|
||||
}
|
||||
|
||||
diff -Naur istio/pilot/pkg/model/virtualservice.go istio-new/pilot/pkg/model/virtualservice.go
|
||||
--- istio/pilot/pkg/model/virtualservice.go 2023-11-03 17:18:55.000000000 +0800
|
||||
+++ istio-new/pilot/pkg/model/virtualservice.go 2023-11-03 15:19:08.000000000 +0800
|
||||
@@ -76,6 +76,11 @@
|
||||
}
|
||||
|
||||
func resolveVirtualServiceShortnames(rule *networking.VirtualService, meta config.Meta) {
|
||||
+ // Kubernetes Gateway API semantics support shortnames
|
||||
+ // if UseGatewaySemantics(config.Config{Meta: meta}) {
|
||||
+ // return
|
||||
+ // }
|
||||
+
|
||||
// resolve top level hosts
|
||||
for i, h := range rule.Hosts {
|
||||
rule.Hosts[i] = string(ResolveShortnameToFQDN(h, meta))
|
||||
@@ -524,3 +529,10 @@
|
||||
}
|
||||
return false
|
||||
}
|
||||
+
|
||||
+// UseGatewaySemantics determines which logic we should use for VirtualService
|
||||
+// This allows gateway-api and VS to both be represented by VirtualService, but have different
|
||||
+// semantics.
|
||||
+func UseGatewaySemantics(cfg config.Config) bool {
|
||||
+ return cfg.Annotations[constants.InternalRouteSemantics] == constants.RouteSemanticsGateway
|
||||
+}
|
||||
diff -Naur istio/pilot/pkg/networking/core/v1alpha3/route/route.go istio-new/pilot/pkg/networking/core/v1alpha3/route/route.go
|
||||
--- istio/pilot/pkg/networking/core/v1alpha3/route/route.go 2023-11-03 17:18:56.000000000 +0800
|
||||
+++ istio-new/pilot/pkg/networking/core/v1alpha3/route/route.go 2023-11-03 17:05:55.000000000 +0800
|
||||
@@ -408,7 +408,6 @@
|
||||
break
|
||||
}
|
||||
}
|
||||
-
|
||||
if len(out) == 0 {
|
||||
return nil, fmt.Errorf("no routes matched")
|
||||
}
|
||||
@@ -493,6 +492,14 @@
|
||||
},
|
||||
}
|
||||
|
||||
+ if model.UseGatewaySemantics(virtualService) {
|
||||
+ if uri, isPrefixReplace := cutPrefix(redirect.Uri, "%PREFIX()%"); isPrefixReplace {
|
||||
+ action.Redirect.PathRewriteSpecifier = &route.RedirectAction_PrefixRewrite{
|
||||
+ PrefixRewrite: uri,
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
if redirect.Scheme != "" {
|
||||
action.Redirect.SchemeRewriteSpecifier = &route.RedirectAction_SchemeRedirect{SchemeRedirect: redirect.Scheme}
|
||||
}
|
||||
@@ -1616,3 +1623,10 @@
|
||||
isSupport = curVersion.GreaterThan(notSupportFallback)
|
||||
return
|
||||
}
|
||||
+
|
||||
+func cutPrefix(s, prefix string) (after string, found bool) {
|
||||
+ if !strings.HasPrefix(s, prefix) {
|
||||
+ return s, false
|
||||
+ }
|
||||
+ return s[len(prefix):], true
|
||||
+}
|
||||
diff -Naur istio/pkg/config/constants/constants.go istio-new/pkg/config/constants/constants.go
|
||||
--- istio/pkg/config/constants/constants.go 2023-11-03 17:18:54.000000000 +0800
|
||||
+++ istio-new/pkg/config/constants/constants.go 2023-11-03 14:29:27.000000000 +0800
|
||||
@@ -15,6 +15,12 @@
|
||||
package constants
|
||||
|
||||
const (
|
||||
+ InternalParentNames = "internal.istio.io/parents"
|
||||
+
|
||||
+ InternalRouteSemantics = "internal.istio.io/route-semantics"
|
||||
+
|
||||
+ RouteSemanticsGateway = "gateway"
|
||||
+
|
||||
// UnspecifiedIP constant for empty IP address
|
||||
UnspecifiedIP = "0.0.0.0"
|
||||
|
||||
50
istio/1.12/patches/istio/20231104-gatewayapi-catchall.patch
Normal file
50
istio/1.12/patches/istio/20231104-gatewayapi-catchall.patch
Normal file
@@ -0,0 +1,50 @@
|
||||
diff -Naur istio/pilot/pkg/config/kube/gateway/conversion.go istio-new/pilot/pkg/config/kube/gateway/conversion.go
|
||||
--- istio/pilot/pkg/config/kube/gateway/conversion.go 2023-11-03 20:09:38.000000000 +0800
|
||||
+++ istio-new/pilot/pkg/config/kube/gateway/conversion.go 2023-11-03 20:02:26.000000000 +0800
|
||||
@@ -165,6 +165,34 @@
|
||||
return result
|
||||
}
|
||||
|
||||
+// isCatchAll returns true if HTTPMatchRequest is a catchall match otherwise
|
||||
+// false. Note - this may not be exactly "catch all" as we don't know the full
|
||||
+// class of possible inputs As such, this is used only for optimization.
|
||||
+func isCatchAllMatch(m *istio.HTTPMatchRequest) bool {
|
||||
+ catchall := false
|
||||
+ if m.Uri != nil {
|
||||
+ switch m := m.Uri.MatchType.(type) {
|
||||
+ case *istio.StringMatch_Prefix:
|
||||
+ catchall = m.Prefix == "/"
|
||||
+ case *istio.StringMatch_Regex:
|
||||
+ catchall = m.Regex == "*"
|
||||
+ }
|
||||
+ }
|
||||
+ // A Match is catch all if and only if it has no match set
|
||||
+ // and URI has a prefix / or regex *.
|
||||
+ return catchall &&
|
||||
+ len(m.Headers) == 0 &&
|
||||
+ len(m.QueryParams) == 0 &&
|
||||
+ len(m.SourceLabels) == 0 &&
|
||||
+ len(m.WithoutHeaders) == 0 &&
|
||||
+ len(m.Gateways) == 0 &&
|
||||
+ m.Method == nil &&
|
||||
+ m.Scheme == nil &&
|
||||
+ m.Port == 0 &&
|
||||
+ m.Authority == nil &&
|
||||
+ m.SourceNamespace == ""
|
||||
+}
|
||||
+
|
||||
// getURIRank ranks a URI match type. Exact > Prefix > Regex
|
||||
func getURIRank(match *istio.HTTPMatchRequest) int {
|
||||
if match.Uri == nil {
|
||||
@@ -212,6 +240,11 @@
|
||||
} else if len(routes[j].Match) == 0 {
|
||||
return true
|
||||
}
|
||||
+ if isCatchAllMatch(routes[i].Match[0]) {
|
||||
+ return false
|
||||
+ } else if isCatchAllMatch(routes[j].Match[0]) {
|
||||
+ return true
|
||||
+ }
|
||||
// Only look at match[0], we always generate only one match
|
||||
m1, m2 := routes[i].Match[0], routes[j].Match[0]
|
||||
r1, r2 := getURIRank(m1), getURIRank(m2)
|
||||
62
istio/1.12/patches/istio/20231115-optimize-xds-push.patch
Normal file
62
istio/1.12/patches/istio/20231115-optimize-xds-push.patch
Normal file
@@ -0,0 +1,62 @@
|
||||
diff -Naur istio/pilot/pkg/xds/ads.go istio-new/pilot/pkg/xds/ads.go
|
||||
--- istio/pilot/pkg/xds/ads.go 2023-11-15 20:25:18.000000000 +0800
|
||||
+++ istio-new/pilot/pkg/xds/ads.go 2023-11-15 20:24:20.000000000 +0800
|
||||
@@ -318,6 +318,27 @@
|
||||
<-con.initialized
|
||||
|
||||
for {
|
||||
+ // Go select{} statements are not ordered; the same channel can be chosen many times.
|
||||
+ // For requests, these are higher priority (client may be blocked on startup until these are done)
|
||||
+ // and often very cheap to handle (simple ACK), so we check it first.
|
||||
+ select {
|
||||
+ case req, ok := <-con.reqChan:
|
||||
+ if ok {
|
||||
+ if err := s.processRequest(req, con); err != nil {
|
||||
+ return err
|
||||
+ }
|
||||
+ } else {
|
||||
+ // Remote side closed connection or error processing the request.
|
||||
+ return <-con.errorChan
|
||||
+ }
|
||||
+ case <-con.stop:
|
||||
+ return nil
|
||||
+ default:
|
||||
+ }
|
||||
+ // If there wasn't already a request, poll for requests and pushes. Note: if we have a huge
|
||||
+ // amount of incoming requests, we may still send some pushes, as we do not `continue` above;
|
||||
+ // however, requests will be handled ~2x as much as pushes. This ensures a wave of requests
|
||||
+ // cannot completely starve pushes. However, this scenario is unlikely.
|
||||
select {
|
||||
case req, ok := <-con.reqChan:
|
||||
if ok {
|
||||
diff -Naur istio/pilot/pkg/xds/delta.go istio-new/pilot/pkg/xds/delta.go
|
||||
--- istio/pilot/pkg/xds/delta.go 2023-11-15 20:25:18.000000000 +0800
|
||||
+++ istio-new/pilot/pkg/xds/delta.go 2023-11-15 20:24:44.000000000 +0800
|
||||
@@ -102,6 +102,27 @@
|
||||
<-con.initialized
|
||||
|
||||
for {
|
||||
+ // Go select{} statements are not ordered; the same channel can be chosen many times.
|
||||
+ // For requests, these are higher priority (client may be blocked on startup until these are done)
|
||||
+ // and often very cheap to handle (simple ACK), so we check it first.
|
||||
+ select {
|
||||
+ case req, ok := <-con.deltaReqChan:
|
||||
+ if ok {
|
||||
+ if err := s.processDeltaRequest(req, con); err != nil {
|
||||
+ return err
|
||||
+ }
|
||||
+ } else {
|
||||
+ // Remote side closed connection or error processing the request.
|
||||
+ return <-con.errorChan
|
||||
+ }
|
||||
+ case <-con.stop:
|
||||
+ return nil
|
||||
+ default:
|
||||
+ }
|
||||
+ // If there wasn't already a request, poll for requests and pushes. Note: if we have a huge
|
||||
+ // amount of incoming requests, we may still send some pushes, as we do not `continue` above;
|
||||
+ // however, requests will be handled ~2x as much as pushes. This ensures a wave of requests
|
||||
+ // cannot completely starve pushes. However, this scenario is unlikely.
|
||||
select {
|
||||
case req, ok := <-con.deltaReqChan:
|
||||
if ok {
|
||||
633
istio/1.12/patches/istio/20240104-enhance-srds.patch
Normal file
633
istio/1.12/patches/istio/20240104-enhance-srds.patch
Normal file
@@ -0,0 +1,633 @@
|
||||
diff -Naur istio/pilot/pkg/features/pilot.go istio-new/pilot/pkg/features/pilot.go
|
||||
--- istio/pilot/pkg/features/pilot.go 2024-01-05 17:58:08.000000000 +0800
|
||||
+++ istio-new/pilot/pkg/features/pilot.go 2024-01-04 21:20:00.000000000 +0800
|
||||
@@ -569,6 +569,12 @@
|
||||
// Added by ingress
|
||||
CustomCACertConfigMapName = env.RegisterStringVar("CUSTOM_CA_CERT_NAME", "",
|
||||
"Defines the configmap's name of istio's root ca certificate").Get()
|
||||
+ HostRDSMergeSubset = env.RegisterBoolVar("HOST_RDS_MERGE_SUBSET", true,
|
||||
+ "If enabled, if host A is a subset of B, then we merge B's routes into A's hostRDS").Get()
|
||||
+ EnableScopedRDS = env.RegisterBoolVar("ENBALE_SCOPED_RDS", true,
|
||||
+ "If enabled, each host in virtualservice will have an independent RDS, which is used with SRDS").Get()
|
||||
+ OnDemandRDS = env.RegisterBoolVar("ON_DEMAND_RDS", false,
|
||||
+ "If enabled, the on demand filter will be added to the HCM filters").Get()
|
||||
// End added by ingress
|
||||
)
|
||||
|
||||
diff -Naur istio/pilot/pkg/networking/core/configgen.go istio-new/pilot/pkg/networking/core/configgen.go
|
||||
--- istio/pilot/pkg/networking/core/configgen.go 2024-01-05 17:58:02.000000000 +0800
|
||||
+++ istio-new/pilot/pkg/networking/core/configgen.go 2024-01-04 21:20:00.000000000 +0800
|
||||
@@ -17,6 +17,7 @@
|
||||
import (
|
||||
core "github.com/envoyproxy/go-control-plane/envoy/config/core/v3"
|
||||
listener "github.com/envoyproxy/go-control-plane/envoy/config/listener/v3"
|
||||
+ route "github.com/envoyproxy/go-control-plane/envoy/config/route/v3"
|
||||
discovery "github.com/envoyproxy/go-control-plane/envoy/service/discovery/v3"
|
||||
|
||||
meshconfig "istio.io/api/mesh/v1alpha1"
|
||||
@@ -44,6 +45,10 @@
|
||||
// BuildHTTPRoutes returns the list of HTTP routes for the given proxy. This is the RDS output
|
||||
BuildHTTPRoutes(node *model.Proxy, req *model.PushRequest, routeNames []string) ([]*discovery.Resource, model.XdsLogDetails)
|
||||
|
||||
+ // Added by ingress
|
||||
+ BuildScopedRoutes(node *model.Proxy, push *model.PushContext) []*route.ScopedRouteConfiguration
|
||||
+ // End added by ingress
|
||||
+
|
||||
// BuildNameTable returns list of hostnames and the associated IPs
|
||||
BuildNameTable(node *model.Proxy, push *model.PushContext) *dnsProto.NameTable
|
||||
|
||||
diff -Naur istio/pilot/pkg/networking/core/v1alpha3/gateway.go istio-new/pilot/pkg/networking/core/v1alpha3/gateway.go
|
||||
--- istio/pilot/pkg/networking/core/v1alpha3/gateway.go 2024-01-05 17:58:07.000000000 +0800
|
||||
+++ istio-new/pilot/pkg/networking/core/v1alpha3/gateway.go 2024-01-05 11:19:54.000000000 +0800
|
||||
@@ -41,7 +41,9 @@
|
||||
"istio.io/istio/pilot/pkg/networking/plugin"
|
||||
"istio.io/istio/pilot/pkg/networking/util"
|
||||
authn_model "istio.io/istio/pilot/pkg/security/model"
|
||||
+ "istio.io/istio/pilot/pkg/util/sets"
|
||||
"istio.io/istio/pkg/config"
|
||||
+ "istio.io/istio/pkg/config/constants"
|
||||
"istio.io/istio/pkg/config/gateway"
|
||||
"istio.io/istio/pkg/config/host"
|
||||
"istio.io/istio/pkg/config/protocol"
|
||||
@@ -104,10 +106,15 @@
|
||||
// We can also have QUIC on a given port along with HTTPS/TLS on a given port. It does not
|
||||
// cause port-conflict as they use different transport protocols
|
||||
opts := &buildListenerOpts{
|
||||
- push: builder.push,
|
||||
- proxy: builder.node,
|
||||
- bind: bind,
|
||||
- port: &model.Port{Port: int(port.Number)},
|
||||
+ push: builder.push,
|
||||
+ proxy: builder.node,
|
||||
+ bind: bind,
|
||||
+ port: &model.Port{
|
||||
+ Port: int(port.Number),
|
||||
+ // Added by ingress
|
||||
+ Protocol: protocol.Parse(port.Protocol),
|
||||
+ // End added by ingress
|
||||
+ },
|
||||
bindToPort: true,
|
||||
class: istionetworking.ListenerClassGateway,
|
||||
transport: transport,
|
||||
@@ -340,6 +347,269 @@
|
||||
return nameToServiceMap
|
||||
}
|
||||
|
||||
+// Added by ingress
|
||||
+func (configgen *ConfigGeneratorImpl) BuildScopedRoutes(node *model.Proxy, push *model.PushContext) []*route.ScopedRouteConfiguration {
|
||||
+ if node.MergedGateway == nil {
|
||||
+ log.Warnf("buildScopedRoutes: no gateways for router %v", node.ID)
|
||||
+ return nil
|
||||
+ }
|
||||
+ merged := node.MergedGateway
|
||||
+ var out []*route.ScopedRouteConfiguration
|
||||
+ gatewayVirtualServices := make(map[string][]config.Config)
|
||||
+ serverIterator := func(listenerPort int, mergedServers map[model.ServerPort]*model.MergedServers) sets.Set {
|
||||
+ hostSet := sets.NewSet()
|
||||
+ for port, servers := range mergedServers {
|
||||
+ if port.Number != uint32(listenerPort) {
|
||||
+ continue
|
||||
+ }
|
||||
+ for _, server := range servers.Servers {
|
||||
+ gatewayName := merged.GatewayNameForServer[server]
|
||||
+
|
||||
+ var virtualServices []config.Config
|
||||
+ var exists bool
|
||||
+
|
||||
+ if virtualServices, exists = gatewayVirtualServices[gatewayName]; !exists {
|
||||
+ virtualServices = push.VirtualServicesForGateway(node, gatewayName)
|
||||
+ gatewayVirtualServices[gatewayName] = virtualServices
|
||||
+ }
|
||||
+ for _, virtualService := range virtualServices {
|
||||
+ for _, host := range virtualService.Spec.(*networking.VirtualService).Hosts {
|
||||
+ hostSet.Insert(host)
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ return hostSet
|
||||
+ }
|
||||
+ buildPortHostScopedRoute := func(listenerPort model.ServerPort) {
|
||||
+ p := protocol.Parse(listenerPort.Protocol)
|
||||
+ if !p.IsHTTP() && p != protocol.HTTPS {
|
||||
+ return
|
||||
+ }
|
||||
+ port := strconv.Itoa(int(listenerPort.Number))
|
||||
+ hostSet := serverIterator(int(listenerPort.Number), merged.MergedServers).
|
||||
+ Union(serverIterator(int(listenerPort.Number), merged.MergedQUICTransportServers))
|
||||
+ for host, _ := range hostSet {
|
||||
+ portKey := &route.ScopedRouteConfiguration_Key_Fragment{
|
||||
+ Type: &route.ScopedRouteConfiguration_Key_Fragment_StringKey{
|
||||
+ StringKey: port,
|
||||
+ },
|
||||
+ }
|
||||
+ hostKey := &route.ScopedRouteConfiguration_Key_Fragment{
|
||||
+ Type: &route.ScopedRouteConfiguration_Key_Fragment_StringKey{
|
||||
+ StringKey: host,
|
||||
+ },
|
||||
+ }
|
||||
+ name := strings.Join([]string{port, host}, ".")
|
||||
+ out = append(out, &route.ScopedRouteConfiguration{
|
||||
+ OnDemand: features.OnDemandRDS,
|
||||
+ Name: name,
|
||||
+ RouteConfigurationName: constants.HigressHostRDSNamePrefix + name,
|
||||
+ Key: &route.ScopedRouteConfiguration_Key{
|
||||
+ Fragments: []*route.ScopedRouteConfiguration_Key_Fragment{portKey, hostKey},
|
||||
+ },
|
||||
+ })
|
||||
+ }
|
||||
+ }
|
||||
+ for _, port := range merged.ServerPorts {
|
||||
+ buildPortHostScopedRoute(port)
|
||||
+ }
|
||||
+ return out
|
||||
+}
|
||||
+
|
||||
+type virtualServiceContext struct {
|
||||
+ virtualService config.Config
|
||||
+ server *networking.Server
|
||||
+ gatewayName string
|
||||
+}
|
||||
+
|
||||
+func (configgen *ConfigGeneratorImpl) buildHostRDSConfig(node *model.Proxy, push *model.PushContext,
|
||||
+ routeName string) *route.RouteConfiguration {
|
||||
+ var (
|
||||
+ hostRDSPort string
|
||||
+ hostRDSHost string
|
||||
+ )
|
||||
+ portAndHost := strings.SplitN(strings.TrimPrefix(routeName, constants.HigressHostRDSNamePrefix), ".", 2)
|
||||
+ if len(portAndHost) != 2 {
|
||||
+ log.Errorf("Invalid route %s when using Higress hostRDS", routeName)
|
||||
+ return nil
|
||||
+ }
|
||||
+ hostRDSPort = portAndHost[0]
|
||||
+ hostRDSHost = portAndHost[1]
|
||||
+ merged := node.MergedGateway
|
||||
+ log.Debugf("buildGatewayRoutes: gateways after merging: %v", merged)
|
||||
+ rdsPort, err := strconv.Atoi(hostRDSPort)
|
||||
+ if err != nil {
|
||||
+ log.Errorf("Invalid port %s of route %s when using Higress hostRDS", hostRDSPort, routeName)
|
||||
+ return nil
|
||||
+ }
|
||||
+ listenerPort := uint32(rdsPort)
|
||||
+ globalHTTPFilters := mseingress.ExtractGlobalHTTPFilters(node, push)
|
||||
+
|
||||
+ isH3DiscoveryNeeded := false
|
||||
+
|
||||
+ // When this is true, we add alt-svc header to the response to tell the client
|
||||
+ // that HTTP/3 over QUIC is available on the same port for this host. This is
|
||||
+ // very important for discovering HTTP/3 services
|
||||
+ for port, servers := range merged.MergedQUICTransportServers {
|
||||
+ if port.Number == listenerPort && len(servers.Servers) > 0 {
|
||||
+ isH3DiscoveryNeeded = true
|
||||
+ break
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ gatewayRoutes := make(map[string]map[string][]*route.Route)
|
||||
+ gatewayVirtualServices := make(map[string][]config.Config)
|
||||
+ var selectedVirtualServices []virtualServiceContext
|
||||
+ var vHost *route.VirtualHost
|
||||
+ serverIterator := func(mergedServers map[model.ServerPort]*model.MergedServers) {
|
||||
+ for port, servers := range mergedServers {
|
||||
+ if port.Number != listenerPort {
|
||||
+ continue
|
||||
+ }
|
||||
+ for _, server := range servers.Servers {
|
||||
+ gatewayName := merged.GatewayNameForServer[server]
|
||||
+
|
||||
+ var virtualServices []config.Config
|
||||
+ var exists bool
|
||||
+
|
||||
+ if virtualServices, exists = gatewayVirtualServices[gatewayName]; !exists {
|
||||
+ virtualServices = push.VirtualServicesForGateway(node, gatewayName)
|
||||
+ gatewayVirtualServices[gatewayName] = virtualServices
|
||||
+ }
|
||||
+ for _, virtualService := range virtualServices {
|
||||
+ hostMatch := false
|
||||
+ var selectHost string
|
||||
+ virtualServiceHosts := host.NewNames(virtualService.Spec.(*networking.VirtualService).Hosts)
|
||||
+ for _, hostname := range virtualServiceHosts {
|
||||
+ // exact match
|
||||
+ if hostname == host.Name(hostRDSHost) {
|
||||
+ hostMatch = true
|
||||
+ selectHost = hostRDSHost
|
||||
+ break
|
||||
+ }
|
||||
+ if features.HostRDSMergeSubset {
|
||||
+ // subset match
|
||||
+ if host.Name(hostRDSHost).SubsetOf(hostname) {
|
||||
+ hostMatch = true
|
||||
+ selectHost = string(hostname)
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ if !hostMatch {
|
||||
+ continue
|
||||
+ }
|
||||
+ copiedVS := virtualService.DeepCopy()
|
||||
+ copiedVS.Spec.(*networking.VirtualService).Hosts = []string{selectHost}
|
||||
+ selectedVirtualServices = append(selectedVirtualServices, virtualServiceContext{
|
||||
+ virtualService: copiedVS,
|
||||
+ server: server,
|
||||
+ gatewayName: gatewayName,
|
||||
+ })
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ serverIterator(merged.MergedServers)
|
||||
+ serverIterator(merged.MergedQUICTransportServers)
|
||||
+ // Sort by subset
|
||||
+ // before: ["*.abc.com", "*.com", "www.abc.com"]
|
||||
+ // after: ["www.abc.com", "*.abc.com", "*.com"]
|
||||
+ sort.SliceStable(selectedVirtualServices, func(i, j int) bool {
|
||||
+ return host.Name(selectedVirtualServices[i].virtualService.Spec.(*networking.VirtualService).Hosts[0]).SubsetOf(
|
||||
+ host.Name(selectedVirtualServices[j].virtualService.Spec.(*networking.VirtualService).Hosts[0]))
|
||||
+ })
|
||||
+ port := int(listenerPort)
|
||||
+ for _, ctx := range selectedVirtualServices {
|
||||
+ virtualService := ctx.virtualService
|
||||
+ server := ctx.server
|
||||
+ gatewayName := ctx.gatewayName
|
||||
+ // Make sure we can obtain services which are visible to this virtualService as much as possible.
|
||||
+ nameToServiceMap := buildNameToServiceMapForHTTPRoutes(node, push, virtualService)
|
||||
+
|
||||
+ var routes []*route.Route
|
||||
+ var exists bool
|
||||
+ var err error
|
||||
+ if _, exists = gatewayRoutes[gatewayName]; !exists {
|
||||
+ gatewayRoutes[gatewayName] = make(map[string][]*route.Route)
|
||||
+ }
|
||||
+
|
||||
+ vskey := virtualService.Name + "/" + virtualService.Namespace
|
||||
+
|
||||
+ if routes, exists = gatewayRoutes[gatewayName][vskey]; !exists {
|
||||
+ hashByDestination := istio_route.GetConsistentHashForVirtualService(push, node, virtualService, nameToServiceMap)
|
||||
+ routes, err = istio_route.BuildHTTPRoutesForVirtualServiceWithHTTPFilters(node, virtualService, nameToServiceMap,
|
||||
+ hashByDestination, port, map[string]bool{gatewayName: true}, isH3DiscoveryNeeded, push.Mesh, globalHTTPFilters)
|
||||
+ if err != nil {
|
||||
+ log.Debugf("%s omitting routes for virtual service %v/%v due to error: %v", node.ID, virtualService.Namespace, virtualService.Name, err)
|
||||
+ continue
|
||||
+ }
|
||||
+ gatewayRoutes[gatewayName][vskey] = routes
|
||||
+ }
|
||||
+
|
||||
+ if vHost != nil {
|
||||
+ vHost.Routes = append(vHost.Routes, routes...)
|
||||
+ if server.Tls != nil && server.Tls.HttpsRedirect {
|
||||
+ vHost.RequireTls = route.VirtualHost_ALL
|
||||
+ }
|
||||
+ } else {
|
||||
+ vHost = &route.VirtualHost{
|
||||
+ Name: util.DomainName(hostRDSHost, port),
|
||||
+ Domains: buildGatewayVirtualHostDomains(hostRDSHost, port),
|
||||
+ Routes: routes,
|
||||
+ IncludeRequestAttemptCount: true,
|
||||
+ TypedPerFilterConfig: mseingress.ConstructTypedPerFilterConfigForVHost(globalHTTPFilters, virtualService),
|
||||
+ }
|
||||
+ if server.Tls != nil && server.Tls.HttpsRedirect {
|
||||
+ vHost.RequireTls = route.VirtualHost_ALL
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ // check all hostname if is not exist with HttpsRedirect set to true
|
||||
+ // create VirtualHost to redirect
|
||||
+ for _, hostname := range server.Hosts {
|
||||
+ if !server.GetTls().GetHttpsRedirect() {
|
||||
+ continue
|
||||
+ }
|
||||
+ if vHost != nil && host.Name(hostname) == host.Name(hostRDSHost) {
|
||||
+ vHost.RequireTls = route.VirtualHost_ALL
|
||||
+ continue
|
||||
+ }
|
||||
+ vHost = &route.VirtualHost{
|
||||
+ Name: util.DomainName(hostname, port),
|
||||
+ Domains: buildGatewayVirtualHostDomains(hostname, port),
|
||||
+ IncludeRequestAttemptCount: true,
|
||||
+ RequireTls: route.VirtualHost_ALL,
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ }
|
||||
+ var virtualHosts []*route.VirtualHost
|
||||
+ if vHost == nil {
|
||||
+ log.Warnf("constructed http route config for route %s on port %d with no vhosts; Setting up a default 404 vhost", routeName, port)
|
||||
+ virtualHosts = []*route.VirtualHost{{
|
||||
+ Name: util.DomainName("blackhole", port),
|
||||
+ Domains: []string{"*"},
|
||||
+ // Empty route list will cause Envoy to 404 NR any requests
|
||||
+ Routes: []*route.Route{},
|
||||
+ }}
|
||||
+ } else {
|
||||
+ vHost.Routes = istio_route.CombineVHostRoutes(vHost.Routes)
|
||||
+ virtualHosts = append(virtualHosts, vHost)
|
||||
+ }
|
||||
+
|
||||
+ routeCfg := &route.RouteConfiguration{
|
||||
+ // Retain the routeName as its used by EnvoyFilter patching logic
|
||||
+ Name: routeName,
|
||||
+ VirtualHosts: virtualHosts,
|
||||
+ ValidateClusters: proto.BoolFalse,
|
||||
+ }
|
||||
+
|
||||
+ return routeCfg
|
||||
+}
|
||||
+
|
||||
+// End added by ingress
|
||||
+
|
||||
func (configgen *ConfigGeneratorImpl) buildGatewayHTTPRouteConfig(node *model.Proxy, push *model.PushContext,
|
||||
routeName string) *route.RouteConfiguration {
|
||||
if node.MergedGateway == nil {
|
||||
@@ -351,6 +621,12 @@
|
||||
}
|
||||
}
|
||||
|
||||
+ // Added by ingress
|
||||
+ if strings.HasPrefix(routeName, constants.HigressHostRDSNamePrefix) {
|
||||
+ return configgen.buildHostRDSConfig(node, push, routeName)
|
||||
+ }
|
||||
+ // End added by ingress
|
||||
+
|
||||
merged := node.MergedGateway
|
||||
log.Debugf("buildGatewayRoutes: gateways after merging: %v", merged)
|
||||
|
||||
@@ -670,7 +946,9 @@
|
||||
// TLS mode | Mesh-wide SDS | Ingress SDS | Resulting Configuration
|
||||
// SIMPLE/MUTUAL | ENABLED | ENABLED | support SDS at ingress gateway to terminate SSL communication outside the mesh
|
||||
// ISTIO_MUTUAL | ENABLED | DISABLED | support SDS at gateway to terminate workload mTLS, with internal workloads
|
||||
-// | for egress or with another trusted cluster for ingress)
|
||||
+//
|
||||
+// | for egress or with another trusted cluster for ingress)
|
||||
+//
|
||||
// ISTIO_MUTUAL | DISABLED | DISABLED | use file-mounted secret paths to terminate workload mTLS from gateway
|
||||
//
|
||||
// Note that ISTIO_MUTUAL TLS mode and ingressSds should not be used simultaneously on the same ingress gateway.
|
||||
diff -Naur istio/pilot/pkg/networking/core/v1alpha3/listener.go istio-new/pilot/pkg/networking/core/v1alpha3/listener.go
|
||||
--- istio/pilot/pkg/networking/core/v1alpha3/listener.go 2024-01-05 17:58:07.000000000 +0800
|
||||
+++ istio-new/pilot/pkg/networking/core/v1alpha3/listener.go 2024-01-05 17:31:10.000000000 +0800
|
||||
@@ -1279,8 +1279,48 @@
|
||||
|
||||
notimeout := durationpb.New(0 * time.Second)
|
||||
connectionManager.StreamIdleTimeout = notimeout
|
||||
-
|
||||
- if httpOpts.rds != "" {
|
||||
+ // Added by ingress
|
||||
+ enableSRDS := false
|
||||
+ if features.EnableScopedRDS &&
|
||||
+ (listenerOpts.port.Protocol.IsHTTP() || (listenerOpts.port.Protocol == protocol.HTTPS)) {
|
||||
+ enableSRDS = true
|
||||
+ portFragment := &hcm.ScopedRoutes_ScopeKeyBuilder_FragmentBuilder{
|
||||
+ Type: &hcm.ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_LocalPortValueExtractor_{
|
||||
+ LocalPortValueExtractor: &hcm.ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_LocalPortValueExtractor{},
|
||||
+ }}
|
||||
+ hostFragment := &hcm.ScopedRoutes_ScopeKeyBuilder_FragmentBuilder{
|
||||
+ Type: &hcm.ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HostValueExtractor_{
|
||||
+ HostValueExtractor: &hcm.ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HostValueExtractor{},
|
||||
+ }}
|
||||
+ scopedRoutes := &hcm.HttpConnectionManager_ScopedRoutes{
|
||||
+ ScopedRoutes: &hcm.ScopedRoutes{
|
||||
+ Name: constants.DefaultScopedRouteName,
|
||||
+ ScopeKeyBuilder: &hcm.ScopedRoutes_ScopeKeyBuilder{
|
||||
+ Fragments: []*hcm.ScopedRoutes_ScopeKeyBuilder_FragmentBuilder{portFragment, hostFragment},
|
||||
+ },
|
||||
+ RdsConfigSource: &core.ConfigSource{
|
||||
+ ConfigSourceSpecifier: &core.ConfigSource_Ads{
|
||||
+ Ads: &core.AggregatedConfigSource{},
|
||||
+ },
|
||||
+ InitialFetchTimeout: durationpb.New(0),
|
||||
+ ResourceApiVersion: core.ApiVersion_V3,
|
||||
+ },
|
||||
+ ConfigSpecifier: &hcm.ScopedRoutes_ScopedRds{
|
||||
+ ScopedRds: &hcm.ScopedRds{
|
||||
+ ScopedRdsConfigSource: &core.ConfigSource{
|
||||
+ ConfigSourceSpecifier: &core.ConfigSource_Ads{
|
||||
+ Ads: &core.AggregatedConfigSource{},
|
||||
+ },
|
||||
+ InitialFetchTimeout: durationpb.New(0),
|
||||
+ ResourceApiVersion: core.ApiVersion_V3,
|
||||
+ },
|
||||
+ },
|
||||
+ },
|
||||
+ },
|
||||
+ }
|
||||
+ connectionManager.RouteSpecifier = scopedRoutes
|
||||
+ } else if httpOpts.rds != "" {
|
||||
+ // End added by ingress
|
||||
rds := &hcm.HttpConnectionManager_Rds{
|
||||
Rds: &hcm.Rds{
|
||||
ConfigSource: &core.ConfigSource{
|
||||
@@ -1304,8 +1344,15 @@
|
||||
|
||||
filters := make([]*hcm.HttpFilter, len(httpFilters))
|
||||
copy(filters, httpFilters)
|
||||
- // Make sure cors filter always in the first.
|
||||
- filters = append([]*hcm.HttpFilter{xdsfilters.Cors}, filters...)
|
||||
+ // Added by ingress
|
||||
+ // Now only support onDemandRDS when enable SRDS
|
||||
+ if features.OnDemandRDS && enableSRDS {
|
||||
+ filters = append([]*hcm.HttpFilter{xdsfilters.OnDemand, xdsfilters.Cors}, filters...)
|
||||
+ } else {
|
||||
+ // End added by ingress
|
||||
+ // Make sure cors filter always in the first.
|
||||
+ filters = append([]*hcm.HttpFilter{xdsfilters.Cors}, filters...)
|
||||
+ }
|
||||
|
||||
if features.MetadataExchange {
|
||||
filters = append(filters, xdsfilters.HTTPMx)
|
||||
diff -Naur istio/pilot/pkg/xds/ads.go istio-new/pilot/pkg/xds/ads.go
|
||||
--- istio/pilot/pkg/xds/ads.go 2024-01-05 17:58:08.000000000 +0800
|
||||
+++ istio-new/pilot/pkg/xds/ads.go 2024-01-05 17:31:44.000000000 +0800
|
||||
@@ -797,15 +797,18 @@
|
||||
|
||||
// PushOrder defines the order that updates will be pushed in. Any types not listed here will be pushed in random
|
||||
// order after the types listed here
|
||||
-var PushOrder = []string{v3.ClusterType, v3.EndpointType, v3.ListenerType, v3.RouteType, v3.SecretType}
|
||||
+var PushOrder = []string{v3.ClusterType, v3.EndpointType, v3.ListenerType, v3.ScopedRouteType, v3.RouteType, v3.SecretType}
|
||||
|
||||
// KnownOrderedTypeUrls has typeUrls for which we know the order of push.
|
||||
var KnownOrderedTypeUrls = map[string]struct{}{
|
||||
v3.ClusterType: {},
|
||||
v3.EndpointType: {},
|
||||
v3.ListenerType: {},
|
||||
- v3.RouteType: {},
|
||||
- v3.SecretType: {},
|
||||
+ // Added by ingress
|
||||
+ v3.ScopedRouteType: {},
|
||||
+ // End added by ingress
|
||||
+ v3.RouteType: {},
|
||||
+ v3.SecretType: {},
|
||||
}
|
||||
|
||||
// orderWatchedResources orders the resources in accordance with known push order.
|
||||
diff -Naur istio/pilot/pkg/xds/discovery.go istio-new/pilot/pkg/xds/discovery.go
|
||||
--- istio/pilot/pkg/xds/discovery.go 2024-01-05 17:58:07.000000000 +0800
|
||||
+++ istio-new/pilot/pkg/xds/discovery.go 2024-01-04 21:20:00.000000000 +0800
|
||||
@@ -589,6 +589,9 @@
|
||||
s.Generators[v3.ClusterType] = &CdsGenerator{Server: s}
|
||||
s.Generators[v3.ListenerType] = &LdsGenerator{Server: s}
|
||||
s.Generators[v3.RouteType] = &RdsGenerator{Server: s}
|
||||
+ // Added by ingress
|
||||
+ s.Generators[v3.ScopedRouteType] = &SrdsGenerator{Server: s}
|
||||
+ // End added by ingress
|
||||
s.Generators[v3.EndpointType] = edsGen
|
||||
s.Generators[v3.NameTableType] = &NdsGenerator{Server: s}
|
||||
s.Generators[v3.ExtensionConfigurationType] = &EcdsGenerator{Server: s}
|
||||
diff -Naur istio/pilot/pkg/xds/filters/filters.go istio-new/pilot/pkg/xds/filters/filters.go
|
||||
--- istio/pilot/pkg/xds/filters/filters.go 2024-01-05 17:58:03.000000000 +0800
|
||||
+++ istio-new/pilot/pkg/xds/filters/filters.go 2024-01-04 21:20:00.000000000 +0800
|
||||
@@ -21,6 +21,7 @@
|
||||
fault "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/fault/v3"
|
||||
grpcstats "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/grpc_stats/v3"
|
||||
grpcweb "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/grpc_web/v3"
|
||||
+ ondemand "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/on_demand/v3"
|
||||
router "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/router/v3"
|
||||
httpwasm "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/wasm/v3"
|
||||
httpinspector "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/listener/http_inspector/v3"
|
||||
@@ -54,6 +55,14 @@
|
||||
// Define static filters to be reused across the codebase. This avoids duplicate marshaling/unmarshaling
|
||||
// This should not be used for filters that will be mutated
|
||||
var (
|
||||
+ // Added by ingress
|
||||
+ OnDemand = &hcm.HttpFilter{
|
||||
+ Name: "envoy.filters.http.on_demand.v3.OnDemand",
|
||||
+ ConfigType: &hcm.HttpFilter_TypedConfig{
|
||||
+ TypedConfig: util.MessageToAny(&ondemand.OnDemand{}),
|
||||
+ },
|
||||
+ }
|
||||
+ // End added by ingress
|
||||
Cors = &hcm.HttpFilter{
|
||||
Name: wellknown.CORS,
|
||||
ConfigType: &hcm.HttpFilter_TypedConfig{
|
||||
diff -Naur istio/pilot/pkg/xds/srds.go istio-new/pilot/pkg/xds/srds.go
|
||||
--- istio/pilot/pkg/xds/srds.go 1970-01-01 08:00:00.000000000 +0800
|
||||
+++ istio-new/pilot/pkg/xds/srds.go 2024-01-05 13:45:49.000000000 +0800
|
||||
@@ -0,0 +1,79 @@
|
||||
+// Copyright Istio Authors
|
||||
+//
|
||||
+// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
+// you may not use this file except in compliance with the License.
|
||||
+// You may obtain a copy of the License at
|
||||
+//
|
||||
+// http://www.apache.org/licenses/LICENSE-2.0
|
||||
+//
|
||||
+// Unless required by applicable law or agreed to in writing, software
|
||||
+// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
+// See the License for the specific language governing permissions and
|
||||
+// limitations under the License.
|
||||
+
|
||||
+package xds
|
||||
+
|
||||
+import (
|
||||
+ discovery "github.com/envoyproxy/go-control-plane/envoy/service/discovery/v3"
|
||||
+ "istio.io/istio/pilot/pkg/features"
|
||||
+ "istio.io/istio/pilot/pkg/model"
|
||||
+ "istio.io/istio/pilot/pkg/networking/util"
|
||||
+ "istio.io/istio/pkg/config"
|
||||
+ "istio.io/istio/pkg/config/schema/gvk"
|
||||
+)
|
||||
+
|
||||
+type SrdsGenerator struct {
|
||||
+ Server *DiscoveryServer
|
||||
+}
|
||||
+
|
||||
+var _ model.XdsResourceGenerator = &SrdsGenerator{}
|
||||
+
|
||||
+// Map of all configs that do not impact SRDS
|
||||
+var skippedSrdsConfigs = map[config.GroupVersionKind]struct{}{
|
||||
+ gvk.WorkloadEntry: {},
|
||||
+ gvk.WorkloadGroup: {},
|
||||
+ gvk.RequestAuthentication: {},
|
||||
+ gvk.PeerAuthentication: {},
|
||||
+ gvk.Secret: {},
|
||||
+}
|
||||
+
|
||||
+func srdsNeedsPush(req *model.PushRequest) bool {
|
||||
+ if !features.EnableScopedRDS {
|
||||
+ return false
|
||||
+ }
|
||||
+ if req == nil {
|
||||
+ return true
|
||||
+ }
|
||||
+ if !req.Full {
|
||||
+ // SRDS only handles full push
|
||||
+ return false
|
||||
+ }
|
||||
+ // If none set, we will always push
|
||||
+ if len(req.ConfigsUpdated) == 0 {
|
||||
+ return true
|
||||
+ }
|
||||
+ for config := range req.ConfigsUpdated {
|
||||
+ if _, f := skippedSrdsConfigs[config.Kind]; !f {
|
||||
+ return true
|
||||
+ }
|
||||
+ }
|
||||
+ return false
|
||||
+}
|
||||
+
|
||||
+func (s SrdsGenerator) Generate(proxy *model.Proxy, push *model.PushContext, w *model.WatchedResource,
|
||||
+ req *model.PushRequest) (model.Resources, model.XdsLogDetails, error) {
|
||||
+ if !srdsNeedsPush(req) {
|
||||
+ return nil, model.DefaultXdsLogDetails, nil
|
||||
+ }
|
||||
+
|
||||
+ scopedRoutes := s.Server.ConfigGenerator.BuildScopedRoutes(proxy, push)
|
||||
+ resources := model.Resources{}
|
||||
+ for _, sr := range scopedRoutes {
|
||||
+ resources = append(resources, &discovery.Resource{
|
||||
+ Name: sr.Name,
|
||||
+ Resource: util.MessageToAny(sr),
|
||||
+ })
|
||||
+ }
|
||||
+ return resources, model.DefaultXdsLogDetails, nil
|
||||
+}
|
||||
diff -Naur istio/pilot/pkg/xds/v3/model.go istio-new/pilot/pkg/xds/v3/model.go
|
||||
--- istio/pilot/pkg/xds/v3/model.go 2024-01-05 17:58:03.000000000 +0800
|
||||
+++ istio-new/pilot/pkg/xds/v3/model.go 2024-01-05 16:55:49.000000000 +0800
|
||||
@@ -31,6 +31,10 @@
|
||||
SecretType = resource.SecretType
|
||||
ExtensionConfigurationType = resource.ExtensionConfigType
|
||||
|
||||
+ // Added by ingress
|
||||
+ ScopedRouteType = apiTypePrefix + "envoy.config.route.v3.ScopedRouteConfiguration"
|
||||
+ // End added by ingress
|
||||
+
|
||||
NameTableType = apiTypePrefix + "istio.networking.nds.v1.NameTable"
|
||||
HealthInfoType = apiTypePrefix + "istio.v1.HealthInformation"
|
||||
ProxyConfigType = apiTypePrefix + "istio.mesh.v1alpha1.ProxyConfig"
|
||||
@@ -61,6 +65,10 @@
|
||||
return "PCDS"
|
||||
case ExtensionConfigurationType:
|
||||
return "ECDS"
|
||||
+ // Added by ingress
|
||||
+ case ScopedRouteType:
|
||||
+ return "SRDS"
|
||||
+ // End added by ingress
|
||||
default:
|
||||
return typeURL
|
||||
}
|
||||
@@ -87,6 +95,10 @@
|
||||
return "ecds"
|
||||
case BootstrapType:
|
||||
return "bds"
|
||||
+ // Added by ingress
|
||||
+ case ScopedRouteType:
|
||||
+ return "srds"
|
||||
+ // End added by ingress
|
||||
default:
|
||||
return typeURL
|
||||
}
|
||||
diff -Naur istio/pkg/config/constants/constants.go istio-new/pkg/config/constants/constants.go
|
||||
--- istio/pkg/config/constants/constants.go 2024-01-05 17:58:08.000000000 +0800
|
||||
+++ istio-new/pkg/config/constants/constants.go 2024-01-04 21:20:00.000000000 +0800
|
||||
@@ -143,4 +143,9 @@
|
||||
// CertProviderNone does not create any certificates for the control plane. It is assumed that some external
|
||||
// load balancer, such as an Istio Gateway, is terminating the TLS.
|
||||
CertProviderNone = "none"
|
||||
+
|
||||
+ // Added by ingress
|
||||
+ HigressHostRDSNamePrefix = "higress-rds-"
|
||||
+ DefaultScopedRouteName = "scoped-route"
|
||||
+ // End added by ingress
|
||||
)
|
||||
373
istio/1.12/patches/istio/20240115-optimize-rds-cache.patch
Normal file
373
istio/1.12/patches/istio/20240115-optimize-rds-cache.patch
Normal file
@@ -0,0 +1,373 @@
|
||||
diff -Naur istio/pilot/pkg/model/push_context.go istio-new/pilot/pkg/model/push_context.go
|
||||
--- istio/pilot/pkg/model/push_context.go 2024-01-15 20:46:45.000000000 +0800
|
||||
+++ istio-new/pilot/pkg/model/push_context.go 2024-01-15 19:20:45.000000000 +0800
|
||||
@@ -96,6 +96,9 @@
|
||||
publicByGateway map[string][]config.Config
|
||||
// root vs namespace/name ->delegate vs virtualservice gvk/namespace/name
|
||||
delegates map[ConfigKey][]ConfigKey
|
||||
+ // Added by ingress
|
||||
+ byHost map[string][]config.Config
|
||||
+ // End added by ingress
|
||||
}
|
||||
|
||||
func newVirtualServiceIndex() virtualServiceIndex {
|
||||
@@ -104,6 +107,9 @@
|
||||
privateByNamespaceAndGateway: map[string]map[string][]config.Config{},
|
||||
exportedToNamespaceByGateway: map[string]map[string][]config.Config{},
|
||||
delegates: map[ConfigKey][]ConfigKey{},
|
||||
+ // Added by ingress
|
||||
+ byHost: map[string][]config.Config{},
|
||||
+ // End added by ingress
|
||||
}
|
||||
}
|
||||
|
||||
@@ -857,6 +863,13 @@
|
||||
return res
|
||||
}
|
||||
|
||||
+// Added by ingress
|
||||
+func (ps *PushContext) VirtualServicesForHost(proxy *Proxy, host string) []config.Config {
|
||||
+ return ps.virtualServiceIndex.byHost[host]
|
||||
+}
|
||||
+
|
||||
+// End added by ingress
|
||||
+
|
||||
// DelegateVirtualServicesConfigKey lists all the delegate virtual services configkeys associated with the provided virtual services
|
||||
func (ps *PushContext) DelegateVirtualServicesConfigKey(vses []config.Config) []ConfigKey {
|
||||
var out []ConfigKey
|
||||
@@ -1468,6 +1481,11 @@
|
||||
for _, virtualService := range vservices {
|
||||
ns := virtualService.Namespace
|
||||
rule := virtualService.Spec.(*networking.VirtualService)
|
||||
+ // Added by ingress
|
||||
+ for _, host := range rule.Hosts {
|
||||
+ ps.virtualServiceIndex.byHost[host] = append(ps.virtualServiceIndex.byHost[host], virtualService)
|
||||
+ }
|
||||
+ // End added by ingress
|
||||
gwNames := getGatewayNames(rule)
|
||||
if len(rule.ExportTo) == 0 {
|
||||
// No exportTo in virtualService. Use the global default
|
||||
diff -Naur istio/pilot/pkg/networking/core/v1alpha3/gateway.go istio-new/pilot/pkg/networking/core/v1alpha3/gateway.go
|
||||
--- istio/pilot/pkg/networking/core/v1alpha3/gateway.go 2024-01-15 20:46:45.000000000 +0800
|
||||
+++ istio-new/pilot/pkg/networking/core/v1alpha3/gateway.go 2024-01-15 20:04:05.000000000 +0800
|
||||
@@ -28,6 +28,7 @@
|
||||
route "github.com/envoyproxy/go-control-plane/envoy/config/route/v3"
|
||||
hcm "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/network/http_connection_manager/v3"
|
||||
tls "github.com/envoyproxy/go-control-plane/envoy/extensions/transport_sockets/tls/v3"
|
||||
+ discovery "github.com/envoyproxy/go-control-plane/envoy/service/discovery/v3"
|
||||
"github.com/hashicorp/go-multierror"
|
||||
|
||||
meshconfig "istio.io/api/mesh/v1alpha1"
|
||||
@@ -35,6 +36,7 @@
|
||||
"istio.io/istio/pilot/pkg/features"
|
||||
"istio.io/istio/pilot/pkg/model"
|
||||
istionetworking "istio.io/istio/pilot/pkg/networking"
|
||||
+ "istio.io/istio/pilot/pkg/networking/core/v1alpha3/envoyfilter"
|
||||
"istio.io/istio/pilot/pkg/networking/core/v1alpha3/extension"
|
||||
"istio.io/istio/pilot/pkg/networking/core/v1alpha3/mseingress"
|
||||
istio_route "istio.io/istio/pilot/pkg/networking/core/v1alpha3/route"
|
||||
@@ -423,8 +425,15 @@
|
||||
gatewayName string
|
||||
}
|
||||
|
||||
-func (configgen *ConfigGeneratorImpl) buildHostRDSConfig(node *model.Proxy, push *model.PushContext,
|
||||
- routeName string) *route.RouteConfiguration {
|
||||
+func (configgen *ConfigGeneratorImpl) buildHostRDSConfig(
|
||||
+ node *model.Proxy,
|
||||
+ req *model.PushRequest,
|
||||
+ routeName string,
|
||||
+ vsCache map[int][]virtualServiceContext,
|
||||
+ efw *model.EnvoyFilterWrapper,
|
||||
+ efKeys []string,
|
||||
+) (*discovery.Resource, bool) {
|
||||
+ push := req.Push
|
||||
var (
|
||||
hostRDSPort string
|
||||
hostRDSHost string
|
||||
@@ -432,7 +441,7 @@
|
||||
portAndHost := strings.SplitN(strings.TrimPrefix(routeName, constants.HigressHostRDSNamePrefix), ".", 2)
|
||||
if len(portAndHost) != 2 {
|
||||
log.Errorf("Invalid route %s when using Higress hostRDS", routeName)
|
||||
- return nil
|
||||
+ return nil, false
|
||||
}
|
||||
hostRDSPort = portAndHost[0]
|
||||
hostRDSHost = portAndHost[1]
|
||||
@@ -441,10 +450,24 @@
|
||||
rdsPort, err := strconv.Atoi(hostRDSPort)
|
||||
if err != nil {
|
||||
log.Errorf("Invalid port %s of route %s when using Higress hostRDS", hostRDSPort, routeName)
|
||||
- return nil
|
||||
+ return nil, false
|
||||
+ }
|
||||
+
|
||||
+ routeCache := &istio_route.Cache{
|
||||
+ RouteName: routeName,
|
||||
+ ProxyVersion: node.Metadata.IstioVersion,
|
||||
+ ListenerPort: rdsPort,
|
||||
+ // Use same host vs to cache, although the cache can be cleared when the port is different, this can be accepted
|
||||
+ VirtualServices: push.VirtualServicesForHost(node, hostRDSHost),
|
||||
+ EnvoyFilterKeys: efKeys,
|
||||
+ }
|
||||
+
|
||||
+ resource, exist := configgen.Cache.Get(routeCache)
|
||||
+ if exist {
|
||||
+ return resource, true
|
||||
}
|
||||
+
|
||||
listenerPort := uint32(rdsPort)
|
||||
- globalHTTPFilters := mseingress.ExtractGlobalHTTPFilters(node, push)
|
||||
|
||||
isH3DiscoveryNeeded := false
|
||||
|
||||
@@ -457,9 +480,9 @@
|
||||
break
|
||||
}
|
||||
}
|
||||
-
|
||||
gatewayRoutes := make(map[string]map[string][]*route.Route)
|
||||
gatewayVirtualServices := make(map[string][]config.Config)
|
||||
+ var listenerVirtualServices []virtualServiceContext
|
||||
var selectedVirtualServices []virtualServiceContext
|
||||
var vHost *route.VirtualHost
|
||||
serverIterator := func(mergedServers map[model.ServerPort]*model.MergedServers) {
|
||||
@@ -478,31 +501,8 @@
|
||||
gatewayVirtualServices[gatewayName] = virtualServices
|
||||
}
|
||||
for _, virtualService := range virtualServices {
|
||||
- hostMatch := false
|
||||
- var selectHost string
|
||||
- virtualServiceHosts := host.NewNames(virtualService.Spec.(*networking.VirtualService).Hosts)
|
||||
- for _, hostname := range virtualServiceHosts {
|
||||
- // exact match
|
||||
- if hostname == host.Name(hostRDSHost) {
|
||||
- hostMatch = true
|
||||
- selectHost = hostRDSHost
|
||||
- break
|
||||
- }
|
||||
- if features.HostRDSMergeSubset {
|
||||
- // subset match
|
||||
- if host.Name(hostRDSHost).SubsetOf(hostname) {
|
||||
- hostMatch = true
|
||||
- selectHost = string(hostname)
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
- if !hostMatch {
|
||||
- continue
|
||||
- }
|
||||
- copiedVS := virtualService.DeepCopy()
|
||||
- copiedVS.Spec.(*networking.VirtualService).Hosts = []string{selectHost}
|
||||
- selectedVirtualServices = append(selectedVirtualServices, virtualServiceContext{
|
||||
- virtualService: copiedVS,
|
||||
+ listenerVirtualServices = append(listenerVirtualServices, virtualServiceContext{
|
||||
+ virtualService: virtualService,
|
||||
server: server,
|
||||
gatewayName: gatewayName,
|
||||
})
|
||||
@@ -510,15 +510,63 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
- serverIterator(merged.MergedServers)
|
||||
- serverIterator(merged.MergedQUICTransportServers)
|
||||
- // Sort by subset
|
||||
- // before: ["*.abc.com", "*.com", "www.abc.com"]
|
||||
- // after: ["www.abc.com", "*.abc.com", "*.com"]
|
||||
- sort.SliceStable(selectedVirtualServices, func(i, j int) bool {
|
||||
- return host.Name(selectedVirtualServices[i].virtualService.Spec.(*networking.VirtualService).Hosts[0]).SubsetOf(
|
||||
- host.Name(selectedVirtualServices[j].virtualService.Spec.(*networking.VirtualService).Hosts[0]))
|
||||
- })
|
||||
+ var vsExists bool
|
||||
+ if listenerVirtualServices, vsExists = vsCache[rdsPort]; !vsExists {
|
||||
+ serverIterator(merged.MergedServers)
|
||||
+ serverIterator(merged.MergedQUICTransportServers)
|
||||
+ vsCache[rdsPort] = listenerVirtualServices
|
||||
+ }
|
||||
+ for _, vsCtx := range listenerVirtualServices {
|
||||
+ virtualService := vsCtx.virtualService
|
||||
+ hostMatch := false
|
||||
+ var selectHost string
|
||||
+ for _, hostname := range virtualService.Spec.(*networking.VirtualService).Hosts {
|
||||
+ // exact match
|
||||
+ if hostname == hostRDSHost {
|
||||
+ hostMatch = true
|
||||
+ selectHost = hostRDSHost
|
||||
+ break
|
||||
+ }
|
||||
+ if features.HostRDSMergeSubset {
|
||||
+ // subset match
|
||||
+ if host.Name(hostRDSHost).SubsetOf(host.Name(hostname)) {
|
||||
+ hostMatch = true
|
||||
+ selectHost = hostname
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ if !hostMatch {
|
||||
+ continue
|
||||
+ }
|
||||
+ if len(virtualService.Spec.(*networking.VirtualService).Hosts) > 1 {
|
||||
+ copiedVS := &networking.VirtualService{}
|
||||
+ copiedVS = virtualService.Spec.(*networking.VirtualService)
|
||||
+ copiedVS.Hosts = []string{selectHost}
|
||||
+ selectedVirtualServices = append(selectedVirtualServices, virtualServiceContext{
|
||||
+ virtualService: config.Config{
|
||||
+ Meta: virtualService.Meta,
|
||||
+ Spec: copiedVS,
|
||||
+ Status: virtualService.Status,
|
||||
+ },
|
||||
+ server: vsCtx.server,
|
||||
+ gatewayName: vsCtx.gatewayName,
|
||||
+ })
|
||||
+ } else {
|
||||
+ selectedVirtualServices = append(selectedVirtualServices, vsCtx)
|
||||
+ }
|
||||
+ }
|
||||
+ if features.HostRDSMergeSubset {
|
||||
+ // Sort by subset
|
||||
+ // before: ["*.abc.com", "*.com", "www.abc.com"]
|
||||
+ // after: ["www.abc.com", "*.abc.com", "*.com"]
|
||||
+ sort.SliceStable(selectedVirtualServices, func(i, j int) bool {
|
||||
+ return host.Name(selectedVirtualServices[i].virtualService.Spec.(*networking.VirtualService).Hosts[0]).SubsetOf(
|
||||
+ host.Name(selectedVirtualServices[j].virtualService.Spec.(*networking.VirtualService).Hosts[0]))
|
||||
+ })
|
||||
+ }
|
||||
+
|
||||
+ globalHTTPFilters := mseingress.ExtractGlobalHTTPFilters(node, push)
|
||||
+
|
||||
port := int(listenerPort)
|
||||
for _, ctx := range selectedVirtualServices {
|
||||
virtualService := ctx.virtualService
|
||||
@@ -605,25 +653,42 @@
|
||||
ValidateClusters: proto.BoolFalse,
|
||||
}
|
||||
|
||||
- return routeCfg
|
||||
+ routeCfg = envoyfilter.ApplyRouteConfigurationPatches(networking.EnvoyFilter_GATEWAY, node, efw, routeCfg)
|
||||
+ resource = &discovery.Resource{
|
||||
+ Name: routeName,
|
||||
+ Resource: util.MessageToAny(routeCfg),
|
||||
+ }
|
||||
+
|
||||
+ if features.EnableRDSCaching {
|
||||
+ configgen.Cache.Add(routeCache, req, resource)
|
||||
+ }
|
||||
+
|
||||
+ return resource, false
|
||||
}
|
||||
|
||||
// End added by ingress
|
||||
|
||||
-func (configgen *ConfigGeneratorImpl) buildGatewayHTTPRouteConfig(node *model.Proxy, push *model.PushContext,
|
||||
- routeName string) *route.RouteConfiguration {
|
||||
+// Modifed by ingress
|
||||
+func (configgen *ConfigGeneratorImpl) buildGatewayHTTPRouteConfig(
|
||||
+ node *model.Proxy,
|
||||
+ req *model.PushRequest,
|
||||
+ routeName string,
|
||||
+ vsCache map[int][]virtualServiceContext,
|
||||
+ efw *model.EnvoyFilterWrapper,
|
||||
+ efKeys []string,
|
||||
+) (*discovery.Resource, bool) {
|
||||
if node.MergedGateway == nil {
|
||||
log.Warnf("buildGatewayRoutes: no gateways for router %v", node.ID)
|
||||
- return &route.RouteConfiguration{
|
||||
- Name: routeName,
|
||||
- VirtualHosts: []*route.VirtualHost{},
|
||||
- ValidateClusters: proto.BoolFalse,
|
||||
- }
|
||||
+ return nil, false
|
||||
}
|
||||
-
|
||||
// Added by ingress
|
||||
+ push := req.Push
|
||||
if strings.HasPrefix(routeName, constants.HigressHostRDSNamePrefix) {
|
||||
- return configgen.buildHostRDSConfig(node, push, routeName)
|
||||
+ resource, cacheHit := configgen.buildHostRDSConfig(node, req, routeName, vsCache, efw, efKeys)
|
||||
+ if resource == nil {
|
||||
+ return nil, false
|
||||
+ }
|
||||
+ return resource, cacheHit
|
||||
}
|
||||
// End added by ingress
|
||||
|
||||
@@ -636,7 +701,7 @@
|
||||
|
||||
// This can happen when a gateway has recently been deleted. Envoy will still request route
|
||||
// information due to the draining of listeners, so we should not return an error.
|
||||
- return nil
|
||||
+ return nil, false
|
||||
}
|
||||
|
||||
servers := merged.ServersByRouteName[routeName]
|
||||
@@ -768,9 +833,16 @@
|
||||
ValidateClusters: proto.BoolFalse,
|
||||
}
|
||||
|
||||
- return routeCfg
|
||||
+ routeCfg = envoyfilter.ApplyRouteConfigurationPatches(networking.EnvoyFilter_GATEWAY, node, efw, routeCfg)
|
||||
+ resource := &discovery.Resource{
|
||||
+ Name: routeName,
|
||||
+ Resource: util.MessageToAny(routeCfg),
|
||||
+ }
|
||||
+ return resource, false
|
||||
}
|
||||
|
||||
+// End modified by ingress
|
||||
+
|
||||
// hashRouteList returns a hash of a list of pointers
|
||||
func hashRouteList(r []*route.Route) uint64 {
|
||||
hash := md5.New()
|
||||
diff -Naur istio/pilot/pkg/networking/core/v1alpha3/httproute.go istio-new/pilot/pkg/networking/core/v1alpha3/httproute.go
|
||||
--- istio/pilot/pkg/networking/core/v1alpha3/httproute.go 2024-01-15 20:46:41.000000000 +0800
|
||||
+++ istio-new/pilot/pkg/networking/core/v1alpha3/httproute.go 2024-01-15 10:29:09.000000000 +0800
|
||||
@@ -78,17 +78,30 @@
|
||||
routeConfigurations = append(routeConfigurations, rc)
|
||||
}
|
||||
case model.Router:
|
||||
+ // Modified by ingress
|
||||
+ vsCache := make(map[int][]virtualServiceContext)
|
||||
+ envoyfilterKeys := efw.Keys()
|
||||
for _, routeName := range routeNames {
|
||||
- rc := configgen.buildGatewayHTTPRouteConfig(node, req.Push, routeName)
|
||||
- if rc != nil {
|
||||
- rc = envoyfilter.ApplyRouteConfigurationPatches(networking.EnvoyFilter_GATEWAY, node, efw, rc)
|
||||
- resource := &discovery.Resource{
|
||||
+ rc, cached := configgen.buildGatewayHTTPRouteConfig(node, req, routeName, vsCache, efw, envoyfilterKeys)
|
||||
+ if cached && !features.EnableUnsafeAssertions {
|
||||
+ hit++
|
||||
+ } else {
|
||||
+ miss++
|
||||
+ }
|
||||
+ if rc == nil {
|
||||
+ emptyRoute := &route.RouteConfiguration{
|
||||
+ Name: routeName,
|
||||
+ VirtualHosts: []*route.VirtualHost{},
|
||||
+ ValidateClusters: proto.BoolFalse,
|
||||
+ }
|
||||
+ rc = &discovery.Resource{
|
||||
Name: routeName,
|
||||
- Resource: util.MessageToAny(rc),
|
||||
+ Resource: util.MessageToAny(emptyRoute),
|
||||
}
|
||||
- routeConfigurations = append(routeConfigurations, resource)
|
||||
}
|
||||
+ routeConfigurations = append(routeConfigurations, rc)
|
||||
}
|
||||
+ // End modified by ingress
|
||||
}
|
||||
if !features.EnableRDSCaching {
|
||||
return routeConfigurations, model.DefaultXdsLogDetails
|
||||
diff -Naur istio/pilot/pkg/xds/discovery.go istio-new/pilot/pkg/xds/discovery.go
|
||||
--- istio/pilot/pkg/xds/discovery.go 2024-01-15 20:46:45.000000000 +0800
|
||||
+++ istio-new/pilot/pkg/xds/discovery.go 2024-01-12 19:56:02.000000000 +0800
|
||||
@@ -392,6 +392,9 @@
|
||||
// ConfigUpdate implements ConfigUpdater interface, used to request pushes.
|
||||
// It replaces the 'clear cache' from v1.
|
||||
func (s *DiscoveryServer) ConfigUpdate(req *model.PushRequest) {
|
||||
+ if req.Full {
|
||||
+ log.Infof("full push happen, reason:%v", req.Reason)
|
||||
+ }
|
||||
inboundConfigUpdates.Increment()
|
||||
s.InboundUpdates.Inc()
|
||||
s.pushChannel <- req
|
||||
60
istio/1.12/patches/istio/20240201-optimize-default-arg.patch
Normal file
60
istio/1.12/patches/istio/20240201-optimize-default-arg.patch
Normal file
@@ -0,0 +1,60 @@
|
||||
diff -Naur istio/pilot/cmd/pilot-agent/status/util/stats.go istio-new/pilot/cmd/pilot-agent/status/util/stats.go
|
||||
--- istio/pilot/cmd/pilot-agent/status/util/stats.go 2024-02-01 10:20:13.000000000 +0800
|
||||
+++ istio-new/pilot/cmd/pilot-agent/status/util/stats.go 2024-01-31 22:44:53.000000000 +0800
|
||||
@@ -73,7 +73,7 @@
|
||||
localHostAddr = "localhost"
|
||||
}
|
||||
|
||||
- readinessURL := fmt.Sprintf("http://%s:%d/stats?usedonly&filter=%s", localHostAddr, adminPort, readyStatsRegex)
|
||||
+ readinessURL := fmt.Sprintf("http://%s:%d/stats?usedonly", localHostAddr, adminPort)
|
||||
stats, err := http.DoHTTPGetWithTimeout(readinessURL, readinessTimeout)
|
||||
if err != nil {
|
||||
return nil, false, err
|
||||
@@ -105,7 +105,7 @@
|
||||
localHostAddr = "localhost"
|
||||
}
|
||||
|
||||
- stats, err := http.DoHTTPGet(fmt.Sprintf("http://%s:%d/stats?usedonly&filter=%s", localHostAddr, adminPort, updateStatsRegex))
|
||||
+ stats, err := http.DoHTTPGet(fmt.Sprintf("http://%s:%d/stats?usedonly", localHostAddr, adminPort))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
diff -Naur istio/pilot/pkg/features/pilot.go istio-new/pilot/pkg/features/pilot.go
|
||||
--- istio/pilot/pkg/features/pilot.go 2024-02-01 10:20:17.000000000 +0800
|
||||
+++ istio-new/pilot/pkg/features/pilot.go 2024-02-01 10:16:18.000000000 +0800
|
||||
@@ -575,6 +575,8 @@
|
||||
"If enabled, each host in virtualservice will have an independent RDS, which is used with SRDS").Get()
|
||||
OnDemandRDS = env.RegisterBoolVar("ON_DEMAND_RDS", false,
|
||||
"If enabled, the on demand filter will be added to the HCM filters").Get()
|
||||
+ DefaultUpstreamConcurrencyThreshold = env.RegisterIntVar("DEFAULT_UPSTREAM_CONCURRENCY_THRESHOLD", 1000000,
|
||||
+ "The default threshold of max_requests/max_pending_requests/max_connections of circuit breaker").Get()
|
||||
// End added by ingress
|
||||
)
|
||||
|
||||
diff -Naur istio/pilot/pkg/networking/core/v1alpha3/cluster.go istio-new/pilot/pkg/networking/core/v1alpha3/cluster.go
|
||||
--- istio/pilot/pkg/networking/core/v1alpha3/cluster.go 2024-02-01 10:20:17.000000000 +0800
|
||||
+++ istio-new/pilot/pkg/networking/core/v1alpha3/cluster.go 2024-02-01 10:16:05.000000000 +0800
|
||||
@@ -61,6 +61,7 @@
|
||||
|
||||
// getDefaultCircuitBreakerThresholds returns a copy of the default circuit breaker thresholds for the given traffic direction.
|
||||
func getDefaultCircuitBreakerThresholds() *cluster.CircuitBreakers_Thresholds {
|
||||
+ // Modified by ingress
|
||||
return &cluster.CircuitBreakers_Thresholds{
|
||||
// DefaultMaxRetries specifies the default for the Envoy circuit breaker parameter max_retries. This
|
||||
// defines the maximum number of parallel retries a given Envoy will allow to the upstream cluster. Envoy defaults
|
||||
@@ -68,11 +69,12 @@
|
||||
// where multiple endpoints in a cluster are terminated. In these scenarios the circuit breaker can kick
|
||||
// in before Pilot is able to deliver an updated endpoint list to Envoy, leading to client-facing 503s.
|
||||
MaxRetries: &wrappers.UInt32Value{Value: math.MaxUint32},
|
||||
- MaxRequests: &wrappers.UInt32Value{Value: math.MaxUint32},
|
||||
- MaxConnections: &wrappers.UInt32Value{Value: math.MaxUint32},
|
||||
- MaxPendingRequests: &wrappers.UInt32Value{Value: math.MaxUint32},
|
||||
+ MaxRequests: &wrappers.UInt32Value{Value: uint32(features.DefaultUpstreamConcurrencyThreshold)},
|
||||
+ MaxConnections: &wrappers.UInt32Value{Value: uint32(features.DefaultUpstreamConcurrencyThreshold)},
|
||||
+ MaxPendingRequests: &wrappers.UInt32Value{Value: uint32(features.DefaultUpstreamConcurrencyThreshold)},
|
||||
TrackRemaining: true,
|
||||
}
|
||||
+ // End modified by ingress
|
||||
}
|
||||
|
||||
// BuildClusters returns the list of clusters for the given proxy. This is the CDS output
|
||||
@@ -0,0 +1,88 @@
|
||||
diff -Naur istio/pilot/pkg/networking/core/v1alpha3/gateway.go istio-new/pilot/pkg/networking/core/v1alpha3/gateway.go
|
||||
--- istio/pilot/pkg/networking/core/v1alpha3/gateway.go 2024-02-01 13:53:17.000000000 +0800
|
||||
+++ istio-new/pilot/pkg/networking/core/v1alpha3/gateway.go 2024-02-01 13:52:11.000000000 +0800
|
||||
@@ -501,6 +501,16 @@
|
||||
gatewayVirtualServices[gatewayName] = virtualServices
|
||||
}
|
||||
for _, virtualService := range virtualServices {
|
||||
+ virtualServiceHosts := host.NewNames(virtualService.Spec.(*networking.VirtualService).Hosts)
|
||||
+ serverHosts := host.NamesForNamespace(server.Hosts, virtualService.Namespace)
|
||||
+
|
||||
+ // We have two cases here:
|
||||
+ // 1. virtualService hosts are 1.foo.com, 2.foo.com, 3.foo.com and server hosts are ns/*.foo.com
|
||||
+ // 2. virtualService hosts are *.foo.com, and server hosts are ns/1.foo.com, ns/2.foo.com, ns/3.foo.com
|
||||
+ intersectingHosts := serverHosts.Intersection(virtualServiceHosts)
|
||||
+ if len(intersectingHosts) == 0 {
|
||||
+ continue
|
||||
+ }
|
||||
listenerVirtualServices = append(listenerVirtualServices, virtualServiceContext{
|
||||
virtualService: virtualService,
|
||||
server: server,
|
||||
@@ -615,22 +625,24 @@
|
||||
|
||||
// check all hostname if is not exist with HttpsRedirect set to true
|
||||
// create VirtualHost to redirect
|
||||
- for _, hostname := range server.Hosts {
|
||||
- if !server.GetTls().GetHttpsRedirect() {
|
||||
- continue
|
||||
- }
|
||||
- if vHost != nil && host.Name(hostname) == host.Name(hostRDSHost) {
|
||||
+ if server.GetTls().GetHttpsRedirect() {
|
||||
+ if vHost != nil {
|
||||
vHost.RequireTls = route.VirtualHost_ALL
|
||||
- continue
|
||||
+ } else {
|
||||
+ vHost = &route.VirtualHost{
|
||||
+ Name: util.DomainName(hostRDSHost, port),
|
||||
+ Domains: buildGatewayVirtualHostDomains(hostRDSHost, port),
|
||||
+ IncludeRequestAttemptCount: true,
|
||||
+ RequireTls: route.VirtualHost_ALL,
|
||||
+ }
|
||||
}
|
||||
- vHost = &route.VirtualHost{
|
||||
- Name: util.DomainName(hostname, port),
|
||||
- Domains: buildGatewayVirtualHostDomains(hostname, port),
|
||||
- IncludeRequestAttemptCount: true,
|
||||
- RequireTls: route.VirtualHost_ALL,
|
||||
+ } else if vHost != nil {
|
||||
+ mode := server.GetTls().GetMode()
|
||||
+ if mode == networking.ServerTLSSettings_MUTUAL ||
|
||||
+ mode == networking.ServerTLSSettings_ISTIO_MUTUAL {
|
||||
+ vHost.AllowServerNames = append(vHost.AllowServerNames, server.Hosts...)
|
||||
}
|
||||
}
|
||||
-
|
||||
}
|
||||
var virtualHosts []*route.VirtualHost
|
||||
if vHost == nil {
|
||||
@@ -642,6 +654,30 @@
|
||||
Routes: []*route.Route{},
|
||||
}}
|
||||
} else {
|
||||
+ sort.SliceStable(vHost.AllowServerNames, func(i, j int) bool {
|
||||
+ hostI := vHost.AllowServerNames[i]
|
||||
+ hostJ := vHost.AllowServerNames[j]
|
||||
+ if host.Name(hostI).SubsetOf(host.Name(hostJ)) {
|
||||
+ return true
|
||||
+ }
|
||||
+ return hostI < hostJ
|
||||
+ })
|
||||
+ var uniqueServerNames []string
|
||||
+ hasAllCatch := false
|
||||
+ for i, name := range vHost.AllowServerNames {
|
||||
+ if name == "*" {
|
||||
+ hasAllCatch = true
|
||||
+ break
|
||||
+ }
|
||||
+ if i == 0 || vHost.AllowServerNames[i-1] != name {
|
||||
+ uniqueServerNames = append(uniqueServerNames, name)
|
||||
+ }
|
||||
+ }
|
||||
+ if hasAllCatch {
|
||||
+ vHost.AllowServerNames = nil
|
||||
+ } else {
|
||||
+ vHost.AllowServerNames = uniqueServerNames
|
||||
+ }
|
||||
vHost.Routes = istio_route.CombineVHostRoutes(vHost.Routes)
|
||||
virtualHosts = append(virtualHosts, vHost)
|
||||
}
|
||||
41
istio/1.12/patches/istio/20240202-fix-rds-cache.patch
Normal file
41
istio/1.12/patches/istio/20240202-fix-rds-cache.patch
Normal file
@@ -0,0 +1,41 @@
|
||||
diff -Naur istio/pilot/pkg/xds/discovery.go istio-new/pilot/pkg/xds/discovery.go
|
||||
--- istio/pilot/pkg/xds/discovery.go 2024-02-02 16:26:49.000000000 +0800
|
||||
+++ istio-new/pilot/pkg/xds/discovery.go 2024-02-02 15:38:53.000000000 +0800
|
||||
@@ -18,6 +18,7 @@
|
||||
"context"
|
||||
"fmt"
|
||||
"strconv"
|
||||
+ "strings"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
@@ -41,6 +42,7 @@
|
||||
"istio.io/istio/pilot/pkg/util/sets"
|
||||
v3 "istio.io/istio/pilot/pkg/xds/v3"
|
||||
"istio.io/istio/pkg/cluster"
|
||||
+ "istio.io/istio/pkg/config/constants"
|
||||
"istio.io/istio/pkg/security"
|
||||
)
|
||||
|
||||
@@ -332,6 +334,21 @@
|
||||
} else {
|
||||
// Otherwise, just clear the updated configs
|
||||
s.Cache.Clear(req.ConfigsUpdated)
|
||||
+ //Added by ingress
|
||||
+ trimKeyMap := make(map[model.ConfigKey]struct{})
|
||||
+ for configKey := range req.ConfigsUpdated {
|
||||
+ if strings.HasPrefix(configKey.Name, constants.IstioIngressGatewayName+"-") {
|
||||
+ trimKeyMap[model.ConfigKey{
|
||||
+ Kind: configKey.Kind,
|
||||
+ Name: strings.TrimPrefix(configKey.Name, constants.IstioIngressGatewayName+"-"),
|
||||
+ Namespace: configKey.Namespace,
|
||||
+ }] = struct{}{}
|
||||
+ }
|
||||
+ }
|
||||
+ if len(trimKeyMap) > 0 {
|
||||
+ s.Cache.Clear(trimKeyMap)
|
||||
+ }
|
||||
+ //End added by ingress
|
||||
}
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user