Skip to content

Commit

Permalink
docs: change preheat by basic auth (#40)
Browse files Browse the repository at this point in the history
Signed-off-by: Gaius <[email protected]>
  • Loading branch information
gaius-qi authored Dec 21, 2023
1 parent 1883d84 commit ce3e372
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 20 deletions.
15 changes: 5 additions & 10 deletions docs/reference/preheat.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,11 @@ curl --location --request POST 'http://dragonfly-manager:8080/oapi/v1/jobs' \
--data-raw '{
"type": "preheat",
"args": {
"filter": "Expires&Signature",
"headers": {
"Authorization": "Bearer ZDkxMDMyYTEtZDE1ZC00ZmUxLWE0ODItNDI3NTk1ZGM2YWU0"
},
"type": "image",
"url": "https://index.docker.io/v2/library/redis/manifests/latest"
"filter": "Expires&Signature",
"username": "registry_username",
"password": "registry_password",
}
}'
```
Expand All @@ -60,12 +59,9 @@ The command-line log returns the preheat job id.
"type": "preheat",
"status": "PENDING",
"args": {
"filter": "Expires&Signature",
"headers": {
"Authorization": "Bearer ZDkxMDMyYTEtZDE1ZC00ZmUxLWE0ODItNDI3NTk1ZGM2YWU0"
},
"type": "image",
"url": "https://index.docker.io/v2/library/redis/manifests/latest"
"filter": "Expires&Signature",
}
}
```
Expand All @@ -74,6 +70,7 @@ Polling the preheating status with job id.

```bash
curl --request GET 'http://dragonfly-manager:8080/oapi/v1/jobs/1' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer ZDkxMDMyYTEtZDE1ZC00ZmUxLWE0ODItNDI3NTk1ZGM2YWU0'
```

Expand All @@ -86,8 +83,6 @@ If the status is `SUCCESS`, the preheating is successful.
"type": "preheat",
"status": "SUCCESS",
"args": {
"filter": "",
"headers": null,
"type": "image",
"url": "https://index.docker.io/v2/library/redis/manifests/latest"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,11 @@ curl --location --request POST 'http://dragonfly-manager:8080/oapi/v1/jobs' \
--data-raw '{
"type": "preheat",
"args": {
"filter": "Expires&Signature",
"headers": {
"Authorization": "Bearer ZDkxMDMyYTEtZDE1ZC00ZmUxLWE0ODItNDI3NTk1ZGM2YWU0"
},
"type": "image",
"url": "https://index.docker.io/v2/library/redis/manifests/latest"
"filter": "Expires&Signature",
"username": "registry_username",
"password": "registry_password",
}
}'
```
Expand All @@ -58,12 +57,9 @@ curl --location --request POST 'http://dragonfly-manager:8080/oapi/v1/jobs' \
"type": "preheat",
"status": "PENDING",
"args": {
"filter": "Expires&Signature",
"headers": {
"Authorization": "Bearer ZDkxMDMyYTEtZDE1ZC00ZmUxLWE0ODItNDI3NTk1ZGM2YWU0"
},
"type": "image",
"url": "https://index.docker.io/v2/library/redis/manifests/latest"
"filter": "Expires&Signature",
}
}
```
Expand All @@ -72,6 +68,7 @@ curl --location --request POST 'http://dragonfly-manager:8080/oapi/v1/jobs' \

```bash
curl --request GET 'http://dragonfly-manager:8080/oapi/v1/jobs/1' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer ZDkxMDMyYTEtZDE1ZC00ZmUxLWE0ODItNDI3NTk1ZGM2YWU0'
```

Expand All @@ -84,8 +81,6 @@ curl --request GET 'http://dragonfly-manager:8080/oapi/v1/jobs/1' \
"type": "preheat",
"status": "SUCCESS",
"args": {
"filter": "",
"headers": null,
"type": "image",
"url": "https://index.docker.io/v2/library/redis/manifests/latest"
}
Expand Down

0 comments on commit ce3e372

Please sign in to comment.