Documentation ¶
Overview ¶
Package nutanix contains Nutanix-specific structures for installer configuration and management.
Index ¶
- Constants
- func BootISOImageName(infraID string) string
- func BootISOImagePath(path, infraID string) string
- func CreateBootstrapISO(infraID, userData string) (string, error)
- func CreateNutanixClient(ctx context.Context, prismCentral, port, username, password string) (*nutanixclientv3.Client, error)
- func CreateNutanixClientFromPlatform(platform *Platform) (*nutanixclientv3.Client, error)
- func RHCOSImageName(infraID string) string
- func WaitForTask(clientV3 nutanixclientv3.Service, taskUUID string) error
- func WaitForTasks(clientV3 nutanixclientv3.Service, taskUUIDs []string) error
- type FailureDomain
- type MachinePool
- type Metadata
- type OSDisk
- type Platform
- type PrismCentral
- type PrismElement
- type PrismEndpoint
Constants ¶
const CredentialsSecretName = "nutanix-credentials"
CredentialsSecretName is the default nutanix credentials secret name.
const Name = "nutanix"
Name is the platform in the package
Variables ¶
This section is empty.
Functions ¶
func BootISOImageName ¶
BootISOImageName is the image name for Bootstrap node for a given infraID
func BootISOImagePath ¶
BootISOImagePath is the image path for Bootstrap node for a given infraID and path
func CreateBootstrapISO ¶
CreateBootstrapISO creates a ISO for the bootstrap node
func CreateNutanixClient ¶
func CreateNutanixClient(ctx context.Context, prismCentral, port, username, password string) (*nutanixclientv3.Client, error)
CreateNutanixClient creates a Nutanix V3 Client.
func CreateNutanixClientFromPlatform ¶
func CreateNutanixClientFromPlatform(platform *Platform) (*nutanixclientv3.Client, error)
CreateNutanixClientFromPlatform creates a Nutanix V3 clinet based on the platform configuration.
func RHCOSImageName ¶
RHCOSImageName is the unique image name for a given cluster
func WaitForTask ¶
func WaitForTask(clientV3 nutanixclientv3.Service, taskUUID string) error
WaitForTask waits until a queued task has been finished or timeout has been reached
func WaitForTasks ¶
func WaitForTasks(clientV3 nutanixclientv3.Service, taskUUIDs []string) error
WaitForTasks is a wrapper for WaitForTask
Types ¶
type FailureDomain ¶ added in v0.9.153
type FailureDomain struct { // Name defines the unique name of a failure domain. // +kubebuilder:validation:Required // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:MaxLength=64 // +kubebuilder:validation:Pattern=`^[0-9A-Za-z_.-@/]+$` Name string `json:"name"` // prismElement holds the identification (name, uuid) and the optional endpoint address and port of the Nutanix Prism Element. // When a cluster-wide proxy is installed, by default, this endpoint will be accessed via the proxy. // Should you wish for communication with this endpoint not to be proxied, please add the endpoint to the // proxy spec.noProxy list. // +kubebuilder:validation:Required PrismElement PrismElement `json:"prismElement"` // SubnetUUIDs identifies the network subnets of the Prism Element. // Currently we only support one subnet for a failure domain. // +kubebuilder:validation:Required // +kubebuilder:validation:MinItems=1 // +listType=atomic SubnetUUIDs []string `json:"subnetUUIDs"` }
FailureDomain configures failure domain information for the Nutanix platform.
type MachinePool ¶
type MachinePool struct { // NumCPUs is the total number of virtual processor cores to assign a vm. // // +optional NumCPUs int64 `json:"cpus,omitempty"` // NumCoresPerSocket is the number of cores per socket in a vm. The number // of vCPUs on the vm will be NumCPUs times NumCoresPerSocket. // For example: 4 CPUs and 4 Cores per socket will result in 16 VPUs. // The AHV scheduler treats socket and core allocation exactly the same // so there is no benefit to configuring cores over CPUs. // // +optional NumCoresPerSocket int64 `json:"coresPerSocket,omitempty"` // Memory is the size of a VM's memory in MiB. // // +optional MemoryMiB int64 `json:"memoryMiB,omitempty"` // OSDisk defines the storage for instance. // // +optional OSDisk `json:"osDisk,omitempty"` // 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 machinev1.NutanixBootType `json:"bootType,omitempty"` // Project optionally identifies a Prism project for the Machine's VM to associate with. // +optional Project *machinev1.NutanixResourceIdentifier `json:"project,omitempty"` // 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 []machinev1.NutanixCategory `json:"categories,omitempty"` // FailureDomains optionally configures a list of failure domain names // that will be applied to the MachinePool // +listType=set // +optional FailureDomains []string `json:"failureDomains,omitempty"` }
MachinePool stores the configuration for a machine pool installed on Nutanix.
func (*MachinePool) Set ¶
func (p *MachinePool) Set(required *MachinePool)
Set sets the values from `required` to `p`.
func (*MachinePool) ValidateConfig ¶
func (p *MachinePool) ValidateConfig(platform *Platform) error
ValidateConfig validates the MachinePool configuration.
type Metadata ¶
type Metadata struct { // PrismCentral is the domain name or IP address of the Prism Central. PrismCentral string `json:"prismCentral"` // Username is the name of the user to use to connect to the Prism Central. Username string `json:"username"` // Password is the password for the user to use to connect to the Prism Central. Password string `json:"password"` // Port is the port used to connect to the Prism Central. Port string `json:"port"` }
Metadata contains Nutanix metadata (e.g. for uninstalling the cluster).
type OSDisk ¶
type OSDisk struct { // DiskSizeGiB defines the size of disk in GiB. // // +optional DiskSizeGiB int64 `json:"diskSizeGiB,omitempty"` }
OSDisk defines the disk for a virtual machine.
type Platform ¶
type Platform struct { // PrismCentral is the endpoint (address and port) and credentials to // connect to the Prism Central. // This serves as the default Prism-Central. PrismCentral PrismCentral `json:"prismCentral"` // PrismElements holds a list of Prism Elements (clusters). A Prism Element encompasses all Nutanix resources (VMs, subnets, etc.) // used to host the OpenShift cluster. Currently only a single Prism Element may be defined. // This serves as the default Prism-Element. PrismElements []PrismElement `json:"prismElements"` // ClusterOSImage overrides the url provided in rhcos.json to download the RHCOS Image. // // +optional ClusterOSImage string `json:"clusterOSImage,omitempty"` // DeprecatedAPIVIP is the virtual IP address for the api endpoint // Deprecated: use APIVIPs // // +kubebuilder:validation:format=ip // +optional DeprecatedAPIVIP string `json:"apiVIP,omitempty"` // APIVIPs contains the VIP(s) for the api endpoint. In dual stack clusters // it contains an IPv4 and IPv6 address, otherwise only one VIP // // +kubebuilder:validation:MaxItems=2 // +kubebuilder:validation:UniqueItems=true // +kubebuilder:validation:Format=ip // +optional APIVIPs []string `json:"apiVIPs,omitempty"` // DeprecatedIngressVIP is the virtual IP address for ingress // Deprecated: use IngressVIPs // // +kubebuilder:validation:format=ip // +optional DeprecatedIngressVIP string `json:"ingressVIP,omitempty"` // IngressVIPs contains the VIP(s) for ingress. In dual stack clusters // it contains an IPv4 and IPv6 address, otherwise only one VIP // // +kubebuilder:validation:MaxItems=2 // +kubebuilder:validation:UniqueItems=true // +kubebuilder:validation:Format=ip // +optional IngressVIPs []string `json:"ingressVIPs,omitempty"` // DefaultMachinePlatform is the default configuration used when // installing on Nutanix for machine pools which do not define their own // platform configuration. // +optional DefaultMachinePlatform *MachinePool `json:"defaultMachinePlatform,omitempty"` // SubnetUUIDs identifies the network subnets to be used by the cluster. // Currently we only support one subnet for an OpenShift cluster. SubnetUUIDs []string `json:"subnetUUIDs"` // LoadBalancer defines how the load balancer used by the cluster is configured. // LoadBalancer is available in TechPreview. // +optional LoadBalancer *configv1.NutanixPlatformLoadBalancer `json:"loadBalancer,omitempty"` // FailureDomains configures failure domains for the Nutanix platform. // +optional FailureDomains []FailureDomain `json:"failureDomains,omitempty"` }
Platform stores any global configuration used for Nutanix platforms.
func (Platform) GetFailureDomainByName ¶ added in v0.9.153
func (p Platform) GetFailureDomainByName(fdName string) (*FailureDomain, error)
GetFailureDomainByName returns the NutanixFailureDomain pointer with the input name. Returns nil if not found.
type PrismCentral ¶
type PrismCentral struct { // Endpoint holds the address and port of the Prism Central Endpoint PrismEndpoint `json:"endpoint"` // Username is the name of the user to connect to the Prism Central Username string `json:"username"` // Password is the password for the user to connect to the Prism Central Password string `json:"password"` }
PrismCentral holds the endpoint and credentials data used to connect to the Prism Central
type PrismElement ¶
type PrismElement struct { // UUID is the UUID of the Prism Element (cluster) UUID string `json:"uuid"` // Endpoint holds the address and port of the Prism Element // +optional Endpoint PrismEndpoint `json:"endpoint,omitempty"` // Name is prism endpoint Name Name string `json:"name,omitempty"` }
PrismElement holds the uuid, endpoint of the Prism Element (cluster)
type PrismEndpoint ¶
type PrismEndpoint struct { // address is the endpoint address (DNS name or IP address) of the Nutanix Prism Central or Element (cluster) Address string `json:"address"` // port is the port number to access the Nutanix Prism Central or Element (cluster) Port int32 `json:"port"` }
PrismEndpoint holds the endpoint address and port to access the Nutanix Prism Central or Element (cluster)