johannes-engler-mw commented on code in PR #2703:
URL:
https://github.com/apache/apisix-ingress-controller/pull/2703#discussion_r2919724386
##########
test/e2e/scaffold/k8s.go:
##########
@@ -268,6 +268,28 @@ func (s *Scaffold) RunDigDNSClientFromK8s(args ...string)
(string, error) {
return s.RunKubectlAndGetOutput(kubectlArgs...)
}
+// RunCurlFromK8s runs a curl command from a temporary pod inside the cluster.
+// This is useful for making HTTP requests from within the cluster, avoiding
+// port-forward limitations where server_port variables may not work correctly.
+func (s *Scaffold) RunCurlFromK8s(args ...string) (string, error) {
+ podName := fmt.Sprintf("curl-test-%d", time.Now().UnixNano())
+ kubectlArgs := []string{
+ "run",
+ podName,
+ "--attach=true",
+ "--rm",
+ "--restart=Never",
+ "--image-pull-policy=IfNotPresent",
+ "--image=alpine/curl:latest",
Review Comment:
Implemented
##########
Makefile:
##########
@@ -185,9 +185,10 @@ kind-down:
.PHONY: kind-load-images
kind-load-images: pull-infra-images kind-load-ingress-image kind-load-adc-image
- @kind load docker-image kennethreitz/httpbin:latest --name $(KIND_NAME)
+ @kind load docker-image kennethreitz/httpbin:latest --name $(KIND_NAME)
@kind load docker-image jmalloc/echo-server:latest --name $(KIND_NAME)
@kind load docker-image openresty/openresty:1.27.1.2-4-bullseye-fat
--name $(KIND_NAME)
+ @kind load docker-image alpine/curl:latest --name $(KIND_NAME)
Review Comment:
Implemented
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]