Skip to content

Commit

Permalink
examples, hooks: correct the vmi-sidecar-hook example
Browse files Browse the repository at this point in the history
The provided example is missing the mandatory `version` parameter.

Signed-off-by: Miguel Duarte Barroso <mdbarroso@redhat.com>
  • Loading branch information
maiqueb committed Dec 16, 2020
1 parent 2f98c88 commit 1117d10
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/vmi-with-sidecar-hook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: kubevirt.io/v1
kind: VirtualMachineInstance
metadata:
annotations:
hooks.kubevirt.io/hookSidecars: '[{"image": "registry:5000/kubevirt/example-hook-sidecar:devel"}]'
hooks.kubevirt.io/hookSidecars: '[{"args": ["--version", "v1alpha2"], "image": "registry:5000/kubevirt/example-hook-sidecar:devel"}]'
smbios.vm.kubevirt.io/baseBoardManufacturer: Radical Edward
labels:
special: vmi-with-sidecar-hook
Expand Down
2 changes: 1 addition & 1 deletion tools/vms-generator/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -983,7 +983,7 @@ func GetVMIWithHookSidecar() *v1.VirtualMachineInstance {
addNoCloudDiskWitUserData(&vmi.Spec, "#cloud-config\npassword: fedora\nchpasswd: { expire: False }")

vmi.ObjectMeta.Annotations = map[string]string{
"hooks.kubevirt.io/hookSidecars": fmt.Sprintf("[{\"image\": \"%s/example-hook-sidecar:%s\"}]", DockerPrefix, DockerTag),
"hooks.kubevirt.io/hookSidecars": fmt.Sprintf("[{\"args\": [\"--version\", \"v1alpha2\"], \"image\": \"%s/example-hook-sidecar:%s\"}]", DockerPrefix, DockerTag),
"smbios.vm.kubevirt.io/baseBoardManufacturer": "Radical Edward",
}
return vmi
Expand Down

0 comments on commit 1117d10

Please sign in to comment.