6.10.5. Red Hat Quay API を使用して組織のプロキシーキャッシュを設定する
組織のプロキシーキャッシュは、Red Hat Quay API を使用して設定できます。
手順
組織のプロキシーキャッシュ設定を作成するには、
POST /api/v1/organization/{orgname}/proxycacheエンドポイントを使用します。$ curl -X POST "https://<quay-server.example.com>/api/v1/organization/<orgname>/proxycache" \ -H "Authorization: Bearer <access_token>" \ -H "Content-Type: application/json" \ -d '{ "upstream_registry": "<upstream_registry>" "upstream_registry_username": "your_robot_account_username" "upstream_registry_password": "your_robot_account_password" }'プロキシー設定を検証するには、
POST /api/v1/organization/{orgname}/validateproxycacheエンドポイントを使用します。$ curl -X POST "https://<quay-server.example.com>/api/v1/organization/{orgname}/validateproxycache" \ -H "Authorization: Bearer <access_token>" \ -H "Content-Type: application/json" \ -d '{ "upstream_registry": "<upstream_registry>" "upstream_registry_username": "your_robot_account_username" "upstream_registry_password": "your_robot_account_password" }'プロキシーキャッシュに関する情報を取得するには、
GET /api/v1/organization/{orgname}/proxycacheエンドポイントを使用します。以下に例を示します。$ curl -X GET "https://<quay-server.example.com>/api/v1/organization/{orgname}/proxycache" \ -H "Authorization: Bearer <access_token>"出力例
{"upstream_registry": "quay.io", "expiration_s": 86400, "insecure": false}DELETE /api/v1/organization/{orgname}/proxycacheエンドポイントを使用します。$ curl -X DELETE "https://<quay-server.example.com>/api/v1/organization/{orgname}/proxycache" \ -H "Authorization: Bearer <access_token>"出力例
"Deleted"