liveBook · Manning

Semantic version constraint

As explained in Kargo in Action

A rule that selects versions according to Semantic Versioning ordering or range conditions.

A semantic version constraint filters registry tags in a Warehouse subscription. The controller polls the registry and creates a Freight object for each matching version; discovery does not deploy the artifact. section 3.2.1

Admit a version range

The range ">=1.0.0 <2.0.0" accepts eligible 1.x versions. Tags such as latest, main, and v1.0.0-rc1 may not match; an empty Freight inventory can indicate a constraint mismatch. section 3.2.1 section 3.6.1

Listing 3.1 The demo-app Warehouse subscribed to a container image registry
apiVersion: kargo.akuity.io/v1alpha1
kind: Warehouse
metadata:
  name: demo-app                                   # #1
  namespace: demo                                  # #2
spec:
  subscriptions:                                   # #3
  - image:
      repoURL: ghcr.io/kargobook/demo-app          # #4
      semverConstraint: ">=1.0.0 <2.0.0"           # #5

This Warehouse manifest shows the registry subscription and its semverConstraint field. section 3.2.1

When no Freight appears, check:

  • Whether registry tags match the constraint; use another selection strategy if the registry does not use SemVer. section 3.6.1
  • Whether a private registry’s credential Secret has the required image credential label. section 3.6.1

How Kargo in Action covers it

How deep it goes
Shows range configuration and diagnoses unmatched tags, but stops short of explaining Semantic Versioning’s ordering rules.
Examples
Uses the range >=1.0.0 <2.0.0 and contrasts it with tags such as latest, main, and v1.0.0-rc1.
What you can do after
Configure a Kargo Warehouse to filter registry tags and diagnose an empty Freight inventory by checking constraints and credentials.
How it connects
Connects Warehouse discovery to Freight creation and contrasts SemVer constraints with Lexical and NewestBuild selection strategies.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Kargo in Action. The section links point to the parts of the book it draws on.