### Development Commands for Local Work Source: https://github.com/envoyproxy/gateway/blob/main/site/tools/benchmark-dashboard/README.md Commands to install dependencies, start the development server, and build for production. ```bash # Install dependencies npm install # Start development server npm run dev # Build for production npm run build ``` -------------------------------- ### Start Envoy Gateway server Source: https://github.com/envoyproxy/gateway/blob/main/examples/otel-headers/README.md Starts Envoy Gateway in standalone mode using the provided configuration file. Run from the example directory. ```bash envoy-gateway server --config-path envoy-gateway.yaml ``` -------------------------------- ### Example Dashboard Configuration Source: https://github.com/envoyproxy/gateway/blob/main/site/tools/benchmark-dashboard/README.md Example HTML showing a dashboard with dark theme, version v2.1.0, tabs overview and latency, and header shown. ```html
``` -------------------------------- ### Install chart from source code Source: https://github.com/envoyproxy/gateway/blob/main/charts/gateway-helm/README.md Installs the eg chart along with Gateway API CRDs and Envoy Gateway CRDs using make. ```shell make kube-deploy TAG=latest ``` -------------------------------- ### egctl operations table syntax examples Source: https://github.com/envoyproxy/gateway/blob/main/site/content/en/community/design/egctl.md Syntax examples for each egctl operation as listed in the operations table: version, config, analyze, and experimental. ```console egctl version ``` ```console egctl config ENTITY ``` ```console egctl analyze ``` ```console egctl experimental ``` -------------------------------- ### Start Envoy Gateway Source: https://github.com/envoyproxy/gateway/blob/main/site/content/en/community/design/config-api.md Starts Envoy Gateway without a configuration file, so it uses default configuration parameters. ```shell $ ./envoy-gateway ``` -------------------------------- ### Build the Dashboard with npm Source: https://github.com/envoyproxy/gateway/blob/main/site/tools/benchmark-dashboard/README.md Commands to install dependencies and build the dashboard for production. ```bash npm install npm run build ``` -------------------------------- ### BackendTrafficPolicy example with Gateway and HTTPRoute targets Source: https://github.com/envoyproxy/gateway/blob/main/site/content/en/community/design/backend-traffic-policy.md Example showing a GatewayClass, Gateway, two HTTPRoutes (ipv4-route and ipv6-route), and two BackendTrafficPolicy resources. The default-ipv-policy targets the Gateway with enableIPv6: false, while ipv6-support-policy targets the ipv6-route with enableIPv6: true, demonstrating how a policy targeting an xRoute overrides a policy targeting the Gateway. ```yaml apiVersion: gateway.networking.k8s.io/v1 kind: GatewayClass metadata: name: eg spec: controllerName: gateway.envoyproxy.io/gatewayclass-controller --- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: name: eg namespace: default spec: gatewayClassName: eg listeners: - name: http protocol: HTTP port: 80 --- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: name: ipv4-route namespace: default spec: parentRefs: - name: eg hostnames: - "www.foo.example.com" rules: - backendRefs: - group: "" kind: Service name: ipv4-service port: 3000 weight: 1 matches: - path: type: PathPrefix value: / --- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: name: ipv6-route namespace: default spec: parentRefs: - name: eg hostnames: - "www.bar.example.com" rules: - backendRefs: - group: "" kind: Service name: ipv6-service port: 3000 weight: 1 matches: - path: type: PathPrefix value: / --- apiVersion: gateway.envoyproxy.io/v1alpha1 kind: BackendTrafficPolicy metadata: name: default-ipv-policy namespace: default spec: protocols: enableIPv6: false targetRef: group: gateway.networking.k8s.io kind: Gateway name: eg --- apiVersion: gateway.envoyproxy.io/v1alpha1 kind: BackendTrafficPolicy metadata: name: ipv6-support-policy namespace: default spec: protocols: enableIPv6: true targetRef: group: gateway.networking.k8s.io kind: HTTPRoute name: ipv6-route ``` -------------------------------- ### Preview the documentation site locally Source: https://github.com/envoyproxy/gateway/blob/main/site/content/en/community/DOCS.md Starts a local server to preview the documentation site. ```shell make docs-serve ``` -------------------------------- ### Build the documentation site Source: https://github.com/envoyproxy/gateway/blob/main/site/content/en/community/DOCS.md Generates the static site files under site/public. ```bash make docs ``` -------------------------------- ### ScaleHTTPRoute benchmark latency results Source: https://github.com/envoyproxy/gateway/blob/main/test/benchmark/suite/testdata/markdown_output.md Full benchmark results for the ScaleHTTPRoute test case, showing latency percentiles for HTTP client latency, queueing and connection setup, request start to response end, blocking, and initiation to completion. The data includes sample counts, min/mean/max, and standard deviation for each metric. ```plaintext benchmark_http_client.latency_2xx (489025 samples) min: 135.832µs | mean: 1.206029ms | max: 473.694207ms | pstdev: 6.470055ms Percentile Count Value 0.500000 244542 438.127µs 0.750000 366785 546.047µs 0.800000 391239 584.511µs 0.900000 440125 751.775µs 0.950000 464574 1.100415ms 0.990625 484444 55.601151ms 0.999023 488548 60.461055ms Queueing and connection setup latency (489026 samples) min: 2.25µs | mean: 10.746µs | max: 181.919743ms | pstdev: 822.232µs Percentile Count Value 0.500000 245388 5.666µs 0.750000 367127 6.584µs 0.800000 392841 6.833µs 0.900000 440995 7.542µs 0.950000 464743 8.958µs 0.990625 484447 37.459µs 0.999023 488549 206.335µs Request start to response end (489025 samples) min: 135.16µs | mean: 1.205247ms | max: 473.694207ms | pstdev: 6.469448ms Percentile Count Value 0.500000 244566 437.679µs 0.750000 366783 545.567µs 0.800000 391232 583.935µs 0.900000 440124 751.071µs 0.950000 464575 1.099455ms 0.990625 484442 55.599103ms 0.999023 488548 60.461055ms Blocking. Results are skewed when significant numbers are reported here. (489026 samples) min: 59.834µs | mean: 1.224014ms | max: 565.084159ms | pstdev: 6.619735ms Percentile Count Value 0.500000 244568 452.175µs 0.750000 366794 561.471µs 0.800000 391224 600.543µs 0.900000 440130 772.031µs 0.950000 464576 1.126783ms 0.990625 484443 55.615487ms 0.999023 488549 60.481535ms Initiation to completion (490015 samples) min: 143µs | mean: 1.504828ms | max: 694.747135ms | pstdev: 9.302005ms Percentile Count Value 0.500000 245054 448.639µs 0.750000 367536 558.175µs 0.800000 392012 597.631µs 0.900000 441021 772.927µs 0.950000 465515 1.149055ms 0.990625 485424 57.298943ms 0.999023 489541 141.213695ms ``` -------------------------------- ### Run a specific Gateway API test example Source: https://github.com/envoyproxy/gateway/blob/main/site/content/en/community/DEVELOP.md Example of running the securitypolicy-with-jwt test. ```bash go test -v -timeout 30s github.com/envoyproxy/gateway/internal/gatewayapi \ -run TestTranslate/securitypolicy-with-jwt ``` -------------------------------- ### Install chart from DockerHub Source: https://github.com/envoyproxy/gateway/blob/main/charts/gateway-helm/README.md Installs the Envoy Gateway Helm chart from DockerHub with the specified version and namespace. ```shell helm install eg oci://docker.io/envoyproxy/gateway-helm --version v0.0.0-latest -n envoy-gateway-system --create-namespace ``` -------------------------------- ### Example 1: Gateway with compatible listeners (same port & protocol, different hostnames) Source: https://github.com/envoyproxy/gateway/blob/main/site/content/en/community/design/gatewayapi-translator.md Shows a Gateway with two compatible listeners on the same port and protocol but different hostnames. The listeners are compatible because they have unique hostnames. ```yaml kind: Gateway apiVersion: gateway.networking.k8s.io/v1 metadata: name: gateway-1 namespace: envoy-gateway spec: gatewayClassName: envoy-gateway listeners: - name: http protocol: HTTP port: 80 allowedRoutes: namespaces: from: All hostname: "*.envoygateway.io" - name: http protocol: HTTP port: 80 allowedRoutes: namespaces: from: All hostname: whales.envoygateway.io ``` -------------------------------- ### Example ecosystem.yaml entry Source: https://github.com/envoyproxy/gateway/blob/main/site/content/en/community/ECOSYSTEM.md Use this YAML structure to add your project to the ecosystem directory. Place your logo in site/static/logos and add this entry to site/data/ecosystem.yaml before opening a pull request. ```yaml - name: Project Name url: https://project-docs.io logo: /logos/your-project-logo.svg description: | Concise technical description of how your project integrates with Envoy Gateway. Example: "XDS controller for custom Envoy Gateway configurations" ``` -------------------------------- ### Install chart with crds.enabled=false Source: https://github.com/envoyproxy/gateway/blob/main/charts/gateway-helm/README.md Installs the eg chart without bundled CRDs and safe upgrade policy resources, assuming they are already present. ```shell helm install eg --create-namespace oci://docker.io/envoyproxy/gateway-helm --version v0.0.0-latest -n envoy-gateway-system --set crds.enabled=false ``` -------------------------------- ### Run make help to see available targets Source: https://github.com/envoyproxy/gateway/blob/main/site/content/en/community/DEVELOP.md Lists all available make targets for building, testing, and running Envoy Gateway. ```bash make help ``` -------------------------------- ### Example 2: Gateway with compatible listeners (same port & protocol, one hostname specified, one not) Source: https://github.com/envoyproxy/gateway/blob/main/site/content/en/community/design/gatewayapi-translator.md Shows a Gateway with two compatible listeners on the same port and protocol, where one specifies a hostname and the other does not. The listener without a hostname matches all hostnames, so the combination is compatible. ```yaml kind: Gateway apiVersion: gateway.networking.k8s.io/v1 metadata: name: gateway-1 namespace: envoy-gateway spec: gatewayClassName: envoy-gateway listeners: - name: http protocol: HTTP port: 80 allowedRoutes: namespaces: from: All hostname: "*.envoygateway.io" - name: http protocol: HTTP port: 80 allowedRoutes: namespaces: from: All ``` -------------------------------- ### egctl configuration retrieval examples Source: https://github.com/envoyproxy/gateway/blob/main/site/content/en/community/design/egctl.md Examples of using egctl config to retrieve proxy configuration from Envoy and rate limit configuration from the Rate Limit instance. ```console # Retrieve all information about proxy configuration from envoy egctl config envoy-proxy all # Retrieve listener information about proxy configuration from envoy egctl config envoy-proxy listener # Retrieve the relevant rate limit configuration from the Rate Limit instance egctl config envoy-ratelimit ``` -------------------------------- ### ClientTrafficPolicy example with Gateway and HTTPRoute Source: https://github.com/envoyproxy/gateway/blob/main/site/content/en/community/design/client-traffic-policy.md Example showing a GatewayClass, Gateway, HTTPRoute, and ClientTrafficPolicy resources. The ClientTrafficPolicy targets the Gateway 'eg' and enables ProxyProtocol with optional set to false. ```yaml apiVersion: gateway.networking.k8s.io/v1 kind: GatewayClass metadata: name: eg spec: controllerName: gateway.envoyproxy.io/gatewayclass-controller --- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: name: eg namespace: default spec: gatewayClassName: eg listeners: - name: http protocol: HTTP port: 80 --- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: name: backend namespace: default spec: parentRefs: - name: eg hostnames: - "www.example.com" rules: - backendRefs: - group: "" kind: Service name: backend port: 3000 weight: 1 matches: - path: type: PathPrefix value: / --- apiVersion: gateway.envoyproxy.io/v1alpha1 kind: ClientTrafficPolicy metadata: name: enable-proxy-protocol-policy namespace: default spec: targetRef: group: gateway.networking.k8s.io kind: Gateway name: eg namespace: default proxyProtocol: optional: false ```