Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions machine/v1/types_nutanixprovider.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,25 @@ type NutanixMachineProviderConfig struct {
// +kubebuilder:validation:Required
SystemDiskSize resource.Quantity `json:"systemDiskSize"`

// bootType indicates the boot type (Legacy, UEFI or SecureBoot) the Machine's VM uses to boot.
// If this field is empty or omitted, the VM will use the default boot type "Legacy" to boot.
// "SecureBoot" depends on "UEFI" boot, i.e., enabling "SecureBoot" means that "UEFI" boot is also enabled.
// +kubebuilder:validation:Enum="";Legacy;UEFI;SecureBoot
// +optional
BootType NutanixBootType `json:"bootType"`

// project optionally identifies a Prism project for the Machine's VM to associate with.
// +optional
Project NutanixResourceIdentifier `json:"project"`

// categories optionally adds one or more prism categories (each with key and value) for
// the Machine's VM to associate with. All the category key and value pairs specified must
// already exist in the prism central.
// +listType=map
// +listMapKey=key
// +optional
Categories []NutanixCategory `json:"categories"`

// userDataSecret is a local reference to a secret that contains the
// UserData to apply to the VM
UserDataSecret *corev1.LocalObjectReference `json:"userDataSecret,omitempty"`
Expand All @@ -66,6 +85,35 @@ type NutanixMachineProviderConfig struct {
CredentialsSecret *corev1.LocalObjectReference `json:"credentialsSecret"`
}

// NutanixCategory identifies a pair of prism category key and value
type NutanixCategory struct {
// key is the prism category key name
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:MaxLength=64
// +kubebuilder:validation:Required
Key string `json:"key"`

// value is the prism category value associated with the key
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:MaxLength=64
// +kubebuilder:validation:Required
Value string `json:"value"`
}

// NutanixBootType is an enumeration of different boot types for Nutanix VM.
type NutanixBootType string

const (
// NutanixLegacyBoot is the legacy BIOS boot type
NutanixLegacyBoot NutanixBootType = "Legacy"

// NutanixUEFIBoot is the UEFI boot type
NutanixUEFIBoot NutanixBootType = "UEFI"

// NutanixSecureBoot is the Secure boot type
NutanixSecureBoot NutanixBootType = "SecureBoot"
)

// NutanixIdentifierType is an enumeration of different resource identifier types.
type NutanixIdentifierType string

Expand Down
22 changes: 22 additions & 0 deletions machine/v1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions machine/v1/zz_generated.swagger_doc_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

70 changes: 69 additions & 1 deletion openapi/generated_openapi/zz_generated.openapi.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

42 changes: 42 additions & 0 deletions openapi/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -16756,6 +16756,26 @@
}
}
},
"com.github.openshift.api.machine.v1.NutanixCategory": {
"description": "NutanixCategory identifies a pair of prism category key and value",
"type": "object",
"required": [
"key",
"value"
],
"properties": {
"key": {
"description": "key is the prism category key name",
"type": "string",
"default": ""
},
"value": {
"description": "value is the prism category value associated with the key",
"type": "string",
"default": ""
}
}
},
"com.github.openshift.api.machine.v1.NutanixMachineProviderConfig": {
"description": "NutanixMachineProviderConfig is the Schema for the nutanixmachineproviderconfigs API Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).",
"type": "object",
Expand All @@ -16774,6 +16794,23 @@
"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"
},
"bootType": {
"description": "bootType indicates the boot type (Legacy, UEFI or SecureBoot) the Machine's VM uses to boot. If this field is empty or omitted, the VM will use the default boot type \"Legacy\" to boot. \"SecureBoot\" depends on \"UEFI\" boot, i.e., enabling \"SecureBoot\" means that \"UEFI\" boot is also enabled.",
"type": "string",
"default": ""
},
"categories": {
"description": "categories optionally adds one or more prism categories (each with key and value) for the Machine's VM to associate with. All the category key and value pairs specified must already exist in the prism central.",
"type": "array",
"items": {
"default": {},
"$ref": "#/definitions/com.github.openshift.api.machine.v1.NutanixCategory"
},
"x-kubernetes-list-map-keys": [
"key"
],
"x-kubernetes-list-type": "map"
},
"cluster": {
"description": "cluster is to identify the cluster (the Prism Element under management of the Prism Central), in which the Machine's VM will be created. The cluster identifier (uuid or name) can be obtained from the Prism Central console or using the prism_central API.",
"default": {},
Expand Down Expand Up @@ -16801,6 +16838,11 @@
"default": {},
"$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta"
},
"project": {
"description": "project optionally identifies a Prism project for the Machine's VM to associate with.",
"default": {},
"$ref": "#/definitions/com.github.openshift.api.machine.v1.NutanixResourceIdentifier"
},
"subnets": {
"description": "subnets holds a list of identifiers (one or more) of the cluster's network subnets for the Machine's VM to connect to. The subnet identifiers (uuid or name) can be obtained from the Prism Central console or using the prism_central API.",
"type": "array",
Expand Down