{
    "description": "VSphereMachineProviderSpec is the type that will be embedded in a Machine.Spec.ProviderSpec field for an VSphere virtual machine. It is used by the vSphere machine actuator to create a single Machine. Compatibility level 2: Stable within a major release for a minimum of 9 months or 3 minor releases (whichever is longer).",
    "properties": {
        "apiVersion": {
            "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
            "type": "string"
        },
        "cloneMode": {
            "description": "CloneMode specifies the type of clone operation. The LinkedClone mode is only support for templates that have at least one snapshot. If the template has no snapshots, then CloneMode defaults to FullClone. When LinkedClone mode is enabled the DiskGiB field is ignored as it is not possible to expand disks of linked clones. Defaults to FullClone. When using LinkedClone, if no snapshots exist for the source template, falls back to FullClone.",
            "type": "string"
        },
        "credentialsSecret": {
            "description": "CredentialsSecret is a reference to the secret with vSphere credentials.",
            "properties": {
                "name": {
                    "description": "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?",
                    "type": "string"
                }
            },
            "type": "object",
            "x-kubernetes-map-type": "atomic",
            "additionalProperties": false
        },
        "diskGiB": {
            "description": "DiskGiB is the size of a virtual machine's disk, in GiB. Defaults to the analogue property value in the template from which this machine is cloned. This parameter will be ignored if 'LinkedClone' CloneMode is set.",
            "format": "int32",
            "type": "integer",
            "minimum": -2147483648,
            "maximum": 2147483647
        },
        "kind": {
            "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
            "type": "string"
        },
        "memoryMiB": {
            "description": "MemoryMiB is the size of a virtual machine's memory, in MiB. Defaults to the analogue property value in the template from which this machine is cloned.",
            "format": "int64",
            "type": "integer",
            "minimum": -9223372036854776000,
            "maximum": 9223372036854776000
        },
        "metadata": {
            "type": "object"
        },
        "network": {
            "description": "Network is the network configuration for this machine's VM.",
            "properties": {
                "devices": {
                    "description": "Devices defines the virtual machine's network interfaces.",
                    "items": {
                        "description": "NetworkDeviceSpec defines the network configuration for a virtual machine's network device.",
                        "properties": {
                            "addressesFromPools": {
                                "description": "addressesFromPools is a list of references to IP pool types and instances which are handled by an external controller. addressesFromPool configurations provided via addressesFromPools defer IP address assignment to an external controller. IP addresses provided via ipAddrs, however, are intended to allow explicit assignment of a machine's IP address. If both addressesFromPool and ipAddrs are empty or not defined, DHCP will assign an IP address. If both ipAddrs and addressesFromPools are defined, the IP addresses associated with ipAddrs will be applied first followed by IP addresses from addressesFromPools.",
                                "format": "ipv4",
                                "items": {
                                    "description": "AddressesFromPool is an IPAddressPool that will be used to create IPAddressClaims for fulfillment by an external controller.",
                                    "properties": {
                                        "group": {
                                            "description": "group of the IP address pool type known to an external IPAM controller. This should be a fully qualified domain name, for example, externalipam.controller.io.",
                                            "pattern": "^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
                                            "type": "string"
                                        },
                                        "name": {
                                            "description": "name of an IP address pool, for example, pool-config-1.",
                                            "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$",
                                            "type": "string"
                                        },
                                        "resource": {
                                            "description": "resource of the IP address pool type known to an external IPAM controller. It is normally the plural form of the resource kind in lowercase, for example, ippools.",
                                            "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$",
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "group",
                                        "name",
                                        "resource"
                                    ],
                                    "type": "object",
                                    "additionalProperties": false
                                },
                                "type": "array"
                            },
                            "gateway": {
                                "description": "gateway is an IPv4 or IPv6 address which represents the subnet gateway, for example, 192.168.1.1.",
                                "format": "ipv6",
                                "type": "string"
                            },
                            "ipAddrs": {
                                "description": "ipAddrs is a list of one or more IPv4 and/or IPv6 addresses and CIDR to assign to this device, for example, 192.168.1.100/24. IP addresses provided via ipAddrs are intended to allow explicit assignment of a machine's IP address. IP pool configurations provided via addressesFromPool, however, defer IP address assignment to an external controller. If both addressesFromPool and ipAddrs are empty or not defined, DHCP will be used to assign an IP address. If both ipAddrs and addressesFromPools are defined, the IP addresses associated with ipAddrs will be applied first followed by IP addresses from addressesFromPools.",
                                "format": "ipv6",
                                "items": {
                                    "type": "string"
                                },
                                "type": "array"
                            },
                            "nameservers": {
                                "description": "nameservers is a list of IPv4 and/or IPv6 addresses used as DNS nameservers, for example, 8.8.8.8. a nameserver is not provided by a fulfilled IPAddressClaim. If DHCP is not the source of IP addresses for this network device, nameservers should include a valid nameserver.",
                                "format": "ipv6",
                                "items": {
                                    "type": "string"
                                },
                                "type": "array"
                            },
                            "networkName": {
                                "description": "networkName is the name of the vSphere network or port group to which the network device will be connected, for example, port-group-1. When not provided, the vCenter API will attempt to select a default network. The available networks (port groups) can be listed using `govc ls 'network/*'`",
                                "maxLength": 80,
                                "type": "string"
                            }
                        },
                        "type": "object",
                        "additionalProperties": false
                    },
                    "type": "array"
                }
            },
            "type": "object",
            "additionalProperties": false
        },
        "numCPUs": {
            "description": "NumCPUs is the number of virtual processors in a virtual machine. Defaults to the analogue property value in the template from which this machine is cloned.",
            "format": "int32",
            "type": "integer",
            "minimum": -2147483648,
            "maximum": 2147483647
        },
        "numCoresPerSocket": {
            "description": "NumCPUs is the number of cores among which to distribute CPUs in this virtual machine. Defaults to the analogue property value in the template from which this machine is cloned.",
            "format": "int32",
            "type": "integer",
            "minimum": -2147483648,
            "maximum": 2147483647
        },
        "snapshot": {
            "description": "Snapshot is the name of the snapshot from which the VM was cloned",
            "type": "string"
        },
        "template": {
            "description": "Template is the name, inventory path, or instance UUID of the template used to clone new machines.",
            "type": "string"
        },
        "userDataSecret": {
            "description": "UserDataSecret contains a local reference to a secret that contains the UserData to apply to the instance",
            "properties": {
                "name": {
                    "description": "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?",
                    "type": "string"
                }
            },
            "type": "object",
            "x-kubernetes-map-type": "atomic",
            "additionalProperties": false
        },
        "workspace": {
            "description": "Workspace describes the workspace to use for the machine.",
            "properties": {
                "datacenter": {
                    "description": "Datacenter is the datacenter in which VMs are created/located.",
                    "type": "string"
                },
                "datastore": {
                    "description": "Datastore is the datastore in which VMs are created/located.",
                    "type": "string"
                },
                "folder": {
                    "description": "Folder is the folder in which VMs are created/located.",
                    "type": "string"
                },
                "resourcePool": {
                    "description": "ResourcePool is the resource pool in which VMs are created/located.",
                    "type": "string"
                },
                "server": {
                    "description": "Server is the IP address or FQDN of the vSphere endpoint.",
                    "type": "string"
                }
            },
            "type": "object",
            "additionalProperties": false
        }
    },
    "type": "object",
    "additionalProperties": false,
    "$schema": "http://json-schema.org/draft-04/schema#"
}
