From 0d046031526b945f91a8c91422751e2af0771135 Mon Sep 17 00:00:00 2001 From: zirain Date: Thu, 14 Nov 2024 13:16:14 +0800 Subject: [PATCH 1/5] ci: use static file server instead of github.com Signed-off-by: zirain --- examples/static-file-server/Dockerfile | 23 +++++ examples/static-file-server/Makefile | 8 ++ examples/static-file-server/README.md | 10 ++ .../static-file-server/files/jwt/jwks.json | 22 ++++ .../wasm/envoy_filter_http_wasm_example.wasm | Bin 0 -> 59641 bytes examples/static-file-server/go.mod | 3 + examples/static-file-server/go.sum | 0 examples/static-file-server/main.go | 34 +++++++ .../static-file-server/manifests/http.yaml | 33 ++++++ .../manifests/httproute.yaml | 22 ++++ .../static-file-server/manifests/tls.yaml | 95 ++++++++++++++++++ test/e2e/base/manifests.yaml | 35 +++++++ test/e2e/testdata/authorization-jwt.yaml | 6 +- test/e2e/testdata/jwt-optional.yaml | 2 +- test/e2e/testdata/jwt.yaml | 2 +- .../testdata/ratelimit-based-jwt-claims.yaml | 2 +- test/e2e/testdata/wasm-http.yaml | 4 +- tools/make/examples.mk | 4 +- 18 files changed, 295 insertions(+), 10 deletions(-) create mode 100644 examples/static-file-server/Dockerfile create mode 100644 examples/static-file-server/Makefile create mode 100644 examples/static-file-server/README.md create mode 100644 examples/static-file-server/files/jwt/jwks.json create mode 100644 examples/static-file-server/files/wasm/envoy_filter_http_wasm_example.wasm create mode 100644 examples/static-file-server/go.mod create mode 100644 examples/static-file-server/go.sum create mode 100644 examples/static-file-server/main.go create mode 100644 examples/static-file-server/manifests/http.yaml create mode 100644 examples/static-file-server/manifests/httproute.yaml create mode 100644 examples/static-file-server/manifests/tls.yaml diff --git a/examples/static-file-server/Dockerfile b/examples/static-file-server/Dockerfile new file mode 100644 index 00000000000..83b3238f1ce --- /dev/null +++ b/examples/static-file-server/Dockerfile @@ -0,0 +1,23 @@ +FROM golang:1.23.1 AS builder + +ARG GO_LDFLAGS="" + +WORKDIR /workspace +COPY go.mod go.sum ./ +RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/go/pkg/mod \ + go mod download + +COPY . ./ +RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/go/pkg/mod \ + CGO_ENABLED=0 \ + GOOS=${TARGETOS} \ + GOARCH=${TARGETARCH} \ + go build -o /bin/static-file-server -ldflags "${GO_LDFLAGS}" . + +# Need root user for UDS +FROM gcr.io/distroless/static-debian11 +COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ +COPY --from=builder /bin/static-file-server / +COPY files/ files/ + +ENTRYPOINT ["/static-file-server"] diff --git a/examples/static-file-server/Makefile b/examples/static-file-server/Makefile new file mode 100644 index 00000000000..a4e59d1e3dd --- /dev/null +++ b/examples/static-file-server/Makefile @@ -0,0 +1,8 @@ + +IMAGE_PREFIX ?= envoyproxy/gateway- +APP_NAME ?= static-file-server +TAG ?= latest + +.PHONY: docker-buildx +docker-buildx: + docker buildx build . -t $(IMAGE_PREFIX)$(APP_NAME):$(TAG) --build-arg GO_LDFLAGS="$(GO_LDFLAGS)" --load diff --git a/examples/static-file-server/README.md b/examples/static-file-server/README.md new file mode 100644 index 00000000000..7cb2417e3cd --- /dev/null +++ b/examples/static-file-server/README.md @@ -0,0 +1,10 @@ +# Static File Server + +This example demonstrates how to create a simple static file server using the `http` package. +Which serves files used by e2e tests. + +- test/e2e/testdata/authorization-jwt.yaml +- test/e2e/testdata/jwt.yaml +- test/e2e/testdata/jwt-optional.yaml +- test/e2e/testdata/ratelimit-based-jwt-claims.yaml +- test/e2e/testdata/wasm-http.yaml \ No newline at end of file diff --git a/examples/static-file-server/files/jwt/jwks.json b/examples/static-file-server/files/jwt/jwks.json new file mode 100644 index 00000000000..b58d8e04fb3 --- /dev/null +++ b/examples/static-file-server/files/jwt/jwks.json @@ -0,0 +1,22 @@ +{ + "keys": [ + { + "kty": "RSA", + "n": "u1SU1LfVLPHCozMxH2Mo4lgOEePzNm0tRgeLezV6ffAt0gunVTLw7onLRnrq0_IzW7yWR7QkrmBL7jTKEn5u-qKhbwKfBstIs-bMY2Zkp18gnTxKLxoS2tFczGkPLPgizskuemMghRniWaoLcyehkd3qqGElvW_VDL5AaWTg0nLVkjRo9z-40RQzuVaE8AkAFmxZzow3x-VJYKdjykkJ0iT9wCS0DRTXu269V264Vf_3jvredZiKRkgwlL9xNAwxXFg0x_XFw005UWVRIkdgcKWTjpBP2dPwVZ4WWC-9aGVd-Gyn1o0CLelf4rEjGoXbAAEgAqeGUxrcIlbjXfbcmw", + "e": "AQAB", + "alg": "RS256", + "use": "sig" + }, + { + "alg": "RS256", + "e": "AQAB", + "key_ops": [ + "verify" + ], + "kty": "RSA", + "n": "xOHb-i1WDfeAvsbXTSOtosl3hCUDHQ8fRDqX_Rt998-hZDJmAoPOu4J-wcwq5aZtSn_iWUYLcK2WmC_1n-p1eyc-Pl4CBnxF7LUjCk-WGhniaCzXC5I5RON6c5N-MdE0UfukK0PM0zD3iQonZq0fIsnOYyFdYdWvQ5XW-C2aLlq2FUKrjmhAav10jIC0KGd2dHRzauzfLMUmt_iMnpU84Xrur1zRYzBO4D90rN0ypC2HH7o_zI8Osx4o1L8BScW78545sWyVbaprhBV1I2Sa4SH3NAc25ej3RIh-f13Yu97FVfO0AIG4VfFiaMmsTqNTCiBkM20tXD2Z-cHJTKemXzFgInJoqFLAkHLzJ0lPvAkKOgAOufLHa7RA-C276OXd72IXPsL1UOLN4sjhGqTtaynVa00yuHdi3f4-aoy9F9SUJeWfPg--nZNLzuI0eyufsTFywnx1bTQ_kdYlEr0dRE5sujlMk3cZ7FmOQRvcjA9MxFzoVKMmlZc6LMCgqw-P", + "use": "sig", + "kid": "b520b3c2c4bd75a10e9cebc9576933dc" + } + ] +} \ No newline at end of file diff --git a/examples/static-file-server/files/wasm/envoy_filter_http_wasm_example.wasm b/examples/static-file-server/files/wasm/envoy_filter_http_wasm_example.wasm new file mode 100644 index 0000000000000000000000000000000000000000..df2554e971e8538ce58066a2bdacfddf4c1b1bab GIT binary patch literal 59641 zcmeI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Zm4c=ox=(%mbhoqA+q@$~8CiRlx53@?!O#yu0)xctMHr(cPG3Htdq zn%cv)m+MNd*KpzeGXeiv?pJf|kV9Q_d1?m zsNU2ut{9UeVuIYa#w)g`}5BYC~S}CIRuaXX`471uA8}pYU$5gxkTxQxo+n=!gZAE4z4@7?&5kY*W0-6<~qhDFc)F($GJ|=-FkX% zD%>)6WD3c(FMIg(;>i;vzGG@>{`B0^)RC#l6H|*zYg01!kbiY3bNB9l7r5Mi{LIqw z=~M3T-FLg=!pz+Ae(|Iej$S{1a&mg^hV1x5lZ#7J%WpZe{J{R}JK4OHu|^ioOf4wyG}po|LVsri&K;K-almSnrp*&cE=JN zJpq0+l-Cuh`NdbI|11{TG(2zTDuzd#FwS)qSHTJE4bMAxui<$omxkvaE)CB=;?nSZ z2iN?`GY?MBb(nE}@$|VzCLWwxp5SSIYH|6Iv37r!_CC`Xryp4J;;L+acFn%*%D~tY z^UI4pzocfa`diUe`LA4&R%BXz5yA4+ERDa6j=y+inq1m;%w4%{>eSNl#p!uyVdB)( c^5luh2Nf+*n*aa+ literal 0 HcmV?d00001 diff --git a/examples/static-file-server/go.mod b/examples/static-file-server/go.mod new file mode 100644 index 00000000000..05f8ff7da2f --- /dev/null +++ b/examples/static-file-server/go.mod @@ -0,0 +1,3 @@ +module github.com/envoyproxy/static-file-server + +go 1.23.1 diff --git a/examples/static-file-server/go.sum b/examples/static-file-server/go.sum new file mode 100644 index 00000000000..e69de29bb2d diff --git a/examples/static-file-server/main.go b/examples/static-file-server/main.go new file mode 100644 index 00000000000..312621e57c6 --- /dev/null +++ b/examples/static-file-server/main.go @@ -0,0 +1,34 @@ +package main + +import ( + "flag" + "log" + "net/http" + "os" + "path" +) + +var ( + port string + directory string + certPath string +) + +func main() { + flag.StringVar(&port, "port", "8080", "port to serve on") + flag.StringVar(&directory, "dir", "./files", "the directory of static file to host") + flag.StringVar(&certPath, "certPath", "/etc/certs", "path to extProcServer certificate and private key") + flag.Parse() + + http.Handle("/", http.FileServer(http.Dir(directory))) + + if _, err := os.Stat(path.Join(certPath, "tls.crt")); err != nil { + log.Printf("Serving %s on HTTP port: %s\n", directory, port) + log.Fatal(http.ListenAndServe(":"+port, nil)) + return + } + + log.Printf("Serving %s on HTTPS port: %s\n", directory, port) + log.Fatal(http.ListenAndServeTLS(":"+port, + path.Join(certPath, "tls.crt"), path.Join(certPath, "tls.key"), nil)) +} diff --git a/examples/static-file-server/manifests/http.yaml b/examples/static-file-server/manifests/http.yaml new file mode 100644 index 00000000000..db01804b8ae --- /dev/null +++ b/examples/static-file-server/manifests/http.yaml @@ -0,0 +1,33 @@ +--- +apiVersion: v1 +kind: Service +metadata: + name: static-file-server +spec: + selector: + app: static-file-server + ports: + - protocol: TCP + port: 443 + targetPort: 8443 +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: static-file-server + labels: + app: static-file-server +spec: + replicas: 1 + selector: + matchLabels: + app: static-file-server + template: + metadata: + labels: + app: static-file-server + spec: + containers: + - name: static-file-server + image: envoyproxy/gateway-static-file-server + imagePullPolicy: IfNotPresent \ No newline at end of file diff --git a/examples/static-file-server/manifests/httproute.yaml b/examples/static-file-server/manifests/httproute.yaml new file mode 100644 index 00000000000..beaefdbb423 --- /dev/null +++ b/examples/static-file-server/manifests/httproute.yaml @@ -0,0 +1,22 @@ +apiVersion: gateway.networking.k8s.io/v1 +kind: HTTPRoute +metadata: + name: backend +spec: + parentRefs: + - name: eg + rules: + - backendRefs: + - group: "" + kind: Service + name: static-file-server + port: 443 + weight: 1 + matches: + - path: + type: PathPrefix + value: /jwt + - path: + type: PathPrefix + value: /wasm +--- diff --git a/examples/static-file-server/manifests/tls.yaml b/examples/static-file-server/manifests/tls.yaml new file mode 100644 index 00000000000..d277452efd1 --- /dev/null +++ b/examples/static-file-server/manifests/tls.yaml @@ -0,0 +1,95 @@ +apiVersion: v1 +data: + tls.crt: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURZVENDQWttZ0F3SUJBZ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ZnluS1hCR2NQbk9Kc0ZwQzdFN3prRnNtbgp0UmpHdkp6VnRCRGxxVXQzbEdKOEFSMHVzdmdUR3ltdytOSTY5VHBrM3BDRGs3bURLMndZdHZpUFpkUmU0alV4CnI4cDBpa1pvUjhrU0xrSnRmQVNzb1pKUEFvR0FWSTk4bjNrR082WnVxT3FqYkVMd2RTRWJZQkdCYlp1aW8wejAKRm5qZWllU0R0d2c5NzlEUnNrcGxmWXRmZGJ2cG1jT25lbms1a3lvaVhPLzhBMEFSZkE4U1FsUGViRjlIWjY5MApnaDEyN2p3R0hPRURneS9vSFhoMlVQeWgyam42SUZlUFQrYUxFdnB4S0I3S0NCTkJvc1E3M1dUUjVldWpVWTN6CkN3SSt3SVVDZ1lFQXJVQ0k4cng3MVd4S3A0dnNObTJpM2JlT3lYa3dVaFhKUmhmL0cwZk5vc2FhT0RvVEdNT1oKVlRRci9hVWJlQ2pWMlZENTEyVkJEQlZnYUNnZ1ZZS3pSMXpJSDFlMXZzVjhQVjN1Snh0Q2FLT3daTHV4OS9HQQp0QzJOKzFTY05GWkxtU3Z0MzU2WG5EL3VwRUcyeVMydmFURDU1K3FVUlVFWk1TWDlPdFpSL2JBPQotLS0tLUVORCBSU0EgUFJJVkFURSBLRVktLS0tLQo= +kind: Secret +metadata: + name: static-file-server-tls +type: kubernetes.io/tls +--- +apiVersion: v1 +kind: Service +metadata: + name: static-file-server +spec: + selector: + app: static-file-server + ports: + - protocol: TCP + port: 443 + targetPort: 8443 +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: static-file-server + labels: + app: static-file-server +spec: + replicas: 1 + selector: + matchLabels: + app: static-file-server + template: + metadata: + labels: + app: static-file-server + spec: + containers: + - name: static-file-server + image: envoyproxy/gateway-static-file-server + imagePullPolicy: IfNotPresent + args: + - "--certPath=/app/certs" + - "--port=8443" + volumeMounts: + - name: secret-volume + mountPath: /app/certs + volumes: + - name: secret-volume + secret: + secretName: static-file-server-tls +--- +apiVersion: gateway.networking.k8s.io/v1alpha3 +kind: BackendTLSPolicy +metadata: + name: static-file-server +spec: + targetRefs: + - group: "" + kind: Service + name: static-file-server + sectionName: "443" + validation: + caCertificateRefs: + - name: backend-tls-checks-certificate + group: "" + kind: ConfigMap + hostname: example.com +--- +apiVersion: v1 +data: + ca.crt: | + -----BEGIN CERTIFICATE----- + MIIDQzCCAiugAwIBAgIBATANBgkqhkiG9w0BAQsFADBCMRMwEQYDVQQKEwpFbnZv + eVByb3h5MRAwDgYDVQQLEwdHYXRld2F5MRkwFwYDVQQDExBFbnZveSBHYXRld2F5 + IENBMCAXDTI0MDMxMDE1MzIxN1oYDzIxMjQwMzEwMTYzMjE3WjBCMRMwEQYDVQQK + EwpFbnZveVByb3h5MRAwDgYDVQQLEwdHYXRld2F5MRkwFwYDVQQDExBFbnZveSBH + YXRld2F5IENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA7ZFmGB4e + m1KdGEohAZBfqydAEGLDHJ1YyfHWdd+vBAevdW64bZx3pggJOtgCnePuFd02rDQS + dlsJlX/6mFtoQilo6wvxDSJRfaTDbtfTjw+7k8yfd/Jsmh0RWG+UeyI7Na9sXAz7 + b57mpxsCoNowzeK5ETiOGGNWPcjENJkSnBarz5muN00xIZWBU+yN5PLJNxZvxpZJ + Ol/SSI8sno0e0PxAmp3fe7QaXiZj/TAGJPGuTJkUxrHqyZGJtYUxsS8A0dT1zBjj + izA5Dp+b5yzYo23Hh7BgpbZ7X4gsDThFuwCD6fHyepuv2zHPqvSsdqg2hAhDp91R + zrn7a9GxG2VSIwIDAQABo0IwQDAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUw + AwEB/zAdBgNVHQ4EFgQUUpP1aZ1M2KIuPPWrNPDV2c5CngowDQYJKoZIhvcNAQEL + BQADggEBAGSEkAVz+Z0qS4FmA0q4SCpIIq64bsdEjiUzev7pK1LEK0/Y28QBPixV + cUXfax18VPR9pls1JgXto9qY+C0hnRZic6611QTJlWK1p6dinQ/eDdYCBC+nv5xx + ssASwmplIxMvj3S1qF6dr7sMI2ZVD5HElTWdO19UBLyhiKKZW2KxDsYj+5NRwGFe + G+JuDgq7njUM8mdyYk0NehefdBUEUUCQtnwUtW95/429XwqQROuRDteGT9kjD+Y5 + ea5mW4mfqLeuGJXZs9bdWjKKdLQPrn9IshPysWqz2Hz8dQ1f7N9/g8UWVSjd4cyx + S5EAolzVv0yB7wHCWCgfG/ckdOTUNnE= + -----END CERTIFICATE----- +kind: ConfigMap +metadata: + name: backend-tls-checks-certificate diff --git a/test/e2e/base/manifests.yaml b/test/e2e/base/manifests.yaml index c7390d6d70d..0643e491609 100644 --- a/test/e2e/base/manifests.yaml +++ b/test/e2e/base/manifests.yaml @@ -567,3 +567,38 @@ spec: protocol: TCP port: 19001 targetPort: 19001 +--- +apiVersion: v1 +kind: Service +metadata: + name: static-file-server + namespace: gateway-conformance-infra +spec: + selector: + app: static-file-server + ports: + - protocol: TCP + port: 80 + targetPort: 8080 +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: static-file-server + namespace: gateway-conformance-infra + labels: + app: static-file-server +spec: + replicas: 1 + selector: + matchLabels: + app: static-file-server + template: + metadata: + labels: + app: static-file-server + spec: + containers: + - name: static-file-server + image: envoyproxy/gateway-static-file-server + imagePullPolicy: IfNotPresent \ No newline at end of file diff --git a/test/e2e/testdata/authorization-jwt.yaml b/test/e2e/testdata/authorization-jwt.yaml index 5d3e31ea12e..0c1b5e27c66 100644 --- a/test/e2e/testdata/authorization-jwt.yaml +++ b/test/e2e/testdata/authorization-jwt.yaml @@ -64,7 +64,7 @@ spec: - name: example issuer: https://foo.bar.com remoteJWKS: - uri: https://raw.githubusercontent.com/envoyproxy/gateway/refs/heads/main/examples/kubernetes/jwt/jwks.json + uri: http://static-file-server.gateway-conformance-infra/jwt/jwks.json authorization: defaultAction: Deny rules: @@ -97,7 +97,7 @@ spec: - name: example issuer: https://foo.bar.com remoteJWKS: - uri: https://raw.githubusercontent.com/envoyproxy/gateway/refs/heads/main/examples/kubernetes/jwt/jwks.json + uri: http://static-file-server.gateway-conformance-infra/jwt/jwks.json authorization: defaultAction: Deny rules: @@ -123,7 +123,7 @@ spec: - name: example issuer: https://foo.bar.com remoteJWKS: - uri: https://raw.githubusercontent.com/envoyproxy/gateway/refs/heads/main/examples/kubernetes/jwt/jwks.json + uri: http://static-file-server.gateway-conformance-infra/jwt/jwks.json authorization: defaultAction: Deny rules: diff --git a/test/e2e/testdata/jwt-optional.yaml b/test/e2e/testdata/jwt-optional.yaml index d5ca319fa03..1a6d2e01c5c 100644 --- a/test/e2e/testdata/jwt-optional.yaml +++ b/test/e2e/testdata/jwt-optional.yaml @@ -19,7 +19,7 @@ spec: - claim: name header: x-name remoteJWKS: - uri: https://raw.githubusercontent.com/envoyproxy/gateway/main/examples/kubernetes/jwt/jwks.json + uri: http://static-file-server.gateway-conformance-infra/jwt/jwks.json optional: true --- apiVersion: gateway.networking.k8s.io/v1 diff --git a/test/e2e/testdata/jwt.yaml b/test/e2e/testdata/jwt.yaml index 01cb370651d..32b1d96dcc0 100644 --- a/test/e2e/testdata/jwt.yaml +++ b/test/e2e/testdata/jwt.yaml @@ -20,7 +20,7 @@ spec: - claim: name header: x-name remoteJWKS: - uri: https://raw.githubusercontent.com/envoyproxy/gateway/main/examples/kubernetes/jwt/jwks.json + uri: http://static-file-server.gateway-conformance-infra/jwt/jwks.json --- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute diff --git a/test/e2e/testdata/ratelimit-based-jwt-claims.yaml b/test/e2e/testdata/ratelimit-based-jwt-claims.yaml index 2d01996c981..7c72421fed9 100644 --- a/test/e2e/testdata/ratelimit-based-jwt-claims.yaml +++ b/test/e2e/testdata/ratelimit-based-jwt-claims.yaml @@ -12,7 +12,7 @@ spec: providers: - name: example remoteJWKS: - uri: https://raw.githubusercontent.com/envoyproxy/gateway/main/examples/kubernetes/jwt/jwks.json + uri: http://static-file-server.gateway-conformance-infra/jwt/jwks.json claimToHeaders: - claim: name header: x-claim-name diff --git a/test/e2e/testdata/wasm-http.yaml b/test/e2e/testdata/wasm-http.yaml index 856d381a517..0a26426b905 100644 --- a/test/e2e/testdata/wasm-http.yaml +++ b/test/e2e/testdata/wasm-http.yaml @@ -69,7 +69,7 @@ spec: code: type: HTTP http: - url: https://raw.githubusercontent.com/envoyproxy/examples/main/wasm-cc/lib/envoy_filter_http_wasm_example.wasm + uri: http://static-file-server.gateway-conformance-infra/wasm/envoy_filter_http_wasm_example.wasm sha256: 79c9f85128bb0177b6511afa85d587224efded376ac0ef76df56595f1e6315c0 --- apiVersion: gateway.envoyproxy.io/v1alpha1 @@ -88,4 +88,4 @@ spec: code: type: HTTP http: - url: https://raw.githubusercontent.com/envoyproxy/examples/main/wasm-cc/lib/envoy_filter_http_wasm_example.wasm + uri: http://static-file-server.gateway-conformance-infra/wasm/envoy_filter_http_wasm_example.wasm diff --git a/tools/make/examples.mk b/tools/make/examples.mk index 5caf9846e63..01c55c9d09a 100644 --- a/tools/make/examples.mk +++ b/tools/make/examples.mk @@ -1,5 +1,5 @@ -EXAMPLE_APPS := grpc-ext-auth envoy-als grpc-ext-proc http-ext-auth preserve-case-backend +EXAMPLE_APPS := grpc-ext-auth envoy-als grpc-ext-proc http-ext-auth preserve-case-backend static-file-server EXAMPLE_IMAGE_PREFIX ?= envoyproxy/gateway- EXAMPLE_TAG ?= latest @@ -17,4 +17,4 @@ kube-install-examples-image: kube-build-examples-image @$(LOG_TARGET) @for app in $(EXAMPLE_APPS); do \ tools/hack/kind-load-image.sh $(EXAMPLE_IMAGE_PREFIX)$$app $(EXAMPLE_TAG); \ - done \ No newline at end of file + done From 8169d0ca6d9fc37645f9023babf42e52b850815e Mon Sep 17 00:00:00 2001 From: zirain Date: Thu, 14 Nov 2024 13:19:46 +0800 Subject: [PATCH 2/5] new-line-at-end-of-file Signed-off-by: zirain --- examples/static-file-server/manifests/http.yaml | 2 +- test/e2e/base/manifests.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/static-file-server/manifests/http.yaml b/examples/static-file-server/manifests/http.yaml index db01804b8ae..e21fec0179c 100644 --- a/examples/static-file-server/manifests/http.yaml +++ b/examples/static-file-server/manifests/http.yaml @@ -30,4 +30,4 @@ spec: containers: - name: static-file-server image: envoyproxy/gateway-static-file-server - imagePullPolicy: IfNotPresent \ No newline at end of file + imagePullPolicy: IfNotPresent diff --git a/test/e2e/base/manifests.yaml b/test/e2e/base/manifests.yaml index 0643e491609..34ccc08390a 100644 --- a/test/e2e/base/manifests.yaml +++ b/test/e2e/base/manifests.yaml @@ -601,4 +601,4 @@ spec: containers: - name: static-file-server image: envoyproxy/gateway-static-file-server - imagePullPolicy: IfNotPresent \ No newline at end of file + imagePullPolicy: IfNotPresent From 74ba58c1f91c4fdadd476c1f66c410d63dbfb2ca Mon Sep 17 00:00:00 2001 From: zirain Date: Thu, 14 Nov 2024 13:45:41 +0800 Subject: [PATCH 3/5] fix Signed-off-by: zirain --- examples/static-file-server/Dockerfile | 2 +- examples/static-file-server/main.go | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/examples/static-file-server/Dockerfile b/examples/static-file-server/Dockerfile index 83b3238f1ce..1f1268a2197 100644 --- a/examples/static-file-server/Dockerfile +++ b/examples/static-file-server/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.23.1 AS builder +FROM golang:1.23.3 AS builder ARG GO_LDFLAGS="" diff --git a/examples/static-file-server/main.go b/examples/static-file-server/main.go index 312621e57c6..1a82c1ae37f 100644 --- a/examples/static-file-server/main.go +++ b/examples/static-file-server/main.go @@ -1,3 +1,8 @@ +// Copyright Envoy Gateway Authors +// SPDX-License-Identifier: Apache-2.0 +// The full text of the Apache license is available in the LICENSE file at +// the root of the repo. + package main import ( From 4fa4e9ce815fe1b244aa82668fab26543ff450a8 Mon Sep 17 00:00:00 2001 From: zirain Date: Thu, 14 Nov 2024 16:00:20 +0800 Subject: [PATCH 4/5] nit Signed-off-by: zirain --- test/e2e/testdata/wasm-http.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/e2e/testdata/wasm-http.yaml b/test/e2e/testdata/wasm-http.yaml index 0a26426b905..080fa3e4976 100644 --- a/test/e2e/testdata/wasm-http.yaml +++ b/test/e2e/testdata/wasm-http.yaml @@ -69,7 +69,7 @@ spec: code: type: HTTP http: - uri: http://static-file-server.gateway-conformance-infra/wasm/envoy_filter_http_wasm_example.wasm + url: http://static-file-server.gateway-conformance-infra/wasm/envoy_filter_http_wasm_example.wasm sha256: 79c9f85128bb0177b6511afa85d587224efded376ac0ef76df56595f1e6315c0 --- apiVersion: gateway.envoyproxy.io/v1alpha1 @@ -88,4 +88,4 @@ spec: code: type: HTTP http: - uri: http://static-file-server.gateway-conformance-infra/wasm/envoy_filter_http_wasm_example.wasm + url: http://static-file-server.gateway-conformance-infra/wasm/envoy_filter_http_wasm_example.wasm From 97249a0afda3957ee66136cd7dbd7797d888aa26 Mon Sep 17 00:00:00 2001 From: zirain Date: Thu, 14 Nov 2024 16:26:13 +0800 Subject: [PATCH 5/5] 1.23.3 Signed-off-by: zirain --- examples/static-file-server/go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/static-file-server/go.mod b/examples/static-file-server/go.mod index 05f8ff7da2f..69cc2a932da 100644 --- a/examples/static-file-server/go.mod +++ b/examples/static-file-server/go.mod @@ -1,3 +1,3 @@ module github.com/envoyproxy/static-file-server -go 1.23.1 +go 1.23.3