forked from wolfi-dev/os
-
Notifications
You must be signed in to change notification settings - Fork 0
/
envoy-1.32.yaml
177 lines (162 loc) · 4.79 KB
/
envoy-1.32.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
package:
name: envoy-1.32
version: 1.32.2
epoch: 0
description: Cloud-native high-performance edge/middle/service proxy
copyright:
- license: Apache-2.0
resources:
cpu: 20
memory: 50Gi
dependencies:
provides:
- envoy=${{package.full-version}}
environment:
contents:
packages:
- bash
- bazel-6
- binutils
- build-base
- busybox
- ca-certificates-bundle
- clang~15
- cmake
- coreutils
- git
- libtool
- llvm-libcxx-15
- llvm-libcxx-15-dev
- llvm-libcxxabi-15
- llvm-lld-15
- llvm15
- llvm15-cmake-default
- llvm15-dev
- llvm15-tools
- openjdk-11
- patch
- python3-dev
- samurai
- wolfi-baselayout
pipeline:
- uses: git-checkout
with:
repository: https://github.com/envoyproxy/envoy
tag: v${{package.version}}
expected-commit: a0504e87c5a246cb097b37049b1e4dc7706c2a90
destination: envoy
- runs: |
export JAVA_HOME=/usr/lib/jvm/java-11-openjdk
mkdir -p .cache/bazel/_bazel_root
cd envoy
# The Python interpreter complains about being run as root, there's a flag to pass to disable that warning.
sed -i 's/envoy_dependencies_extra()/envoy_dependencies_extra(ignore_root_user_error=True)/g' WORKSPACE
./bazel/setup_clang.sh /usr
echo "build --config=libc++" >> user.bazelrc
bazel build --verbose_failures -c opt envoy
mkdir -p ${{targets.destdir}}/usr/bin/
mv bazel-bin/source/exe/envoy-static ${{targets.destdir}}/usr/bin/envoy
# We no longer need this cache dir, which has some writable files.
rm -rf ../.cache/bazel/_bazel_root
- uses: strip
subpackages:
- name: ${{package.name}}-oci-entrypoint
description: Entrypoint for using Envoy in OCI containers
dependencies:
runtime:
- busybox
provides:
- envoy-oci-entrypoint=${{package.full-version}}
pipeline:
- runs: |
mkdir -p ${{targets.subpkgdir}}/var/lib/envoy/init
cp envoy/ci/docker-entrypoint.sh ${{targets.subpkgdir}}/var/lib/envoy/init/envoy-entrypoint.sh
chmod +x ${{targets.subpkgdir}}/var/lib/envoy/init/envoy-entrypoint.sh
- name: ${{package.name}}-config
description: Default Envoy configuration
dependencies:
provides:
- envoy-config=${{package.full-version}}
pipeline:
- runs: |
mkdir -p ${{targets.subpkgdir}}/etc/envoy
cp envoy/configs/envoyproxy_io_proxy.yaml ${{targets.subpkgdir}}/etc/envoy/envoy.yaml
update:
enabled: true
github:
identifier: envoyproxy/envoy
strip-prefix: v
use-tag: true
tag-filter-prefix: v1.32
test:
environment:
contents:
packages:
- bash
- curl
- netcat-openbsd
- procps
- jq
pipeline:
- name: "Verify binary installation"
runs: |
envoy --version
envoy --help
- name: "Test Envoy admin interface startup"
uses: test/daemon-check-output
with:
setup: |
#!/bin/sh -e
cat > /tmp/minimal.yaml <<EOF
admin:
address:
socket_address:
address: 127.0.0.1
port_value: 9901
static_resources:
listeners: []
clusters: []
EOF
start: envoy --config-path /tmp/minimal.yaml --admin-address-path /tmp/admin.txt
timeout: 30
expected_output: |
starting main dispatch loop
all dependencies initialized
post: |
#!/bin/sh -e
# Get admin address
ADMIN_ADDR=$(cat /tmp/admin.txt)
# Test admin endpoints
curl -s "http://${ADMIN_ADDR}/server_info" | jq . || exit 1
curl -s "http://${ADMIN_ADDR}/stats" | grep envoy || exit 1
curl -s "http://${ADMIN_ADDR}/clusters" | jq . || exit 1
- name: "Test hot restart capability"
uses: test/daemon-check-output
with:
setup: |
#!/bin/sh -e
cat > /tmp/minimal.yaml <<EOF
admin:
address:
socket_address:
address: 127.0.0.1
port_value: 9901
static_resources:
listeners: []
clusters: []
EOF
start: envoy --config-path /tmp/minimal.yaml --restart-epoch 0
timeout: 30
expected_output: |
starting main dispatch loop
all dependencies initialized
post: |
#!/bin/sh -e
first_pid=$(pgrep -f "restart-epoch 0")
envoy --config-path /tmp/minimal.yaml --restart-epoch 1 &
sleep 2
# Verify both processes exist
if ! ps -p $first_pid > /dev/null; then
echo "Original Envoy process not found"
exit 1
fi