Skip to content

Commit 68638b0

Browse files
committed
Use Envoy ConfigMap in base metadata config.
Update from utilizing config added via Dockerfile, to match TLS config formatting. Signed-off-by: agoins <alyssacgoins@gmail.com>
1 parent ecf6897 commit 68638b0

3 files changed

Lines changed: 86 additions & 0 deletions

File tree

manifests/kustomize/base/metadata/base/kustomization.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ resources:
55
- metadata-grpc-configmap.yaml
66
- metadata-grpc-deployment.yaml
77
- metadata-grpc-service.yaml
8+
- metadata-envoy-configmap.yaml
89
- metadata-envoy-deployment.yaml
910
- metadata-envoy-service.yaml
1011
- metadata-grpc-sa.yaml
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
apiVersion: v1
2+
kind: ConfigMap
3+
metadata:
4+
name: metadata-envoy-configmap
5+
data:
6+
envoy-config.yaml: |-
7+
admin:
8+
access_log:
9+
name: admin_access
10+
typed_config:
11+
"@type": type.googleapis.com/envoy.extensions.access_loggers.file.v3.FileAccessLog
12+
path: /tmp/admin_access.log
13+
address:
14+
socket_address: { address: 0.0.0.0, port_value: 9901 }
15+
16+
static_resources:
17+
listeners:
18+
- name: listener_0
19+
address:
20+
socket_address: { address: 0.0.0.0, port_value: 9090 }
21+
filter_chains:
22+
- filters:
23+
- name: envoy.filters.network.http_connection_manager
24+
typed_config:
25+
"@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
26+
codec_type: auto
27+
stat_prefix: ingress_http
28+
route_config:
29+
name: local_route
30+
virtual_hosts:
31+
- name: local_service
32+
domains: [ "*" ]
33+
routes:
34+
- match: { prefix: "/" }
35+
route:
36+
cluster: metadata-cluster
37+
max_stream_duration:
38+
grpc_timeout_header_max: '0s'
39+
typed_per_filter_config:
40+
envoy.filter.http.cors:
41+
"@type": type.googleapis.com/envoy.extensions.filters.http.cors.v3.CorsPolicy
42+
allow_origin_string_match:
43+
- safe_regex:
44+
regex: ".*"
45+
allow_methods: GET, PUT, DELETE, POST, OPTIONS
46+
allow_headers: keep-alive,user-agent,cache-control,content-type,content-transfer-encoding,custom-header-1,x-accept-content-transfer-encoding,x-accept-response-streaming,x-user-agent,x-grpc-web,grpc-timeout
47+
max_age: "1728000"
48+
expose_headers: custom-header-1,grpc-status,grpc-message
49+
http_filters:
50+
- name: envoy.filters.http.grpc_web
51+
typed_config:
52+
"@type": type.googleapis.com/envoy.extensions.filters.http.grpc_web.v3.GrpcWeb
53+
- name: envoy.filters.http.cors
54+
typed_config:
55+
"@type": type.googleapis.com/envoy.extensions.filters.http.cors.v3.Cors
56+
- name: envoy.filters.http.router
57+
typed_config:
58+
"@type": type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
59+
clusters:
60+
- name: metadata-cluster
61+
connect_timeout: 30.0s
62+
type: logical_dns
63+
typed_extension_protocol_options:
64+
envoy.extensions.upstreams.http.v3.HttpProtocolOptions:
65+
"@type": type.googleapis.com/envoy.extensions.upstreams.http.v3.HttpProtocolOptions
66+
explicit_http_config:
67+
http2_protocol_options: { }
68+
lb_policy: round_robin
69+
load_assignment:
70+
cluster_name: metadata-grpc
71+
endpoints:
72+
- lb_endpoints:
73+
- endpoint:
74+
address:
75+
socket_address:
76+
address: metadata-grpc-service
77+
port_value: 8080

manifests/kustomize/base/metadata/base/metadata-envoy-deployment.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ spec:
1818
containers:
1919
- name: container
2020
image: ghcr.io/kubeflow/kfp-metadata-envoy:dummy
21+
args: [ "/etc/envoy/envoy-config.yaml" ]
2122
ports:
2223
- name: md-envoy
2324
containerPort: 9090
@@ -33,3 +34,10 @@ spec:
3334
capabilities:
3435
drop:
3536
- ALL
37+
volumeMounts:
38+
- name: envoy-config
39+
mountPath: /etc/envoy
40+
volumes:
41+
- name: envoy-config
42+
configMap:
43+
name: metadata-envoy-configmap

0 commit comments

Comments
 (0)