-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
* change to test ci * Change to single file * Add Check CI * Remove Report CI * Update action title * Remove protocol * Remove report * Add envoy test config * Rename custom.yml to submit_rpc.yml
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: Check | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
|
||
jobs: | ||
deploy-rpc: | ||
name: Deploy rpc | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Install dependencies | ||
env: | ||
GOMPLATE_VERSION: 3.11.4 | ||
MILLER_VERSION: 6.7.0 | ||
run: | | ||
BIN_PATH=$HOME/.local/bin | ||
rm -rf ${BIN_PATH} || true | ||
mkdir -p ${BIN_PATH} | ||
# gomplate | ||
curl -L -o ${BIN_PATH}/gomplate \ | ||
https://github.com/hairyhenderson/gomplate/releases/download/v${GOMPLATE_VERSION}/gomplate_linux-amd64 | ||
# miller | ||
curl -LO https://github.com/johnkerl/miller/releases/download/v${MILLER_VERSION}/miller-${MILLER_VERSION}-linux-amd64.tar.gz | ||
tar -zxf miller-${MILLER_VERSION}-linux-amd64.tar.gz -C ./ | ||
mv miller-${MILLER_VERSION}-linux-amd64/mlr $BIN_PATH/ | ||
# set execute permission | ||
chmod +x ${BIN_PATH}/gomplate | ||
chmod +x ${BIN_PATH}/mlr | ||
# clean | ||
rm -rf miller-* | ||
- name: Generate cds | ||
run: scripts/generate-cds.sh | ||
|
||
- name: Preview changes | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GH_TKN_DARWINIA }} | ||
run: cat dist/cds.local.yaml |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,7 @@ generated | |
*.dep.txt | ||
*.log | ||
*.local.* | ||
*.env | ||
|
||
package-lock.json | ||
dist |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
PATH_CONF=/path/to/envoy/conf |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
node: | ||
cluster: cluster-1 | ||
id: envoy-instance-1 | ||
|
||
admin: | ||
access_log_path: "/dev/stdout" | ||
address: | ||
socket_address: | ||
address: 0.0.0.0 | ||
port_value: 15000 | ||
|
||
# 动态配置 | ||
dynamic_resources: | ||
lds_config: | ||
path: "/etc/envoy/lds.yaml" | ||
cds_config: | ||
path: "/etc/envoy/cds.local.yaml" | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
version_info: "0" | ||
resources: | ||
- "@type": type.googleapis.com/envoy.config.listener.v3.Listener | ||
name: listener_0 | ||
address: | ||
socket_address: | ||
address: 0.0.0.0 | ||
port_value: 15001 | ||
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 | ||
codec_type: auto | ||
stat_prefix: ingress_http | ||
access_log: | ||
name: envoy.access_loggers.file | ||
typed_config: | ||
"@type": type.googleapis.com/envoy.extensions.access_loggers.file.v3.FileAccessLog | ||
path: /dev/stdout | ||
http_filters: | ||
- name: envoy.filters.http.router | ||
typed_config: | ||
"@type": type.googleapis.com/envoy.extensions.filters.http.router.v3.Router | ||
upgrade_configs: | ||
- upgrade_type: websocket | ||
request_id_extension: | ||
typed_config: | ||
"@type": type.googleapis.com/envoy.extensions.request_id.uuid.v3.UuidRequestIdConfig | ||
pack_trace_reason: false | ||
use_request_id_for_trace_sampling: true | ||
rds: | ||
route_config_name: route_config_1 | ||
config_source: | ||
path: /etc/envoy/rds.yaml |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
version_info: "0" | ||
resources: | ||
- "@type": type.googleapis.com/envoy.config.route.v3.RouteConfiguration | ||
name: route_config_1 | ||
virtual_hosts: | ||
- name: backend | ||
domains: | ||
- "*" | ||
routes: | ||
- match: | ||
prefix: "/" | ||
# headers: | ||
# - name: ":authority" | ||
# exact_match: "localhost" | ||
route: | ||
cluster: cds_crab_rpc | ||
host_rewrite_literal: localhost | ||
retry_policy: | ||
retry_on: "5xx" | ||
num_retries: 5 | ||
|
||
- match: | ||
prefix: "/" | ||
# headers: | ||
# - name: ":authority" | ||
# exact_match: "localhost" | ||
route: | ||
cluster: cds_darwinia_rpc | ||
host_rewrite_literal: localhost | ||
retry_policy: | ||
retry_on: "5xx" | ||
num_retries: 5 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
version: '3' | ||
services: | ||
|
||
envoy: | ||
container_name: envoy | ||
image: envoyproxy/envoy:v1.26-latest | ||
network_mode: host | ||
restart: always | ||
volumes: | ||
- /etc/localtime:/etc/localtime | ||
- ${PATH_CONF}:/etc/envoy | ||
|
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.