イメージカタログ ================ ``ImageCatalog`` および\ ``ClusterImageCatalog`` は、 ``Cluster`` を作成するためのイメージを定義できるようにする重要なリソースです。 主な違いはスコープにあります。\ ``ImageCatalog`` は名前空間ですが、\ ``ClusterImageCatalog`` はクラスタースコープです。 どちらも、イメージのリストで構成される共通の構造を共有し、各イメージのメジャーバージョンを示す\ ``major`` フィールドを備えています。 .. Warning:: オペレーターはユーザー定義のメジャーバージョンを信頼し、PostgreSQLバージョンの検出の実行を控えます。カタログで宣言されたメジャーバージョンとPostgreSQLイメージ間のアライメントを保証するのはユーザーの責任です。 ``major`` フィールドの値は、カタログ内で一意を維持し、イメージ間の重複を防ぐ必要があります。ただし、別のカタログは、同じ\ ``major`` 値で異なるイメージを公開する場合があります。 **名前空間\ ``ImageCatalog`` の例** .. code:: yaml apiVersion: postgresql.cnpg.io/v1 kind: ImageCatalog metadata: name: postgresql namespace: default spec: images: - major: 15 image: ghcr.io/cloudnative-pg/postgresql:15.6 - major: 16 image: ghcr.io/cloudnative-pg/postgresql:16.8 - major: 17 image: ghcr.io/cloudnative-pg/postgresql:17.5 **``ClusterImageCatalog`` リソースを使用したクラスター全体のカタログの例** .. code:: yaml apiVersion: postgresql.cnpg.io/v1 kind: ClusterImageCatalog metadata: name: postgresql spec: images: - major: 15 image: ghcr.io/cloudnative-pg/postgresql:15.6 - major: 16 image: ghcr.io/cloudnative-pg/postgresql:16.8 - major: 17 image: ghcr.io/cloudnative-pg/postgresql:17.5 ``Cluster`` リソースは、 ``ImageCatalog`` または\ ``ClusterImageCatalog`` を参照して、目的の画像を正確に指定する柔軟性を備えています。 .. code:: yaml apiVersion: postgresql.cnpg.io/v1 kind: Cluster metadata: name: cluster-example spec: instances: 3 imageCatalogRef: apiGroup: postgresql.cnpg.io kind: ImageCatalog name: postgresql major: 16 storage: size: 1Gi これらのカタログを使用するクラスターは、継続的な監視を維持します。カタログ内の画像が変更されると、その特定のエントリを参照する **関連するすべてのクラスター** の自動更新がトリガーされます。 CloudNativePGカタログ --------------------- CloudNativePGプロジェクトは、提供するイメージの\ ``ClusterImageCatalogs`` を維持します。これらのカタログは、各メジャーバージョンの最新のイメージで定期的に更新されます。 CloudNativePGプロジェクトのGitHubリポジトリから\ ``ClusterImageCatalog.yaml`` ファイルを適用することにより、クラスター管理者は、クラスターが指定されたメジャーリリース内の最新バージョンに自動的に更新されるようにできます。 PostgreSQLコンテナイメージ ^^^^^^^^^^^^^^^^^^^^^^^^^^ `latest version of the cluster catalog for the PostgreSQL Container Images `_ をインストールできます `cloudnative-pg/postgres-containers `_ リポジトリ) .. code:: shell kubectl apply \ -f https://raw.githubusercontent.com/cloudnative-pg/postgres-containers/main/Debian/ClusterImageCatalog-bookworm.yaml PostGISコンテナイメージ ^^^^^^^^^^^^^^^^^^^^^^^ :ref:`latest version of the cluster catalog for the PostGIS Container Images ` をインストールできます :ref:`cloudnative-pg/postgis-containers ` リポジトリ) .. code:: shell kubectl apply \ -f https://raw.githubusercontent.com/cloudnative-pg/postgis-containers/main/PostGIS/ClusterImageCatalog.yaml