Skip to content

Commit 712105e

Browse files
authored
Merge branch 'develop' into chore/bump_wrappers
2 parents e5dc4e5 + 7cd16dc commit 712105e

File tree

24 files changed

+727
-44
lines changed

24 files changed

+727
-44
lines changed

.github/workflows/ami-release.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,16 @@ jobs:
3030
- name: Checkout Repo
3131
uses: actions/checkout@v3
3232

33+
- name: Run checks if triggered manually
34+
if: ${{ github.event_name == 'workflow_dispatch' }}
35+
# Update `ci.yaml` too if changing constraints.
36+
run: |
37+
SUFFIX=$(sed -E 's/postgres-version = "[0-9\.]+(.*)"/\1/g' common.vars.pkr.hcl)
38+
if [[ -z $SUFFIX ]] ; then
39+
echo "Version must include non-numeric characters if built manually."
40+
exit 1
41+
fi
42+
3343
- id: args
3444
uses: mikefarah/yq@master
3545
with:

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ on:
44
pull_request:
55

66
jobs:
7-
87
check-release-version:
98
timeout-minutes: 5
109
runs-on: ubuntu-latest
@@ -13,6 +12,7 @@ jobs:
1312
uses: actions/checkout@v3
1413

1514
- name: Run checks
15+
# Update `ami-release.yaml` too if changing constraints.
1616
run: |
1717
SUFFIX=$(sed -E 's/postgres-version = "[0-9\.]+(.*)"/\1/g' common.vars.pkr.hcl)
1818
if [[ -n $SUFFIX ]] ; then

ansible/files/adminapi.sudoers.conf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
Cmnd_Alias ENVOY = /bin/systemctl start envoy.service, /bin/systemctl stop envoy.service, /bin/systemctl restart envoy.service, /bin/systemctl disable envoy.service, /bin/systemctl enable envoy.service, /bin/systemctl reload envoy.service
12
Cmnd_Alias KONG = /bin/systemctl start kong.service, /bin/systemctl stop kong.service, /bin/systemctl restart kong.service, /bin/systemctl disable kong.service, /bin/systemctl enable kong.service, /bin/systemctl reload kong.service
23
Cmnd_Alias POSTGREST = /bin/systemctl start postgrest.service, /bin/systemctl stop postgrest.service, /bin/systemctl restart postgrest.service, /bin/systemctl disable postgrest.service, /bin/systemctl enable postgrest.service
34
Cmnd_Alias GOTRUE = /bin/systemctl start gotrue.service, /bin/systemctl stop gotrue.service, /bin/systemctl restart gotrue.service, /bin/systemctl disable gotrue.service, /bin/systemctl enable gotrue.service
@@ -20,6 +21,7 @@ Cmnd_Alias PGBOUNCER = /bin/systemctl start pgbouncer.service, /bin/systemctl st
2021
%adminapi ALL= NOPASSWD: /bin/systemctl restart services.slice
2122
%adminapi ALL= NOPASSWD: /usr/sbin/nft -f /etc/nftables/supabase_managed.conf
2223
%adminapi ALL= NOPASSWD: /usr/bin/admin-mgr
24+
%adminapi ALL= NOPASSWD: ENVOY
2325
%adminapi ALL= NOPASSWD: KONG
2426
%adminapi ALL= NOPASSWD: POSTGREST
2527
%adminapi ALL= NOPASSWD: GOTRUE

ansible/files/envoy.service

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
[Unit]
2+
Description=Envoy
3+
After=postgrest.service gotrue.service adminapi.service
4+
Wants=postgrest.service gotrue.service adminapi.service
5+
Conflicts=kong.service
6+
7+
[Service]
8+
Type=simple
9+
10+
# Need to run via a restarter script to support hot restart when using a process
11+
# manager, see:
12+
# https://www.envoyproxy.io/docs/envoy/latest/operations/hot_restarter
13+
ExecStart=/opt/envoy-hot-restarter.py /opt/start-envoy.sh
14+
15+
ExecReload=/bin/kill -HUP $MAINPID
16+
ExecStop=/bin/kill -TERM $MAINPID
17+
User=envoy
18+
Slice=services.slice
19+
Restart=always
20+
RestartSec=3
21+
LimitNOFILE=100000
22+
23+
# The envoy user is unpriviledged and thus not permited to bind on ports < 1024
24+
# Via systemd we grant the process a set of priviledges to bind to 80/443
25+
# See http://archive.vn/36zJU
26+
AmbientCapabilities=CAP_NET_BIND_SERVICE
27+
28+
[Install]
29+
WantedBy=multi-user.target

ansible/files/envoy_config/cds.yaml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
resources:
2+
- '@type': type.googleapis.com/envoy.config.cluster.v3.Cluster
3+
name: admin_api
4+
load_assignment:
5+
cluster_name: admin_api
6+
endpoints:
7+
- lb_endpoints:
8+
- endpoint:
9+
address:
10+
socket_address:
11+
address: 127.0.0.1
12+
port_value: 8085
13+
- '@type': type.googleapis.com/envoy.config.cluster.v3.Cluster
14+
name: gotrue
15+
load_assignment:
16+
cluster_name: gotrue
17+
endpoints:
18+
- lb_endpoints:
19+
- endpoint:
20+
address:
21+
socket_address:
22+
address: 127.0.0.1
23+
port_value: 9999
24+
- '@type': type.googleapis.com/envoy.config.cluster.v3.Cluster
25+
name: postgrest
26+
load_assignment:
27+
cluster_name: postgrest
28+
endpoints:
29+
- lb_endpoints:
30+
- endpoint:
31+
address:
32+
socket_address:
33+
address: 127.0.0.1
34+
port_value: 3000
35+
- '@type': type.googleapis.com/envoy.config.cluster.v3.Cluster
36+
name: postgrest_admin
37+
load_assignment:
38+
cluster_name: postgrest_admin
39+
endpoints:
40+
- lb_endpoints:
41+
- endpoint:
42+
address:
43+
socket_address:
44+
address: 127.0.0.1
45+
port_value: 3001
46+

ansible/files/envoy_config/envoy.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
dynamic_resources:
2+
cds_config:
3+
path_config_source:
4+
path: /etc/envoy/cds.yaml
5+
resource_api_version: V3
6+
lds_config:
7+
path_config_source:
8+
path: /etc/envoy/lds.yaml
9+
resource_api_version: V3
10+
node:
11+
cluster: cluster_0
12+
id: node_0
13+
overload_manager:
14+
resource_monitors:
15+
- name: envoy.resource_monitors.global_downstream_max_connections
16+
typed_config:
17+
'@type': >-
18+
type.googleapis.com/envoy.extensions.resource_monitors.downstream_connections.v3.DownstreamConnectionsConfig
19+
max_active_downstream_connections: 30000
20+
stats_config:
21+
stats_matcher:
22+
reject_all: true
23+

0 commit comments

Comments
 (0)