Skip to content

CRD Reference

All resources are cluster-scoped under drop.corewire.io/v1alpha1.

Quick Example

apiVersion: drop.corewire.io/v1alpha1
kind: CachedImage
metadata:
  name: nginx
spec:
  image: docker.io/library/nginx
  tag: latest
  nodeSelector:
    kubernetes.io/arch: amd64

CachedImage

CachedImage ensures a single container image is pre-cached on cluster nodes.

Controller: internal/controller/cachedimage_controller.go

Spec

FieldTypeRequiredDefaultDescription
imagestringYesImage is the fully qualified image reference (registry/repository).
tagstringNoTag to pull. Mutually exclusive with Digest.
digeststringNoDigest to pull (immutable reference). Mutually exclusive with Tag.
imagePullPolicycorev1.PullPolicyNoAlwaysImagePullPolicy controls when kubelet pulls the image. Defaults to Always (checks upstream digest, only downloads if changed). Set to IfNotPresent to skip the registry check when the tag already exists locally. (Always | IfNotPresent | Never)
imagePullSecrets[]corev1.LocalObjectReferenceNoImagePullSecrets are references to secrets for pulling from private registries.
nodeSelectormap[string]stringNoNodeSelector restricts which nodes to cache the image on.
tolerations[]corev1.TolerationNoTolerations allow targeting tainted nodes.
priority*int32NoPriority is a pull ordering hint (lower values pulled first).
policyRef*PolicyReferenceNoPolicyRef references a PullPolicy for pacing controls.

Status

FieldTypeDescription
observedGenerationint64ObservedGeneration is the last generation reconciled.
phasestringPhase summarizes the overall state.
readystringReady is a human-readable “nodesReady/nodesTargeted” fraction for display.
resolvedDigeststringResolvedDigest is the sha256 digest of the image as reported by the container runtime after pull.
nodesTargetedint32NodesTargeted is the number of nodes that should have this image.
nodesReadyint32NodesReady is the number of nodes that have successfully pulled the image.
nodesPullingint32NodesPulling is the number of nodes currently pulling the image.
cachedNodes[]stringCachedNodes is the list of node names that have successfully cached the image.
consecutiveFailuresint32ConsecutiveFailures counts sequential reconcile failures for backoff calculation.
lastPulledAt*metav1.TimeLastPulledAt is the timestamp of the most recent successful pull.
lastAttemptedAt*metav1.TimeLastAttemptedAt is the timestamp of the most recent pull attempt (success or failure).
conditions[]metav1.ConditionConditions represent the latest available observations. Condition types: Ready, PullProgress.

CachedImageSet

CachedImageSet manages a group of images to cache, optionally backed by a DiscoveryPolicy.

Controller: internal/controller/cachedimageset_controller.go

Spec

FieldTypeRequiredDefaultDescription
policyRef*PolicyReferenceNoPolicyRef references a PullPolicy for pacing controls.
discoveryPolicyRef*DiscoveryPolicyReferenceNoDiscoveryPolicyRef references a DiscoveryPolicy for dynamic image lists.
imagePullPolicycorev1.PullPolicyNoAlwaysImagePullPolicy controls when kubelet pulls the image (propagated to children). (Always | IfNotPresent | Never)
imagePullSecrets[]corev1.LocalObjectReferenceNoImagePullSecrets are references to secrets for pulling from private registries (propagated to children).
nodeSelectormap[string]stringNoNodeSelector restricts which nodes to cache images on (propagated to children).
tolerations[]corev1.TolerationNoTolerations allow targeting tainted nodes (propagated to children).
images[]ImageEntryNoImages is a static list of images to cache.

Status

FieldTypeDescription
observedGenerationint64ObservedGeneration is the last generation reconciled.
phasestringPhase summarizes the overall state.
imagesManagedint32ImagesManaged is the number of CachedImage children managed by this set.
imagesReadyint32ImagesReady is the number of children in Ready phase.
conditions[]metav1.ConditionConditions represent the latest available observations.

DiscoveryPolicy

DiscoveryPolicy automatically discovers images from registries or Prometheus metrics.

Controller: internal/controller/discoverypolicy_controller.go

Spec

FieldTypeRequiredDefaultDescription
sources[]DiscoverySourceYesSources is the list of discovery backends to query.
imageFilterstringNoImageFilter is a regex to filter discovered images.
syncIntervalmetav1.DurationNo30mSyncInterval is how often to re-query sources.
maxImagesint32No50MaxImages caps the number of discovered images.

Status

FieldTypeDescription
lastSyncTime*metav1.TimeLastSyncTime is the timestamp of the last successful sync.
discoveredImages[]DiscoveredImageDiscoveredImages is the list of discovered images from all sources.
imageCountint32ImageCount is the number of discovered images.
sourceCountint32SourceCount is the number of configured sources.
conditions[]metav1.ConditionConditions represent the latest available observations.

PullPolicy

PullPolicy controls the pacing and retry behavior for image pulls across cluster nodes. It is a configuration-only resource with no status.

Spec

FieldTypeRequiredDefaultDescription
maxConcurrentNodesint32No1MaxConcurrentNodes is the max nodes pulling simultaneously for this policy.
minDelayBetweenPullsmetav1.DurationNo10sMinDelayBetweenPulls is the minimum time between starting pulls on different nodes.
failureBackoff*BackoffConfigNoFailureBackoff configures retry delays on pull failures.
repullInterval*metav1.DurationNoRepullInterval is how often to re-pull cached images. Zero or unset means never re-pull.
nodeSelectormap[string]stringNoNodeSelector scopes this policy to a specific node pool.
tolerations[]corev1.TolerationNoTolerations match tainted nodes in the pool.

Helper Types

BackoffConfig

BackoffConfig defines retry backoff behavior.

FieldTypeRequiredDefaultDescription
initialmetav1.DurationNo30sInitial delay before first retry.
maxmetav1.DurationNo5mMax delay cap for exponential backoff.

DiscoveredImage

DiscoveredImage represents a single discovered image with metadata.

FieldTypeRequiredDefaultDescription
imagestringYesImage is the fully qualified image reference.
scoreint64YesScore is the ranking score from the source (higher = more relevant).
sourcestringYesSource identifies which discovery source produced this image.

DiscoveryPolicyReference

DiscoveryPolicyReference is a reference to a DiscoveryPolicy resource.

FieldTypeRequiredDefaultDescription
namestringYesName of the DiscoveryPolicy resource.

DiscoverySource

DiscoverySource defines a single discovery backend.

FieldTypeRequiredDefaultDescription
typestringYesType identifies the backend.
prometheus*PrometheusSourceNoPrometheus config (when type=prometheus).
registry*RegistrySourceNoRegistry config (when type=registry).
secretRef*corev1.LocalObjectReferenceNoSecretRef references a Secret for auth/TLS for this source.

ImageEntry

ImageEntry defines a single image to include in a set.

FieldTypeRequiredDefaultDescription
imagestringYesImage is the fully qualified image reference (registry/repository).
tagstringNoTag to pull.
digeststringNoDigest to pull.

PolicyReference

PolicyReference is a reference to a PullPolicy resource.

FieldTypeRequiredDefaultDescription
namestringYesName of the PullPolicy resource.

PrometheusSource

PrometheusSource defines Prometheus query configuration.

FieldTypeRequiredDefaultDescription
endpointstringYesEndpoint is the Prometheus API URL.
querystringYesQuery is the PromQL query that must return an ‘image’ label.
lookback*metav1.DurationNoLookback is the time window to aggregate over (e.g. “7d”, “24h”). When set, uses query_range and sums values to rank by total usage. When unset, uses an instant query (point-in-time).
stepstringNo5mStep is the query resolution step for range queries.

RegistrySource

RegistrySource defines OCI registry tag listing configuration.

FieldTypeRequiredDefaultDescription
urlstringYesURL is the registry base URL.
repositories[]stringYesRepositories is the list of repositories to query.
tagFilterstringNoTagFilter is a regex to filter tags.
topXint32NoTopX limits the number of tags to fetch per repository.
imageTemplatestringNoImageTemplate is a Go text/template for constructing the full image reference. Available variables: .Registry, .Repository, .Tag
Last updated on