Database Schema

This document lists and details the database schema used by KubeArchive.

Table resource

Name Type Description

uuid

uuid primary key

The UUID of the Kubernetes resource used as primary key.

api_version

varchar not null

API Version + API Group (apiVersion). "batch/v1" for Jobs, "apps/v1" for Deployments, "build.openshift.io/v1" for OpenShift Builds, "v1" for Services or Pods, …​

kind

varchar not null

Kind of the resource (kind). For example "Job", "Deployment", "Service"…​

name

varchar not null

Name of the resource (metadata.name).

namespace

varchar not null

Namespace of the resource (metadata.namespace).

resource_version

varchar not null

Version of the resource (metadata.resourceVersion).

created_at

timestamp not null

Timestamp when the record is inserted in this table.

updated_at

timestamp not null

Last time this record was updated.

cluster_deleted_ts

timestamp not null

Timestamp when KubeArchive deleted the resource from the cluster.

data

jsonb not null

Resource definition in JSON format.

Indexes

Name Fields

resource_kind_idx

kind,api_version

resource_kind_namespace_idx

kind, api_version, namespace

Table log_url

Name Type Description

uuid

uuid not null

The UUID of the Kubernetes resource in the resource table.

url

url not null

The generated URL of the log file.