stefanprodan / kustomizer

An experimental package manager for distributing Kubernetes configuration as OCI artifacts.
https://kustomizer.dev
Apache License 2.0
288 stars 13 forks source link

Add command to list and filter artifacts by semver #52

Closed stefanprodan closed 2 years ago

stefanprodan commented 2 years ago

The list command fetches the tags of the specified OCI artifact from its image repository. If a semantic version condition is specified, the tags are filtered and ordered by semver. For private registries, the list command uses the credentials from ~/.docker/config.json.

Usage:
  kustomizer list artifact [flags]

Aliases:
  artifact, artifacts

Examples:
  kustomizer list artifacts <oci repository url> --semver <condition>

  # List all versions ordered by semver
  kustomizer list artifacts oci://docker.io/user/repo --semver="*"

  # List all versions including prerelease ordered by semver
  kustomizer list artifacts oci://docker.io/user/repo --semver=">0.0.0-0"

  # List all versions in the 1.0 range
  kustomizer list artifacts oci://docker.io/user/repo --semver="~1.0"

  # List all versions in the 1.0 range including prerelease
  kustomizer list artifacts oci://docker.io/user/repo --semver="~1.0-0"

Flags:
  -h, --help            help for artifact
      --semver string   Filter the results based on a semantic version constraint e.g. '1.x'.