harbor镜像仓库自动清理脚本


清除
 curl -u admin:123456 -X POST http://192.168.0.202/api/v2.0/system/gc/schedule  -H 'accept: application/json' -H 'Content-Type: application/json' -d '{ "delete_untagged": "false", "dry_run": "false", "schedule": {"type": "Manual"}}'


创建
curl -u admin:1234567  -X POST "http://{{ inventory_hostname }}/api/v2.0/projects" -H "accept: application/json" -H "Content-Type: application/json" -
d "{ \"project_name\": \"prometheus\", \"metadata\": { \"public\": \"true\" }}"

相关