Skip to content

Commit

Permalink
fix export
Browse files Browse the repository at this point in the history
  • Loading branch information
maleck13 committed Dec 8, 2023
1 parent 98d6fc4 commit 4804b5e
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions doc/user-guides/secure-protect-connect.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ spec:
name: glbc-ca
EOF
k wait tlspolicy api-gateway-tls -n kuadrant-system --for=condition=ready
kubectl wait tlspolicy api-gateway-tls -n kuadrant-system --for=condition=ready
```

Expand All @@ -95,7 +95,7 @@ Lets define a HTTPRoute and test our policy. We will re-use this with some of th
export INGRESS_PORT=$(kubectl get gtw api-gateway -o jsonpath='{.spec.listeners[?(@.name=="api")].port}' -n kuadrant-system)
export INGRESS_PORT=$(kubectl get gtw api-gateway -o jsonpath='{.spec.listeners[?(@.name=="api")].port}' -n kuadrant-system)
export INGRESS_HOST=$(kubectl get gtw api-gateway -o jsonpath='{.status.addresses[0].value}' -n kuadrant-system)
export GATEWAY_URL=$INGRESS_HOST:$INGRESS_PORT
Expand Down Expand Up @@ -168,7 +168,7 @@ spec:
EOF
k wait ratelimitpolicy infra-ratelimit -n kuadrant-system --for=condition=available
kubectl wait ratelimitpolicy infra-ratelimit -n kuadrant-system --for=condition=available
```

Expand All @@ -182,7 +182,7 @@ Here we should see `409s` start returning after the 5th request.

### Define a Gateway `AuthPolicy`

So communication is secured and we have some protection for our infrastrucure, but we do not trust any client to access our endpoints. By default we want to allow only authenticated access. To protect our gateway we will add a `DENY ALL` `AuthPolicy`. Later we will override this with a specific `AuthPolicy` for the API.
So communication is secured and we have some protection for our infrastructure, but we do not trust any client to access our endpoints. By default we want to allow only authenticated access. To protect our gateway we will add a `DENY ALL` `AuthPolicy`. Later we will override this with a specific `AuthPolicy` for the API.

```
kubectl --context kind-kuadrant-local apply -f - <<EOF
Expand Down Expand Up @@ -242,13 +242,13 @@ spec:
kind: Gateway
EOF
k wait dnspolicy simple-dnspolicy -n kuadrant-system --for=condition=ready
kubectl wait dnspolicy simple-dnspolicy -n kuadrant-system --for=condition=ready
```

If you want to see the DNSRecord created by the this policy, execute

```
k get dnsrecord api-gateway-api -n kuadrant-system -o=yaml
kubectl get dnsrecord api-gateway-api -n kuadrant-system -o=yaml
```

So now we have a wildcard DNS record to bring traffic to our gateway.
Expand Down Expand Up @@ -369,4 +369,4 @@ while :; do curl -k --write-out '%{http_code}\n' --silent --output /dev/null -H

```sh
while :; do curl -k --write-out '%{http_code}\n' --silent --output /dev/null -H 'Authorization: APIKEY IAMBOB' "https://api.$KUADRANT_ZONE_ROOT_DOMAIN/cars" | grep -E --color "\b(429)\b|$"; sleep 1; done
```
```

0 comments on commit 4804b5e

Please sign in to comment.