Skip to content
This repository was archived by the owner on Dec 7, 2023. It is now read-only.
This repository was archived by the owner on Dec 7, 2023. It is now read-only.

Validate Object Meta for VM objects #622

@stealthybox

Description

@stealthybox

For VM objects, it seems to be possible to start VM's with invalid names:

sudo ignite run weaveworks/ignite-ubuntu:20.04 \
  --name -my-vm

Invalid names should fail Object Meta validation like so:

The VM "-my-vm" is invalid: metadata.name: Invalid value: "-my-vm": a DNS-1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')

The validation for the VM object is already run as a final step before actually creating a VM, but we need to add Object Meta to the ValidateVM function.

We should also check our other Validate functions.

jun 15 ignite meeting notes

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions