turbot/openshift
steampipe plugin install openshift

Table: openshift_image_stream - Query OpenShift Image Streams using SQL

An OpenShift Image Stream is a resource in OpenShift that provides an abstraction over related images. It allows users to track, tag, import and reference images based on tags, without explicit knowledge of the image repository or the image's specific registry URL. Image Streams also enable automatic updates whenever a new image is pushed to the registry.

Table Usage Guide

The openshift_image_stream table provides insights into Image Streams within OpenShift. If you are a DevOps engineer or system administrator, you can explore details about image streams, including tags, annotations, and associated metadata through this table. Utilize it to manage and monitor image streams effectively, ensuring smooth application deployments and updates.

Examples

Basic info

select
uid,
name,
namespace,
resource_version,
generation,
docker_image_repository,
creation_timestamp
from
openshift_image_stream;
select
uid,
name,
namespace,
resource_version,
generation,
docker_image_repository,
creation_timestamp
from
openshift_image_stream;

List image streams present in the default namespace

select
uid,
name,
namespace,
resource_version,
generation,
docker_image_repository,
creation_timestamp
from
openshift_image_stream
where
namespace = 'default';
select
uid,
name,
namespace,
resource_version,
generation,
docker_image_repository,
creation_timestamp
from
openshift_image_stream
where
namespace = 'default';

List deleted image streams

select
uid,
name,
namespace,
resource_version,
generation,
docker_image_repository,
creation_timestamp
from
openshift_image_stream
where
deletion_timestamp is not null;
select
uid,
name,
namespace,
resource_version,
generation,
docker_image_repository,
creation_timestamp
from
openshift_image_stream
where
deletion_timestamp is not null;

Get image stream annotations

select
uid,
name,
namespace,
jsonb_pretty(annotations) as annotations
from
openshift_image_stream;
select
uid,
name,
namespace,
annotations
from
openshift_image_stream;

Get image stream spec tags

select
uid,
name,
namespace,
jsonb_pretty(spec_tags) as spec_tags
from
openshift_image_stream;
select
uid,
name,
namespace,
spec_tags
from
openshift_image_stream;

Get image stream status tags

select
uid,
name,
namespace,
jsonb_pretty(status_tags) as status_tags
from
openshift_image_stream;
select
uid,
name,
namespace,
status_tags
from
openshift_image_stream;

Schema for openshift_image_stream

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form, e.g. connection_name.
annotationsjsonbAnnotations is an unstructured key-value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata.
creation_timestamptimestamp with time zoneCreationTimestamp is a timestamp representing the server time when this object was created.
deletion_grace_period_secondsbigintNumber of seconds allowed for this object to gracefully terminate before it will be removed from the system. Only set when deletionTimestamp is also set.
deletion_timestamptimestamp with time zoneDeletionTimestamp is RFC 3339 date and time at which this resource will be deleted.
docker_image_repositorytextIt represents the effective location this stream may be accessed at. May be empty until the server determines where the repository is located.
finalizersjsonbMust be empty before the object is deleted from the registry. Each entry is an identifier for the responsible component that will remove the entry from the list. If the deletionTimestamp of the object is non-nil, entries in this list can only be removed.
generate_nametextGenerateName is an optional prefix, used by the server, to generate a unique name only if the Name field has not been provided.
generationbigintA sequence number representing a specific generation of the desired state.
labelsjsonbMap of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services.
lookup_policyjsonbLookup policy controls how other resources reference images within this namespace.
nametext=Name of the object. Name must be unique within a namespace.
namespacetext=Namespace defines the space within which each name must be unique.
owner_referencesjsonbList of objects depended by this object. If all objects in the list have been deleted, this object will be garbage collected. If this object is managed by a controller, then an entry in this list will point to this controller, with the controller field set to true. There cannot be more than one managing controller.
public_docker_image_repositorytextIt represents the public location from where the image can be pulled outside the cluster. This field may be empty if the administrator has not exposed the integrated registry externally.
resource_versiontextAn opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed.
spec_tagsjsonbTags map arbitrary string values to specific image locators.
status_tagsjsonbTags are a historical record of images associated with each tag. The first entry in the TagEvent array is the currently tagged image.
titletextTitle of the resource.
uidtextUID is the unique in time and space value for this object.

Export

This table is available as a standalone Exporter CLI. Steampipe exporters are stand-alone binaries that allow you to extract data using Steampipe plugins without a database.

You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_export_installer.sh script:

/bin/sh -c "$(curl -fsSL https://steampipe.io/install/export.sh)" -- openshift

You can pass the configuration to the command with the --config argument:

steampipe_export_openshift --config '<your_config>' openshift_image_stream