A command-line tool for managing Docker registry cleanup operations in Astronomer environments
Project description
Astronomer Registry Cleanup
Minimal CLI to delete old Docker image tags in Astronomer registries.
Install
pip install astronomer-registry-cleanup
Usage
astronomer-registry-cleanup -r <registry> -p <token> <release_name> -f <prefix> (--keep-n-tags N | --drop-older-tags YYYY-MM-DD) [--dry-run]
Behavior
- Auth:
-pis your systemadmin token (username is not required). - Tags considered:
<prefix>-<number>only. - Safety: never deletes if ≤ 1 tag exists for the prefix.
- Dry-run prints one line per planned deletion:
<release_name>:<tag> <digest>.
Examples
# Keep the latest 3 tags for prefix "deploy-" (dry-run)
astronomer-registry-cleanup -r registry.example.com -p <token> my-release -f deploy- --keep-n-tags 3 --dry-run
# Delete everything older than a date for prefix "cli-" (dry-run)
astronomer-registry-cleanup -r registry.example.com -p <token> my-release -f cli- --drop-older-tags 2025-08-01 --dry-run
Notes
- Works against Docker Registry v2 auth flow via Houston.
Manual Registry Garbage Collection
After cleanup, run garbage collection on the registry pod:
kubectl exec -n astronomer -ti $(kubectl -n astronomer get pods -l component=registry -o jsonpath="{.items[*].metadata.name}") -c registry -- registry garbage-collect /etc/docker/registry/config.yml
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file astronomer_registry_cleanup-0.1.3.tar.gz.
File metadata
- Download URL: astronomer_registry_cleanup-0.1.3.tar.gz
- Upload date:
- Size: 34.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7ff4bf10af5d00cf5808ac93dbf3848a0a9c59cf2ef783362a9125cf4fe93e3f
|
|
| MD5 |
c259b4bb80fd8bba0b6a3b1199cb6d5c
|
|
| BLAKE2b-256 |
2dc08fa81ead7fdff4a6c1d2b3ee87de63ee7a6e63da9bf99b811727d6416130
|
File details
Details for the file astronomer_registry_cleanup-0.1.3-py3-none-any.whl.
File metadata
- Download URL: astronomer_registry_cleanup-0.1.3-py3-none-any.whl
- Upload date:
- Size: 6.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
92d7580d9135bf8959418992a470f438819dd0d1dad4801b0b6096a665a77ae7
|
|
| MD5 |
1b9e1fa2face5f593b899090ec4048ef
|
|
| BLAKE2b-256 |
7b7586ca08b29bec200cf9cc41efe405b1fd84a1d2aae63b26f6067163220aba
|