3.3. データベースの設定

3.3.1. 既存の Postgres データベースの使用

  1. 必要なデータベースフィールドを使って設定ファイル config.yaml を作成します。

    config.yaml:

    DB_URI: postgresql://test-quay-database:postgres@test-quay-database:5432/test-quay-database

  2. 設定ファイルを使用してシークレットを作成します。

    $ kubectl create secret generic --from-file config.yaml=./config.yaml config-bundle-secret
  3. postgres コンポーネントを管理対象外としてマークし、作成された Secret を参照する QuayRegistry YAML ファイル quayregistry.yaml を作成します。

    quayregistry.yaml

    apiVersion: quay.redhat.com/v1
    kind: QuayRegistry
    metadata:
      name: example-registry
      namespace: quay-enterprise
    spec:
      configBundleSecret: config-bundle-secret
      components:
        - kind: postgres
          managed: false

  4. 以下のセクションで説明されているようにレジストリーをデプロイします。