edbctl image v1

This command helps managing the images for Hybrid Manager (HM). With this command, you can sync or list container images from EDB's repository to a local registry, manage artifacts for internet-disconnected OpenShift environments, and clean up unused images from the HM registry.

Commands

edbctl image command has the following options:

edbctl image cleanup-registry

Cleans up unused images from an HM registry to free up space after an upgrade. The command determines which images are no longer needed by comparing the image lists of the current and previous HM versions, excludes any image still referenced by a running pod, deletes the remaining manifests from the registry, and then triggers a garbage collection (GC) to reclaim the underlying storage.

Currently, only the HM registry is supported.

Note

Do not sync images to the registry while this command is running. The GC step may otherwise delete newly synced images and leave the registry in an inconsistent state.

Note

If the delete or GC step fails, it is safe to re-run this command. Image deletion is idempotent — images that were already removed are skipped — so a retry simply resumes the cleanup.

Note

If an image is deleted that should have been kept, restore it by re-syncing the images with edbctl image sync-to-local-registry.

edbctl image cleanup-registry --hm-registry-name <registry-name> [options]

Where options are:

    --hm-registry-name string          The name of the HM registry to clean up (required).
    --hm-registry-local-port int       The local port used to access the HM registry when performing cleanup (default 5000).
    --previous-hm-version string       The previous version of HM, used to determine which images to delete. If not provided,
                                       the command tries to detect the previous version from the HM instance in the cluster.
                                       If detection fails, no images are deleted and a warning is printed.
    --edb-cloudsmith-username string   Username for EDB Cloudsmith, used to retrieve the image list for the previous HM version.
    --edb-cloudsmith-password string   Password for EDB Cloudsmith, used to retrieve the image list for the previous HM version.
    --dry-run                          Perform a dry run of the cleanup operation without deleting any images.
-y, --yes                              Auto-confirm all confirmations.
-h, --help                             Help for cleanup-registry.

This example shows how to clean up images from the HM registry:

edbctl image cleanup-registry --hm-registry-name <registry-name> --previous-hm-version <previous-hm-version> --edb-cloudsmith-username <username> --edb-cloudsmith-password <password>

edbctl image list-image-tags

Retrieves and displays a list of all available image tags used for provisioning. The output includes detailed metadata for each image tag, such as:

  • Image tag ID
  • Name
  • SHA
  • Version
  • Compressed size
  • Architecture
  • Creation time
  • Ingestion time
  • Location
  • Associated tags
edbctl image list-image-tags [options]

Where options are:

    --location-id string        Location ID (required). Specify the location ID to filter images.
    --pg-type string            Filter images by Postgres type. Examples: 'epas', 'postgres', 'pgextended'.
    --major-version string      Filter images by major version. Examples: '17', '16'.
    --pg-architectures string   Filter images by cluster architectures. Examples: 'pgd', 'aha', 'psr', 'analytics'.
-c, --credential string         The credential that you created via the `credential create` command. The default is fetched from `context_credential`.
-o, --output string             [table json yaml xml json-raw] (default "table")
-h, --help                      Help for list-image-tags.

This example shows how to list the image:

edbctl image list-image-tags --location-id "managed-devspatcher"

edbctl image sync-to-local-registry

Syncs container images from EDB Repos 2.0 to a local registry for managing a local HM installation.

edbctl image sync-to-local-registry [options]

Where options are:

    --source-registry-username string        Source registry username (required).
    --source-registry-password string        Source registry password (required).
    --destination-registry-uri string        Destination registry URI (required).
    --destination-registry-username string   Destination registry username (optional).
    --destination-registry-password string   Destination registry password (optional).
    --version string                         Hybrid Manager release version (required).
    --sign-by-sigstore-private-key string    Path to the Sigstore private key.
    --sign-passphrase-file string            Path to the file containing the passphrase for the Sigstore private key.
-w, --workers int                            Number of parallel workers to use for syncing images. (default 3).
    --cpu int                                Set CPU (max OS threads for Go runtime, must be your CPU core count or lower).
    --insecure-destination-registry          Allow insecure (HTTP) connections to the destination registry.
-y, --yes                                    Auto-confirm all confirmations.
-h, --help                                   Help for sync-to-local-registry.

This example shows how to sync the EDB Repo 2.0 to the local registry:

edbctl image sync-to-local-registry --source-registry-username <username> --source-registry-password <password> --destination-registry-uri <registry> --destination-registry-username <username> --destination-registry-password <password> --version <version>