{
  "description": "CloudStackMachineConfig is the Schema for the cloudstackmachineconfigs API.",
  "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"
    },
    "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"
    },
    "metadata": {
      "type": "object"
    },
    "spec": {
      "description": "CloudStackMachineConfigSpec defines the desired state of CloudStackMachineConfig.",
      "properties": {
        "affinity": {
          "description": "Defaults to `no`. Can be `pro` or `anti`. If set to `pro` or `anti`, will create an affinity group per machine set of the corresponding type",
          "type": "string"
        },
        "affinityGroupIds": {
          "description": "AffinityGroupIds allows users to pass in a list of UUIDs for previously-created Affinity Groups. Any VM\u2019s created with this spec will be added to the affinity group, which will dictate which physical host(s) they can be placed on. Affinity groups can be type \u201caffinity\u201d or \u201canti-affinity\u201d in CloudStack. If they are type \u201canti-affinity\u201d, all VM\u2019s in the group must be on separate physical hosts for high availability. If they are type \u201caffinity\u201d, all VM\u2019s in the group must be on the same physical host for improved performance",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "computeOffering": {
          "description": "ComputeOffering refers to a compute offering which has been previously registered in CloudStack. It represents a VM\u2019s instance size including number of CPU\u2019s, memory, and CPU speed. It can either be specified as a UUID or name",
          "properties": {
            "id": {
              "description": "Id of a resource in the CloudStack environment. Mutually exclusive with Name",
              "type": "string"
            },
            "name": {
              "description": "Name of a resource in the CloudStack environment. Mutually exclusive with Id",
              "type": "string"
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "diskOffering": {
          "description": "DiskOffering refers to a disk offering which has been previously registered in CloudStack. It represents a disk offering with pre-defined size or custom specified disk size. It can either be specified as a UUID or name",
          "properties": {
            "customSizeInGB": {
              "description": "disk size in GB, > 0 for customized disk offering; = 0 for non-customized disk offering",
              "format": "int64",
              "type": "integer"
            },
            "device": {
              "description": "device name of the disk offering in VM, shows up in lsblk command",
              "type": "string"
            },
            "filesystem": {
              "description": "filesystem used to mkfs in disk offering partition",
              "type": "string"
            },
            "id": {
              "description": "Id of a resource in the CloudStack environment. Mutually exclusive with Name",
              "type": "string"
            },
            "label": {
              "description": "disk label used to label disk partition",
              "type": "string"
            },
            "mountPath": {
              "description": "path the filesystem will use to mount in VM",
              "type": "string"
            },
            "name": {
              "description": "Name of a resource in the CloudStack environment. Mutually exclusive with Id",
              "type": "string"
            }
          },
          "required": [
            "device",
            "filesystem",
            "label",
            "mountPath"
          ],
          "type": "object",
          "additionalProperties": false
        },
        "symlinks": {
          "additionalProperties": {
            "type": "string"
          },
          "description": "Symlinks create soft symbolic links folders. One use case is to use data disk to store logs",
          "type": "object"
        },
        "template": {
          "description": "Template refers to a VM image template which has been previously registered in CloudStack. It can either be specified as a UUID or name",
          "properties": {
            "id": {
              "description": "Id of a resource in the CloudStack environment. Mutually exclusive with Name",
              "type": "string"
            },
            "name": {
              "description": "Name of a resource in the CloudStack environment. Mutually exclusive with Id",
              "type": "string"
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "userCustomDetails": {
          "additionalProperties": {
            "type": "string"
          },
          "description": "UserCustomDetails allows users to pass in non-standard key value inputs, outside those defined [here](https://github.com/shapeblue/cloudstack/blob/main/api/src/main/java/com/cloud/vm/VmDetailConstants.java)",
          "type": "object"
        },
        "users": {
          "description": "Users consists of an array of objects containing the username, as well as a list of their public keys. These users will be authorized to ssh into the machines",
          "items": {
            "description": "UserConfiguration defines the configuration of the user to be added to the VM.",
            "properties": {
              "name": {
                "type": "string"
              },
              "sshAuthorizedKeys": {
                "items": {
                  "type": "string"
                },
                "type": "array"
              }
            },
            "required": [
              "name",
              "sshAuthorizedKeys"
            ],
            "type": "object",
            "additionalProperties": false
          },
          "type": "array"
        }
      },
      "required": [
        "computeOffering",
        "template"
      ],
      "type": "object",
      "additionalProperties": false
    },
    "status": {
      "description": "CloudStackMachineConfigStatus defines the observed state of CloudStackMachineConfig.",
      "properties": {
        "failureMessage": {
          "description": "FailureMessage indicates that there is a fatal problem reconciling the state, and will be set to a descriptive error message.",
          "type": "string"
        },
        "specValid": {
          "description": "SpecValid is set to true if cloudstackmachineconfig is validated.",
          "type": "boolean"
        }
      },
      "type": "object",
      "additionalProperties": false
    }
  },
  "type": "object"
}
