Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix curl command for OpenShift #634

Merged
merged 2 commits into from
Nov 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 1 addition & 55 deletions content/en/docs/scaling/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -251,43 +251,17 @@ Now, execute the corresponding loop command for your operating system in another
Linux:

{{% onlyWhen openshift %}}
{{% onlyWhenNot baloise %}}

```bash
URL=$(oc get routes example-web-app -o go-template="{{ .spec.host }}" --namespace <namespace>)
while true; do sleep 1; curl -s http://${URL}/pod/; date "+ TIME: %H:%M:%S,%3N"; done
```

{{% /onlyWhenNot %}}
{{% onlyWhen baloise %}}

```bash
URL=$(oc get routes example-web-app -o go-template="{{ .spec.host }}" --namespace <namespace>)
while true; do sleep 1; curl -s https://${URL}/pod/; date "+ TIME: %H:%M:%S,%3N"; done
```

{{% /onlyWhen %}}
{{% /onlyWhen %}}
{{% onlyWhenNot openshift %}}
```bash
URL=$(kubectl get ingress example-web-app -o go-template="{{ (index .spec.rules 0).host }}" --namespace <namespace>)
while true; do sleep 1; curl -s https://${URL}/pod/; date "+ TIME: %H:%M:%S,%3N"; done
```
{{% /onlyWhenNot %}}
{{% onlyWhenNot baloise %}}

Windows PowerShell:

```bash
while(1) {
Start-Sleep -s 1
Invoke-RestMethod http://<URL>/pod/
Get-Date -Uformat "+ TIME: %H:%M:%S,%3N"
}
```

{{% /onlyWhenNot %}}
{{% onlyWhen baloise %}}

Windows PowerShell:

Expand All @@ -299,7 +273,6 @@ while(1) {
}
```

{{% /onlyWhen %}}
Scale from 3 replicas to 1.
The output shows which Pod is still alive and is responding to requests:

Expand Down Expand Up @@ -483,23 +456,12 @@ We are now going to verify that a redeployment of the application does not lead
Set up the loop again to periodically check the application's response (you don't have to set the `$URL` variable again if it is still defined):

{{% onlyWhen openshift %}}
{{% onlyWhenNot baloise %}}

```bash
URL=$(oc get routes example-web-app -o go-template="{{ .spec.host }}" --namespace <namespace>)
while true; do sleep 1; curl -s http://${URL}/pod/; date "+ TIME: %H:%M:%S,%3N"; done
```

{{% /onlyWhenNot %}}
{{% onlyWhen baloise %}}

```bash
URL=$(oc get routes example-web-app -o go-template="{{ .spec.host }}" --namespace <namespace>)
while true; do sleep 1; curl -s https://${URL}/pod/; date "+ TIME: %H:%M:%S,%3N"; done
```

{{% /onlyWhen %}}

{{% /onlyWhen %}}
{{% onlyWhenNot openshift %}}

Expand All @@ -509,33 +471,17 @@ while true; do sleep 1; curl -s http://${URL}/pod/; date "+ TIME: %H:%M:%S,%3N";
```

{{% /onlyWhenNot %}}
{{% onlyWhenNot baloise %}}

Windows PowerShell:

```bash
while(1) {
Start-Sleep -s 1
Invoke-RestMethod http://[URL]/pod/
Get-Date -Uformat "+ TIME: %H:%M:%S,%3N"
}
```

{{% /onlyWhenNot %}}
{{% onlyWhen baloise %}}

Windows PowerShell:

```bash
while(1) {
Start-Sleep -s 1
Invoke-RestMethod https://[URL]/pod/
Invoke-RestMethod https://<URL>/pod/
Get-Date -Uformat "+ TIME: %H:%M:%S,%3N"
}
```

{{% /onlyWhen %}}

Restart your Deployment with:

```bash
Expand Down
Loading