14.3. Red Hat Quay UI でクォータの確立
次の手順では、ストレージ消費量をレポートし、ストレージクォータ制限を設定する方法を説明します。
前提条件
- Red Hat Quay レジストリー
- スーパーユーザーアカウント
- クォータ制限の要求を満たすのに十分なストレージ
手順
- 新しい組織を作成するか、既存の組織を選択します。Organization Settings タブに表示されているように、最初はクォータが設定されていません。   
- スーパーユーザーとしてレジストリーにログインし、Super User Admin Panel の Manage Organizations タブに移動します。ストレージクォータ制限を作成する組織の Options アイコンをクリックします。   
- Configure Quota をクリックして、初期クォータ (たとえば 10 MB) を入力します。次に、Apply をクリックしてから Close をクリックします。   
- スーパーユーザーパネルの Manage Organizations タブで、消費されたクォータが 0 of 10 MB を示していることを確認します。   - 消費されたクォータ情報は、組織ページから直接入手することもできます。 - 最初に消費されたクォータ   
- クォータを 100MB に増やすには、スーパーユーザーパネルの Manage Organizations タブに移動します。Options アイコンをクリックし、Configure Quota を選択して、クォータを 100 MB に設定します。Apply をクリックしてから Close をクリックします。   
- コマンドラインからサンプルイメージを組織にプッシュします。 - サンプルコマンド - podman pull ubuntu:18.04 podman tag docker.io/library/ubuntu:18.04 example-registry-quay-quay-enterprise.apps.docs.gcp.quaydev.org/testorg/ubuntu:18.04 podman push --tls-verify=false example-registry-quay-quay-enterprise.apps.docs.gcp.quaydev.org/testorg/ubuntu:18.04 - $ podman pull ubuntu:18.04 $ podman tag docker.io/library/ubuntu:18.04 example-registry-quay-quay-enterprise.apps.docs.gcp.quaydev.org/testorg/ubuntu:18.04 $ podman push --tls-verify=false example-registry-quay-quay-enterprise.apps.docs.gcp.quaydev.org/testorg/ubuntu:18.04- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
- スーパーユーザーパネルには、組織ごとに消費されたクォータが表示されます。   
- 組織ページには、イメージで使用されているクォータの合計比率が表示されます。 - 最初のイメージで消費された合計クォータ   
- 2 番目のイメージをプル、タグ付け、プッシュします。たとえば、 - nginxです。- サンプルコマンド - podman pull nginx podman tag docker.io/library/nginx example-registry-quay-quay-enterprise.apps.docs.gcp.quaydev.org/testorg/nginx podman push --tls-verify=false example-registry-quay-quay-enterprise.apps.docs.gcp.quaydev.org/testorg/nginx - $ podman pull nginx $ podman tag docker.io/library/nginx example-registry-quay-quay-enterprise.apps.docs.gcp.quaydev.org/testorg/nginx $ podman push --tls-verify=false example-registry-quay-quay-enterprise.apps.docs.gcp.quaydev.org/testorg/nginx- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
- 組織ページには、その組織の各リポジトリーで使用されているクォータの合計比率が表示されます。 - 各リポジトリーで消費された合計クォータ   
- 拒否 と 警告 の制限を作成します。 - スーパーユーザーパネルから、Manage Organizations タブに移動します。組織の Options アイコンをクリックし、Configure Quota を選択します。Quota Policy セクションで、Action タイプを Reject に設定し、Quota Threshold を 80 に設定して、Add Limit をクリックします。   
- 警告 制限を作成するには、Action タイプに Warning を選択し、Quota Threshold を 70 に設定して、Add Limit をクリックします。   
- クォータポップアップで Close をクリックします。制限は、Organization ページの Settings タブで表示できますが、編集することはできません。   
- 拒否制限を超えたイメージをプッシュします。 - 拒否制限 (80%) が現在のリポジトリーサイズ (~83%) 未満に設定されているため、次のプッシュは自動的に拒否されます。 - サンプルイメージプッシュ - podman pull ubuntu:20.04 podman tag docker.io/library/ubuntu:20.04 example-registry-quay-quay-enterprise.apps.docs.gcp.quaydev.org/testorg/ubuntu:20.04 podman push --tls-verify=false example-registry-quay-quay-enterprise.apps.docs.gcp.quaydev.org/testorg/ubuntu:20.04 - $ podman pull ubuntu:20.04 $ podman tag docker.io/library/ubuntu:20.04 example-registry-quay-quay-enterprise.apps.docs.gcp.quaydev.org/testorg/ubuntu:20.04 $ podman push --tls-verify=false example-registry-quay-quay-enterprise.apps.docs.gcp.quaydev.org/testorg/ubuntu:20.04- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - クォータを超えたときのサンプル出力 - Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
- 制限を超えると、UI に通知が表示されます。 - クォータ通知 