-
Notifications
You must be signed in to change notification settings - Fork 352
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(translation): allow configuration of hostEnvKeys on WASM extensions
exposes the hostEnvKeys configuration for WASM extensons through envoy extension policies. This enables access to env vars that are set on the host envoy processes and is a convenient way to share secret meterial with WASM extensions. Signed-off-by: Steve Gargan <steve.gargan@gmail.com>
- Loading branch information
Showing
14 changed files
with
732 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
123 changes: 123 additions & 0 deletions
123
internal/gatewayapi/testdata/envoyextensionpolicy-with-wasm-env-vars.in.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
secrets: | ||
- apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
namespace: envoy-gateway | ||
name: my-pull-secret | ||
data: | ||
.dockerconfigjson: VGhpc0lzTm90QVJlYWxEb2NrZXJDb25maWdKc29u | ||
gateways: | ||
- apiVersion: gateway.networking.k8s.io/v1 | ||
kind: Gateway | ||
metadata: | ||
namespace: envoy-gateway | ||
name: gateway-1 | ||
spec: | ||
gatewayClassName: envoy-gateway-class | ||
listeners: | ||
- name: http | ||
protocol: HTTP | ||
port: 80 | ||
allowedRoutes: | ||
namespaces: | ||
from: All | ||
httpRoutes: | ||
- apiVersion: gateway.networking.k8s.io/v1 | ||
kind: HTTPRoute | ||
metadata: | ||
namespace: default | ||
name: httproute-1 | ||
spec: | ||
hostnames: | ||
- www.example.com | ||
parentRefs: | ||
- namespace: envoy-gateway | ||
name: gateway-1 | ||
sectionName: http | ||
rules: | ||
- matches: | ||
- path: | ||
value: "/foo" | ||
backendRefs: | ||
- name: service-1 | ||
port: 8080 | ||
- apiVersion: gateway.networking.k8s.io/v1 | ||
kind: HTTPRoute | ||
metadata: | ||
namespace: default | ||
name: httproute-2 | ||
spec: | ||
hostnames: | ||
- www.example.com | ||
parentRefs: | ||
- namespace: envoy-gateway | ||
name: gateway-1 | ||
sectionName: http | ||
rules: | ||
- matches: | ||
- path: | ||
value: "/bar" | ||
backendRefs: | ||
- name: service-1 | ||
port: 8080 | ||
envoyextensionpolicies: | ||
- apiVersion: gateway.envoyproxy.io/v1alpha1 | ||
kind: EnvoyExtensionPolicy | ||
metadata: | ||
namespace: envoy-gateway | ||
name: policy-for-gateway # This policy should attach httproute-2 | ||
spec: | ||
targetRef: | ||
group: gateway.networking.k8s.io | ||
kind: Gateway | ||
name: gateway-1 | ||
wasm: | ||
- name: wasm-filter-1 | ||
code: | ||
type: HTTP | ||
http: | ||
url: https://www.example.com/wasm-filter-1.wasm | ||
sha256: 2d89c4c6ab2a1c615c7696ed37ade9e50654ac70384b5d45100eb08e62130ff4 | ||
env: | ||
hostKeys: | ||
- SOME_KEY | ||
- ANOTHER_KEY | ||
- name: wasm-filter-2 | ||
rootID: "my-root-id" | ||
code: | ||
type: Image | ||
image: | ||
url: oci://www.example.com/wasm-filter-2:v1.0.0 | ||
pullSecretRef: | ||
name: my-pull-secret | ||
sha256: 314100af781b98a8ca175d5bf90a8bf76576e20a2f397a88223404edc6ebfd46 | ||
env: | ||
hostKeys: | ||
- SOME_KEY | ||
- ANOTHER_KEY | ||
- code: | ||
type: Image | ||
image: | ||
url: www.example.com:8080/wasm-filter-3 | ||
- apiVersion: gateway.envoyproxy.io/v1alpha1 | ||
kind: EnvoyExtensionPolicy | ||
metadata: | ||
namespace: default | ||
name: policy-for-http-route # This policy should attach httproute-1 | ||
spec: | ||
targetRef: | ||
group: gateway.networking.k8s.io | ||
kind: HTTPRoute | ||
name: httproute-1 | ||
wasm: | ||
- name: wasm-filter-4 | ||
code: | ||
type: HTTP | ||
http: | ||
url: https://www.test.com/wasm-filter-4.wasm | ||
sha256: b6922722ab58109abfaa8d9eb16f339b38b2bb1c17076b083b34438b934e7463 | ||
failOpen: true | ||
env: | ||
hostKeys: | ||
- SOME_KEY | ||
- ANOTHER_KEY |
Oops, something went wrong.