GUI
- Create an image from GUI
- Create another image with the same name. The operation should fail with admission webhook “validator.harvesterhci.io” denied the request: A resource with the same name exists
kube-api
- Create an image from the manifest:
$ cat image.yaml
---
apiVersion: harvesterhci.io/v1beta1
kind: VirtualMachineImage
metadata:
generateName: image-
namespace: default
spec:
sourceType: download
displayName: cirros-0.5.1-x86_64-disk2.img
url: http://192.168.2.106/cirros-0.5.1-x86_64-disk.img
$ kubectl create -f image.yml
virtualmachineimage.harvesterhci.io/image-8dkbq created
- Try to create an image with the same manifest:
$ kubectl create -f image.yaml Error from server (Conflict): error when creating "image.yaml": admission webhook "validator.harvest
Expected Results
GUI
- The operation should fail with admission webhook validator.harvesterhci.io denied the request: A resource with the same name exists
kube-api
- Creating an image with the same manifest should fail.