Skip to content

Commit

Permalink
Update docs for non-linux install
Browse files Browse the repository at this point in the history
  • Loading branch information
adam-cattermole committed Dec 13, 2023
1 parent 54b05a5 commit 99a0c28
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 3 deletions.
10 changes: 7 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -285,9 +285,13 @@ local-deploy: ## Deploy Kuadrant Operator in the cluster pointed by KUBECONFIG
@echo
@echo "Now you can export the kuadrant gateway by doing:"
@echo "kubectl port-forward -n istio-system service/istio-ingressgateway-istio 9080:80 &"
@echo "after that, you can curl -H \"Host: myhost.com\" localhost:9080"
@echo "-- Linux only -- Ingress gateway is exported using nodePort service in port 9080"
@echo "curl -H \"Host: myhost.com\" localhost:9080"
@echo "export GATEWAY_URL=localhost:9080"
@echo "after that, you can curl -H \"Host: myhost.com\" \$$GATEWAY_URL"
@echo "-- Linux only -- Ingress gateway is exported using loadbalancer service in port 80"
@echo "export INGRESS_HOST=\$$(kubectl get gtw istio-ingressgateway -n istio-system -o jsonpath='{.status.addresses[0].value}')"
@echo "export INGRESS_PORT=\$$(kubectl get gtw istio-ingressgateway -n istio-system -o jsonpath='{.spec.listeners[?(@.name=="http")].port}')"
@echo "export GATEWAY_URL=\$$INGRESS_HOST:\$$INGRESS_PORT"
@echo "curl -H \"Host: myhost.com\" \$$GATEWAY_URL"
@echo

.PHONY: local-setup
Expand Down
11 changes: 11 additions & 0 deletions doc/user-guides/authenticated-rl-for-app-developers.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,17 @@ curl -H 'Host: api.toystore.com' http://$GATEWAY_URL/toy -i
# HTTP/1.1 200 OK
```

> **Note**: If the command above fails to hit the Toy Store API on your environment, try forwarding requests to the service and accessing over localhost:
>
> ```sh
> kubectl port-forward -n istio-system service/istio-ingressgateway-istio 9080:80 2>&1 >/dev/null &
> export GATEWAY_URL=localhost:9080
> ```
> ```sh
> curl -H 'Host: api.toystore.com' http://$GATEWAY_URL/toy -i
> # HTTP/1.1 200 OK
> ```
### ③ Enforce authentication on requests to the Toy Store API
Create a Kuadrant `AuthPolicy` to configure the authentication:
Expand Down
11 changes: 11 additions & 0 deletions doc/user-guides/authenticated-rl-with-jwt-and-k8s-authnz.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,17 @@ curl -H 'Host: api.toystore.com' http://$GATEWAY_URL/toy -i

It should return `200 OK`.

> **Note**: If the command above fails to hit the Toy Store API on your environment, try forwarding requests to the service and accessing over localhost:
>
> ```sh
> kubectl port-forward -n istio-system service/istio-ingressgateway-istio 9080:80 2>&1 >/dev/null &
> export GATEWAY_URL=localhost:9080
> ```
> ```sh
> curl -H 'Host: api.toystore.com' http://$GATEWAY_URL/toy -i
> # HTTP/1.1 200 OK
> ```
### ③ Deploy Keycloak
Create the namesapce:
Expand Down
11 changes: 11 additions & 0 deletions doc/user-guides/simple-rl-for-app-developers.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,17 @@ curl -H 'Host: api.toystore.com' http://$GATEWAY_URL/toys -i
# HTTP/1.1 200 OK
```

> **Note**: If the command above fails to hit the Toy Store API on your environment, try forwarding requests to the service and accessing over localhost:
>
> ```sh
> kubectl port-forward -n istio-system service/istio-ingressgateway-istio 9080:80 2>&1 >/dev/null &
> export GATEWAY_URL=localhost:9080
> ```
> ```sh
> curl -H 'Host: api.toystore.com' http://$GATEWAY_URL/toys -i
> # HTTP/1.1 200 OK
> ```
### ③ Enforce rate limiting on requests to the Toy Store API
Create a Kuadrant `RateLimitPolicy` to configure rate limiting:
Expand Down

0 comments on commit 99a0c28

Please sign in to comment.