Sync image display name to image labels
- Related issues: #2630 [FEATURE] Sync image display_name to image labels
Category:
Verification Steps
- Login harvester dashboard
- Access the Preference page
- Enable developer tool
- Create an ubuntu focal image from url https://cloud-images.ubuntu.com/focal/current/focal-server-cloudimg-amd64.img
- View API of the created image
- Check can found the display name in the image API content
- Create the same ubuntu focal image from previous url again which would bring the same display name
- Check would be denied with error message
- Create a different ubuntu focal image with the same display name
Expected Results
- In image API content, label
harvesterhci.io/imageDisplayName
added to labels, and it’s value should be the displayName value
- Image with the same display name in label would be denied by admission webhook “validator.harvesterhci.io”
- Image with the same display name but different url would also be denied