Skip to content

Commit d71e5f9

Browse files
authored
Merge branch 'main' into patch-multi-resources
Signed-off-by: Isaac Wilson <isaac.wilson514@gmail.com>
2 parents ad3db73 + b47bc2b commit d71e5f9

268 files changed

Lines changed: 13764 additions & 3204 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/dependabot.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@ updates:
6464
- /tools
6565
schedule:
6666
interval: weekly
67+
ignore:
68+
# fortawesome/fontawesome-free should be updated with docsy.
69+
- dependency-name: "@fortawesome/fontawesome-free"
6770
- package-ecosystem: pip
6871
directories:
6972
- /tools/src/codespell

.github/workflows/build_and_test.yaml

Lines changed: 43 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -124,15 +124,28 @@ jobs:
124124
filter: ${{ github.ref == 'refs/heads/main' && 'tree:0' || '' }}
125125
- uses: ./tools/github-actions/setup-deps
126126

127-
- name: Build EG Multiarch Binaries
128-
run: make build-multiarch PLATFORMS="linux_amd64 linux_arm64"
127+
# Build both linux/amd64 and linux/arm64 on main (needed for multi-arch image publish),
128+
# and only linux/amd64 on PRs and release branches.
129+
- name: Build EG Binaries
130+
run: make build-multiarch BINS="envoy-gateway" PLATFORMS="${{ github.ref == 'refs/heads/main' && 'linux_amd64 linux_arm64' || 'linux_amd64' }}"
129131

130132
- name: Upload EG Binaries
131-
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
133+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
132134
with:
133135
name: envoy-gateway
134136
path: bin/
135137

138+
build-egctl:
139+
runs-on: ubuntu-latest
140+
needs: [changes, lint, gen-check, license-check, coverage-test]
141+
if: ${{ github.event_name != 'pull_request' || needs.changes.outputs.run_test_workflow == 'true' }}
142+
steps:
143+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
144+
- uses: ./tools/github-actions/setup-deps
145+
146+
- name: Build egctl Binary
147+
run: make build BINS="egctl" PLATFORM="linux_amd64"
148+
136149
conformance-test:
137150
runs-on: ubuntu-latest
138151
needs:
@@ -179,9 +192,7 @@ jobs:
179192
path: bin/
180193

181194
- name: Give Privileges To EG Binaries
182-
run: |
183-
chmod +x bin/linux/amd64/envoy-gateway
184-
chmod +x bin/linux/arm64/envoy-gateway
195+
run: chmod +x bin/linux/*/envoy-gateway
185196

186197
# conformance
187198
- name: Run Standard Conformance Tests
@@ -194,6 +205,7 @@ jobs:
194205
# set ACTIONS_STEP_DEBUG to true if context runner.debug is '1',
195206
# which means to dump the current state when there's a case failed.
196207
ACTIONS_STEP_DEBUG: ${{ runner.debug == '1' }}
208+
SKIP_GO_BUILD: "true"
197209
run: make conformance
198210

199211
e2e-test:
@@ -238,9 +250,7 @@ jobs:
238250
path: bin/
239251

240252
- name: Give Privileges To EG Binaries
241-
run: |
242-
chmod +x bin/linux/amd64/envoy-gateway
243-
chmod +x bin/linux/arm64/envoy-gateway
253+
run: chmod +x bin/linux/*/envoy-gateway
244254

245255
# E2E
246256
- name: Run E2E Tests
@@ -260,6 +270,7 @@ jobs:
260270
# set ACTIONS_STEP_DEBUG to true if context runner.debug is '1',
261271
# which means to dump the current state when there's a case failed.
262272
ACTIONS_STEP_DEBUG: ${{ runner.debug == '1' }}
273+
SKIP_GO_BUILD: "true"
263274
run: make e2e
264275

265276
benchmark-test:
@@ -274,6 +285,14 @@ jobs:
274285
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
275286
- uses: ./tools/github-actions/setup-deps
276287

288+
- name: Download EG Binaries
289+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
290+
with:
291+
name: envoy-gateway
292+
path: bin/
293+
294+
- name: Give Privileges To EG Binaries
295+
run: chmod +x bin/linux/*/envoy-gateway
277296

278297
# Benchmark
279298
- name: Run Benchmark tests
@@ -287,10 +306,11 @@ jobs:
287306
BENCHMARK_MEMORY_LIMITS: 2000Mi
288307
BENCHMARK_REPORT_DIR: benchmark_report
289308
BENCHMARK_RENDER_PNG: "false"
309+
SKIP_GO_BUILD: "true"
290310
run: make benchmark
291311

292312
- name: Upload Benchmark report
293-
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
313+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
294314
with:
295315
name: benchmark_report
296316
path: ./test/benchmark/benchmark_report/
@@ -304,10 +324,21 @@ jobs:
304324
steps:
305325
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
306326
- uses: ./tools/github-actions/setup-deps
327+
328+
- name: Download EG Binaries
329+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
330+
with:
331+
name: envoy-gateway
332+
path: bin/
333+
334+
- name: Give Privileges To EG Binaries
335+
run: chmod +x bin/linux/*/envoy-gateway
336+
307337
- name: Resilience Test
308338
env:
309339
IMAGE_PULL_POLICY: IfNotPresent
310340
CUSTOM_CNI: "true"
341+
SKIP_GO_BUILD: "true"
311342
run: make resilience
312343

313344
publish:
@@ -325,9 +356,7 @@ jobs:
325356
path: bin/
326357

327358
- name: Give Privileges To EG Binaries
328-
run: |
329-
chmod +x bin/linux/amd64/envoy-gateway
330-
chmod +x bin/linux/arm64/envoy-gateway
359+
run: chmod +x bin/linux/*/envoy-gateway
331360

332361
# build and push image
333362
- name: Login to DockerHub
@@ -363,6 +392,7 @@ jobs:
363392
- license-check
364393
- coverage-test
365394
- build
395+
- build-egctl
366396
- conformance-test
367397
- e2e-test
368398
- benchmark-test

.github/workflows/codeql.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,14 @@ jobs:
3636
- uses: ./tools/github-actions/setup-deps
3737

3838
- name: Initialize CodeQL
39-
uses: github/codeql-action/init@c10b8064de6f491fea524254123dbe5e09572f13 # v3.29.5
39+
uses: github/codeql-action/init@95e58e9a2cdfd71adc6e0353d5c52f41a045d225 # v3.29.5
4040
with:
4141
languages: ${{ matrix.language }}
4242

4343
- name: Autobuild
44-
uses: github/codeql-action/autobuild@c10b8064de6f491fea524254123dbe5e09572f13 # v3.29.5
44+
uses: github/codeql-action/autobuild@95e58e9a2cdfd71adc6e0353d5c52f41a045d225 # v3.29.5
4545

4646
- name: Perform CodeQL Analysis
47-
uses: github/codeql-action/analyze@c10b8064de6f491fea524254123dbe5e09572f13 # v3.29.5
47+
uses: github/codeql-action/analyze@95e58e9a2cdfd71adc6e0353d5c52f41a045d225 # v3.29.5
4848
with:
4949
category: "/language:${{matrix.language}}"

.github/workflows/docs.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
- uses: ./tools/github-actions/setup-deps
4949

5050
- name: Setup Node
51-
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
51+
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
5252
with:
5353
node-version-file: site/.nvmrc
5454

@@ -57,7 +57,7 @@ jobs:
5757

5858
# Upload docs for GitHub Pages
5959
- name: Upload GitHub Pages artifact
60-
uses: actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b # v4.0.0
60+
uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0
6161
with:
6262
# Path of the directory containing the static assets.
6363
path: site/public

.github/workflows/experimental_conformance.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
6060
run: make experimental-conformance
6161

6262
- name: Upload Conformance Report
63-
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
63+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
6464
with:
6565
name: conformance-report-k8s-${{ matrix.target.version }}-${{ matrix.target.profile }}
6666
path: ./test/conformance/conformance-report-k8s-${{ matrix.target.version }}-${{ matrix.target.profile }}.yaml

.github/workflows/release.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ jobs:
7878
run: cd test/benchmark && zip -r benchmark_report.zip benchmark_report
7979

8080
- name: Upload Benchmark Report
81-
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
81+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
8282
with:
8383
name: benchmark_report
8484
path: test/benchmark/benchmark_report.zip
@@ -118,6 +118,9 @@ jobs:
118118
run: make image.multiarch.setup image.push.multiarch TAG=${{ env.release_tag }} IMAGE=docker.io/envoyproxy/gateway
119119

120120
- name: Generate Release Artifacts
121+
# rc.0 tags ship no release notes, so generate-artifacts would fail on the missing file.
122+
# These artifacts only feed the GitHub Release upload below, which is also skipped for rc.0.
123+
if: ${{ !contains(github.ref, '-rc.0') }}
121124
run: IMAGE_PULL_POLICY=IfNotPresent make generate-artifacts IMAGE=envoyproxy/gateway TAG=${{ env.release_tag }} OUTPUT_DIR=release-artifacts
122125

123126
- name: Build and Push EG Release Helm Chart
@@ -142,6 +145,7 @@ jobs:
142145
cd release-artifacts && unzip benchmark_report.zip
143146
144147
- name: Package EG multiarch binaries
148+
if: ${{ !contains(github.ref, '-rc.0') }}
145149
run: |
146150
tar -zcvf envoy-gateway_${{ env.release_tag }}_linux_amd64.tar.gz bin/linux/amd64/envoy-gateway
147151
tar -zcvf envoy-gateway_${{ env.release_tag }}_linux_arm64.tar.gz bin/linux/arm64/envoy-gateway
@@ -155,7 +159,7 @@ jobs:
155159
156160
- name: Upload Release Manifests
157161
if: ${{ !contains(github.ref, '-rc.0') }}
158-
uses: softprops/action-gh-release@153bb8e04406b158c6c84fc1615b65b24149a1fe # v2.6.1
162+
uses: softprops/action-gh-release@b4309332981a82ec1c5618f44dd2e27cc8bfbfda # v3.0.0
159163
with:
160164
files: |
161165
release-artifacts/install.yaml

.github/workflows/scorecard.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,13 @@ jobs:
3333
publish_results: true
3434

3535
- name: "Upload artifact"
36-
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
36+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
3737
with:
3838
name: SARIF file
3939
path: results.sarif
4040
retention-days: 5
4141

4242
- name: "Upload to code-scanning"
43-
uses: github/codeql-action/upload-sarif@c10b8064de6f491fea524254123dbe5e09572f13 # v3.29.5
43+
uses: github/codeql-action/upload-sarif@95e58e9a2cdfd71adc6e0353d5c52f41a045d225 # v3.29.5
4444
with:
4545
sarif_file: results.sarif

.github/workflows/trivy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
IMAGE=envoy-proxy/gateway-dev TAG=${{ github.sha }} make image
3636
3737
- name: Run Trivy vulnerability scanner
38-
uses: aquasecurity/trivy-action@57a97c7e7821a5776cebc9bb87c984fa69cba8f1 # v0.35.0
38+
uses: aquasecurity/trivy-action@ed142fd0673e97e23eac54620cfb913e5ce36c25 # v0.36.0
3939
with:
4040
image-ref: envoy-proxy/gateway-dev:${{ github.sha }}
4141
exit-code: '1'

api/v1alpha1/envoygateway_types.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,8 @@ type ExtensionAPISettings struct {
312312
// DisableLua determines if Lua EnvoyExtensionPolicies should be disabled.
313313
// If set to true, the Lua EnvoyExtensionPolicy feature will be disabled.
314314
DisableLua bool `json:"disableLua"`
315+
// EnableSDSSecretRef enables read SDS(Secret Discovery Service) settings from a secret(with type gateway.envoyproxy.io/sds).
316+
EnableSDSSecretRef bool `json:"enableSDSSecretRef"`
315317
}
316318

317319
// EnvoyGatewayProvider defines the desired configuration of a provider.

api/v1alpha1/ext_auth_types.go

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,29 @@ type ExtAuth struct {
6464
// +optional
6565
RecomputeRoute *bool `json:"recomputeRoute,omitempty"`
6666

67+
// IncludeRouteMetadata sends Envoy Gateway's built-in route metadata to the
68+
// external authorization service as context.
69+
//
70+
// This includes Envoy Gateway's built-in metadata for the selected route in
71+
// the "envoy-gateway" metadata namespace.
72+
//
73+
// The metadata is exposed under the "resources" field as a list of route
74+
// resource objects. For example:
75+
//
76+
// envoy-gateway:
77+
// resources:
78+
// - kind: HTTPRoute
79+
// name: backend
80+
// namespace: default
81+
// annotations:
82+
// foo: bar
83+
//
84+
// The resource object may include fields such as kind, namespace, name,
85+
// sectionName, and supported route annotations.
86+
//
87+
// +optional
88+
IncludeRouteMetadata *bool `json:"includeRouteMetadata,omitempty"`
89+
6790
// ContextExtensions are analogous to http_request.headers, however these
6891
// contents will not be sent to the upstream server. This provides an
6992
// extension mechanism for sending additional information to the auth server
@@ -75,7 +98,7 @@ type ExtAuth struct {
7598
// +patchStrategy=merge
7699
// +listType=map
77100
// +listMapKey=name
78-
ContextExtensions []*ContextExtension `json:"contextExtensions,omitempty"`
101+
ContextExtensions []*ContextExtension `json:"contextExtensions,omitempty" patchMergeKey:"name" patchStrategy:"merge"`
79102

80103
// Sets the HTTP status that is returned when the authorization service returns an error
81104
// or cannot be reached. Defaults to 403 Forbidden.

0 commit comments

Comments
 (0)