-
Notifications
You must be signed in to change notification settings - Fork 282
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dashboard: Use envoy instead of ingress
Since ingress doesn't currently work on Windows, use envoy to do SSL termination and do Kubernetes-level service port forwarding instead. This also means it will work without traefik.
- Loading branch information
Showing
10 changed files
with
210 additions
and
12 deletions.
There are no files selected for viewing
120 changes: 120 additions & 0 deletions
120
pkg/rancher-desktop/assets/scripts/rancher-manager-envoy.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,120 @@ | ||
# yaml-language-server: $schema=https://github.com/jcchavezs/envoy-config-schema/releases/download/v1.21.0/v3_Bootstrap.json | ||
--- | ||
static_resources: | ||
listeners: | ||
- name: tls-termination | ||
address: | ||
socket_address: | ||
protocol: TCP | ||
address: 0.0.0.0 | ||
port_value: 9443 | ||
filter_chains: | ||
- filters: | ||
- name: envoy.filters.network.http_connection_manager | ||
typed_config: | ||
"@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager | ||
stat_prefix: rancher_manager | ||
route_config: | ||
name: route | ||
virtual_hosts: | ||
- name: app | ||
domains: [ "*" ] | ||
routes: | ||
- match: { prefix: / } | ||
route: | ||
cluster: rancher-manager | ||
host_rewrite_literal: localhost | ||
append_x_forwarded_host: true | ||
request_headers_to_add: | ||
- header: { key: X-Forwarded-Proto, value: https } | ||
append_action: OVERWRITE_IF_EXISTS_OR_ADD | ||
- header: { key: X-Forwarded-Port, value: '443' } | ||
append_action: OVERWRITE_IF_EXISTS_OR_ADD | ||
- header: { key: X-Forwarded-For, value: '192.0.2.1' } | ||
append_action: OVERWRITE_IF_EXISTS_OR_ADD | ||
http_filters: | ||
- name: envoy.filters.http.router | ||
typed_config: | ||
"@type": type.googleapis.com/envoy.extensions.filters.http.router.v3.Router | ||
transport_socket: | ||
name: envoy.transport_sockets.tls | ||
typed_config: | ||
"@type": type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.DownstreamTlsContext | ||
common_tls_context: | ||
tls_certificates: | ||
# openssl req -x509 -newkey rsa:2048 -keyout key.pem -out crt.pem | ||
# -days 36500 -nodes -subj '/CN=rancher-manager-https-termination' | ||
# Per CA/B BR 6.1.5 RSA keys are a minimum of 2048 bits; and ECDSA | ||
# keys must be ST P‐256, NIST P‐384 or NIST P‐521. | ||
- certificate_chain: | ||
inline_string: | | ||
-----BEGIN CERTIFICATE----- | ||
MIIDOzCCAiOgAwIBAgIUA4weh/2CMM0zwHuSIhkbaFEvqRMwDQYJKoZIhvcNAQEL | ||
BQAwLDEqMCgGA1UEAwwhcmFuY2hlci1tYW5hZ2VyLWh0dHBzLXRlcm1pbmF0aW9u | ||
MCAXDTI0MDgxNTIzNDI0OFoYDzIxMjQwNzIyMjM0MjQ4WjAsMSowKAYDVQQDDCFy | ||
YW5jaGVyLW1hbmFnZXItaHR0cHMtdGVybWluYXRpb24wggEiMA0GCSqGSIb3DQEB | ||
AQUAA4IBDwAwggEKAoIBAQDbpo3Nvrvi6Ev5MGX1ukYh3Tuu03MHtzimGZs/0U+r | ||
LJoVLBkWd4fUNit1wfvYSOJEdb1WMeU/IS36AzmTs4vkRVpilcow5LLklrmn2XJf | ||
M7uvzUzBCzz6VnP7D0ltcD2u3VDplQv/doqm6p0vKE6CpYiaSjGq5ks6DPXaJZKO | ||
2HAtDjuIYJq8Dg+BwnkHmFHD30vpl7+LmnZ7WTmJlg1cqSCHDLKeNrVbTD9ua6GD | ||
4ImK+kLQQXPsvMM1QZXIg7mWslBLD9ucQosTSzCN9aVFqNnd3Nx2Ir5G0tc6ZwKg | ||
cDawJyc3fYUQocNhKlJPa+eQl5u0quzCRsqRTTNlCV/HAgMBAAGjUzBRMB0GA1Ud | ||
DgQWBBRlRLHhQ1GwgWJHglLSaLiw7gaPyjAfBgNVHSMEGDAWgBRlRLHhQ1GwgWJH | ||
glLSaLiw7gaPyjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQAr | ||
SPAIOVGSuVa8z+Va9+J6fG+TrCx2pR6HUlayDpWfZ6LZXN4lIQ1Nrfnt2amwxbRA | ||
95gxSnJyAXS2jLaLLuqR1fCKFE/xxH7TyVyShr3mUUyP7rt/iHlig9Io3lST9mbk | ||
/4ovlHJEQcgn+5TEfwzDzq76arvaLqpMKQk7p0V2F/YCoEE0V6d9ZMmgfyTG3ayA | ||
wh1oodQFKrA8vXyhbIUP+kM5KAxm0qxQaYNbZfXTkCw4CEGSVxDv8hY1S606QUdS | ||
/YYG4HHEzdSVqeDsV1F6mD28TMZfnOpP6OFLxLhi2TOwwsWPRwoxwL0H+i7glWUS | ||
682jYqxqLq+/OKsX+6Ul | ||
Check failure on line 69 in pkg/rancher-desktop/assets/scripts/rancher-manager-envoy.yaml GitHub Actions / Check Spelling
|
||
-----END CERTIFICATE----- | ||
private_key: | ||
inline_string: | | ||
-----BEGIN PRIVATE KEY----- | ||
MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDbpo3Nvrvi6Ev5 | ||
MGX1ukYh3Tuu03MHtzimGZs/0U+rLJoVLBkWd4fUNit1wfvYSOJEdb1WMeU/IS36 | ||
AzmTs4vkRVpilcow5LLklrmn2XJfM7uvzUzBCzz6VnP7D0ltcD2u3VDplQv/doqm | ||
6p0vKE6CpYiaSjGq5ks6DPXaJZKO2HAtDjuIYJq8Dg+BwnkHmFHD30vpl7+LmnZ7 | ||
WTmJlg1cqSCHDLKeNrVbTD9ua6GD4ImK+kLQQXPsvMM1QZXIg7mWslBLD9ucQosT | ||
SzCN9aVFqNnd3Nx2Ir5G0tc6ZwKgcDawJyc3fYUQocNhKlJPa+eQl5u0quzCRsqR | ||
TTNlCV/HAgMBAAECggEAA038MC5AcWeBTRx3TD0jNPs5HKY9ws304jrcZRdnFXI0 | ||
V0E0l2vw9TZjbQ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||
F8wWQhREOONC10MJ2ADj4FoPgbMghdfbpkHDTC0FFQqi4gCOLpU7h4H8/PDOl9vL | ||
yXe6fabXFZrFrTa9IYO1ImWa6lkOWY4hO7DcKqWQzHFll93+Cs0STAhdSfEad0Fe | ||
Sibf5N6AjHN4gWm/gCnn2nw= | ||
Check failure on line 99 in pkg/rancher-desktop/assets/scripts/rancher-manager-envoy.yaml GitHub Actions / Check Spelling
|
||
-----END PRIVATE KEY----- | ||
clusters: | ||
- name: rancher-manager | ||
type: STRICT_DNS | ||
load_assignment: | ||
cluster_name: rancher-manager | ||
endpoints: | ||
- lb_endpoints: | ||
- endpoint: | ||
address: | ||
socket_address: | ||
address: rancher-manager.cattle-system.svc | ||
port_value: 80 | ||
health_checks: | ||
- timeout: 1s | ||
interval: 30s | ||
unhealthy_threshold: 5 | ||
healthy_threshold: 1 | ||
http_health_check: | ||
host: localhost | ||
path: /healthz |
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
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
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
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
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