Skip to content

Commit 75563d7

Browse files
authored
fix: Add higress-controller:8889 cluster for ACME challenge route (#262)
Signed-off-by: CH3CHO <ch3cho@qq.com>
1 parent 175e76b commit 75563d7

2 files changed

Lines changed: 65 additions & 0 deletions

File tree

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
apiVersion: networking.istio.io/v1alpha3
2+
kind: EnvoyFilter
3+
metadata:
4+
name: higress-http-resolver-cluster
5+
namespace: higress-system
6+
spec:
7+
configPatches:
8+
- applyTo: CLUSTER
9+
match:
10+
context: GATEWAY
11+
patch:
12+
operation: ADD
13+
value:
14+
name: "outbound|8889||higress-controller.higress-system.svc.cluster.local"
15+
type: STATIC
16+
connect_timeout: 5s
17+
lb_policy: ROUND_ROBIN
18+
load_assignment:
19+
cluster_name: "outbound|8889||higress-controller.higress-system.svc.cluster.local"
20+
endpoints:
21+
- lb_endpoints:
22+
- endpoint:
23+
address:
24+
socket_address:
25+
address: 127.0.0.1
26+
port_value: 8889

compose/scripts/prepare.sh

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,44 @@ EOF
189189
fi
190190
}
191191

192+
checkController() {
193+
echo "Checking controller configurations..."
194+
195+
checkConfigExists "higress-system" "networking.istio.io/v1alpha3" "envoyfilters" "higress-http-resolver-cluster"
196+
if [ $? -ne 0 ]; then
197+
echo " The EnvoyFilter resource \"higress-http-resolver-cluster\" doesn't exist. Create it now..."
198+
read -r -d '' content <<EOF
199+
apiVersion: networking.istio.io/v1alpha3
200+
kind: EnvoyFilter
201+
metadata:
202+
name: higress-http-resolver-cluster
203+
namespace: higress-system
204+
spec:
205+
configPatches:
206+
- applyTo: CLUSTER
207+
match:
208+
context: GATEWAY
209+
patch:
210+
operation: ADD
211+
value:
212+
name: "outbound|8889||higress-controller.higress-system.svc.cluster.local"
213+
type: STRICT_DNS
214+
connect_timeout: 5s
215+
lb_policy: ROUND_ROBIN
216+
load_assignment:
217+
cluster_name: "outbound|8889||higress-controller.higress-system.svc.cluster.local"
218+
endpoints:
219+
- lb_endpoints:
220+
- endpoint:
221+
address:
222+
socket_address:
223+
address: controller.svc
224+
port_value: 8889
225+
EOF
226+
publishConfig "higress-system" "networking.istio.io/v1alpha3" "envoyfilters" "higress-http-resolver-cluster" "$content"
227+
fi
228+
}
229+
192230
checkPilot() {
193231
echo "Checking pilot configurations..."
194232

@@ -728,6 +766,7 @@ checkO11y() {
728766
}
729767

730768
checkStorage
769+
checkController
731770
checkPilot
732771
checkGateway
733772
checkConsole

0 commit comments

Comments
 (0)