Documentation ¶
Index ¶
- func ExtractFailureDomainFromMachine(logger logr.Logger, machine machinev1beta1.Machine, ...) (failuredomain.FailureDomain, error)
- func ExtractFailureDomainsFromMachineSets(logger logr.Logger, machineSets []machinev1beta1.MachineSet, ...) ([]failuredomain.FailureDomain, error)
- func ExtractFailureDomainsFromMachines(logger logr.Logger, machines []machinev1beta1.Machine, ...) ([]failuredomain.FailureDomain, error)
- type AWSProviderConfig
- type AzureProviderConfig
- type GCPProviderConfig
- type GenericProviderConfig
- type NutanixProviderConfig
- func (n NutanixProviderConfig) Config() machinev1.NutanixMachineProviderConfig
- func (n NutanixProviderConfig) ExtractFailureDomain() machinev1.NutanixFailureDomainReference
- func (n NutanixProviderConfig) GetFailureDomainByName(failureDomainName string) (*configv1.NutanixFailureDomain, error)
- func (n NutanixProviderConfig) Infrastructure() *configv1.Infrastructure
- func (n NutanixProviderConfig) InjectFailureDomain(fdRef machinev1.NutanixFailureDomainReference) (NutanixProviderConfig, error)
- func (n NutanixProviderConfig) ResetFailureDomainRelatedFields() ProviderConfig
- type OpenStackProviderConfig
- type ProviderConfig
- type VSphereProviderConfig
- func (v VSphereProviderConfig) Config() machinev1beta1.VSphereMachineProviderSpec
- func (v VSphereProviderConfig) Diff(other machinev1beta1.VSphereMachineProviderSpec) ([]string, error)
- func (v VSphereProviderConfig) ExtractFailureDomain() machinev1.VSphereFailureDomain
- func (v VSphereProviderConfig) InjectFailureDomain(fd machinev1.VSphereFailureDomain) (VSphereProviderConfig, error)
- func (v VSphereProviderConfig) ResetTopologyRelatedFields() ProviderConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractFailureDomainFromMachine ¶
func ExtractFailureDomainFromMachine(logger logr.Logger, machine machinev1beta1.Machine, infrastructure *configv1.Infrastructure) (failuredomain.FailureDomain, error)
ExtractFailureDomainFromMachine FailureDomain extracted from the provided machine.
func ExtractFailureDomainsFromMachineSets ¶
func ExtractFailureDomainsFromMachineSets(logger logr.Logger, machineSets []machinev1beta1.MachineSet, infrastructure *configv1.Infrastructure) ([]failuredomain.FailureDomain, error)
ExtractFailureDomainsFromMachineSets creates list of FailureDomains extracted from the provided list of machineSets.
func ExtractFailureDomainsFromMachines ¶
func ExtractFailureDomainsFromMachines(logger logr.Logger, machines []machinev1beta1.Machine, infrastructure *configv1.Infrastructure) ([]failuredomain.FailureDomain, error)
ExtractFailureDomainsFromMachines creates list of FailureDomains extracted from the provided list of machines.
Types ¶
type AWSProviderConfig ¶
type AWSProviderConfig struct {
// contains filtered or unexported fields
}
AWSProviderConfig holds the provider spec of an AWS Machine. It allows external code to extract and inject failure domain information, as well as gathering the stored config.
func (AWSProviderConfig) Config ¶
func (a AWSProviderConfig) Config() machinev1beta1.AWSMachineProviderConfig
Config returns the stored AWSMachineProviderConfig.
func (AWSProviderConfig) ExtractFailureDomain ¶
func (a AWSProviderConfig) ExtractFailureDomain() machinev1.AWSFailureDomain
ExtractFailureDomain returns an AWSFailureDomain based on the failure domain information stored within the AWSProviderConfig.
func (AWSProviderConfig) InjectFailureDomain ¶
func (a AWSProviderConfig) InjectFailureDomain(fd machinev1.AWSFailureDomain) AWSProviderConfig
InjectFailureDomain returns a new AWSProviderConfig configured with the failure domain information provided.
type AzureProviderConfig ¶
type AzureProviderConfig struct {
// contains filtered or unexported fields
}
AzureProviderConfig holds the provider spec of an Azure Machine. It allows external code to extract and inject failure domain information, as well as gathering the stored config.
func (AzureProviderConfig) Config ¶
func (a AzureProviderConfig) Config() machinev1beta1.AzureMachineProviderSpec
Config returns the stored AzureMachineProviderSpec.
func (AzureProviderConfig) ExtractFailureDomain ¶
func (a AzureProviderConfig) ExtractFailureDomain() machinev1.AzureFailureDomain
ExtractFailureDomain returns an AzureFailureDomain based on the failure domain information stored within the AzureProviderConfig.
func (AzureProviderConfig) InjectFailureDomain ¶
func (a AzureProviderConfig) InjectFailureDomain(fd machinev1.AzureFailureDomain) AzureProviderConfig
InjectFailureDomain returns a new AzureProviderConfig configured with the failure domain information provided.
type GCPProviderConfig ¶
type GCPProviderConfig struct {
// contains filtered or unexported fields
}
GCPProviderConfig holds the provider spec of a GCP Machine. It allows external code to extract and inject failure domain information, as well as gathering the stored config.
func (GCPProviderConfig) Config ¶
func (g GCPProviderConfig) Config() machinev1beta1.GCPMachineProviderSpec
Config returns the stored GCPMachineProviderSpec.
func (GCPProviderConfig) ExtractFailureDomain ¶
func (g GCPProviderConfig) ExtractFailureDomain() machinev1.GCPFailureDomain
ExtractFailureDomain returns a GCPFailureDomain based on the failure domain information stored within the GCPProviderConfig.
func (GCPProviderConfig) InjectFailureDomain ¶
func (g GCPProviderConfig) InjectFailureDomain(fd machinev1.GCPFailureDomain) GCPProviderConfig
InjectFailureDomain returns a new GCPProviderConfig configured with the failure domain.
type GenericProviderConfig ¶
type GenericProviderConfig struct {
// contains filtered or unexported fields
}
GenericProviderConfig holds the provider spec for machine on platforms that don't support failure domains and can be handled generically.
func (GenericProviderConfig) ExtractFailureDomain ¶
func (g GenericProviderConfig) ExtractFailureDomain() failuredomain.FailureDomain
ExtractFailureDomain extract generic failure domain that contains just the platform type.
type NutanixProviderConfig ¶
type NutanixProviderConfig struct {
// contains filtered or unexported fields
}
NutanixProviderConfig is a wrapper around machinev1.NutanixMachineProviderConfig.
func (NutanixProviderConfig) Config ¶
func (n NutanixProviderConfig) Config() machinev1.NutanixMachineProviderConfig
Config returns the stored NutanixMachineProviderConfig.
func (NutanixProviderConfig) ExtractFailureDomain ¶
func (n NutanixProviderConfig) ExtractFailureDomain() machinev1.NutanixFailureDomainReference
ExtractFailureDomain is used to extract a failure domain from the ProviderConfig.
func (NutanixProviderConfig) GetFailureDomainByName ¶
func (n NutanixProviderConfig) GetFailureDomainByName(failureDomainName string) (*configv1.NutanixFailureDomain, error)
GetFailureDomainByName returns the NutanixFailureDomain if the input name referenced failureDomain is configured in the Infrastructure resource.
func (NutanixProviderConfig) Infrastructure ¶
func (n NutanixProviderConfig) Infrastructure() *configv1.Infrastructure
Infrastructure returns the stored *configv1.Infrastructure.
func (NutanixProviderConfig) InjectFailureDomain ¶
func (n NutanixProviderConfig) InjectFailureDomain(fdRef machinev1.NutanixFailureDomainReference) (NutanixProviderConfig, error)
InjectFailureDomain returns a new NutanixProviderConfig configured with the failure domain information provided.
func (NutanixProviderConfig) ResetFailureDomainRelatedFields ¶
func (n NutanixProviderConfig) ResetFailureDomainRelatedFields() ProviderConfig
ResetFailureDomainRelatedFields resets fields related to failure domain.
type OpenStackProviderConfig ¶
type OpenStackProviderConfig struct {
// contains filtered or unexported fields
}
OpenStackProviderConfig holds the provider spec of an OpenStack Machine. It allows external code to extract and inject failure domain information, as well as gathering the stored config.
func (OpenStackProviderConfig) Config ¶
func (a OpenStackProviderConfig) Config() machinev1alpha1.OpenstackProviderSpec
Config returns the stored OpenStackMachineProviderSpec.
func (OpenStackProviderConfig) ExtractFailureDomain ¶
func (a OpenStackProviderConfig) ExtractFailureDomain() machinev1.OpenStackFailureDomain
ExtractFailureDomain returns an OpenStackFailureDomain based on the failure domain information stored within the OpenStackProviderConfig.
func (OpenStackProviderConfig) InjectFailureDomain ¶
func (a OpenStackProviderConfig) InjectFailureDomain(fd machinev1.OpenStackFailureDomain) OpenStackProviderConfig
InjectFailureDomain returns a new OpenStackProviderConfig configured with the failure domain information provided.
type ProviderConfig ¶
type ProviderConfig interface { // InjectFailureDomain is used to inject a failure domain into the ProviderConfig. // The returned ProviderConfig will be a copy of the current ProviderConfig with // the new failure domain injected. InjectFailureDomain(failuredomain.FailureDomain) (ProviderConfig, error) // ExtractFailureDomain is used to extract a failure domain from the ProviderConfig. ExtractFailureDomain() failuredomain.FailureDomain // Equal compares two ProviderConfigs to determine whether or not they are equal. Equal(ProviderConfig) (bool, error) // Diff compares two ProviderConfigs and returns a list of differences, // or nil if there are none. Diff(ProviderConfig) ([]string, error) // RawConfig marshalls the configuration into a JSON byte slice. RawConfig() ([]byte, error) // Type returns the platform type of the provider config. Type() configv1.PlatformType // AWS returns the AWSProviderConfig if the platform type is AWS. AWS() AWSProviderConfig // Azure returns the AzureProviderConfig if the platform type is Azure. Azure() AzureProviderConfig // GCP returns the GCPProviderConfig if the platform type is GCP. GCP() GCPProviderConfig // Nutanix returns the NutanixProviderConfig if the platform type is Nutanix. Nutanix() NutanixProviderConfig // OpenStack returns the OpenStackProviderConfig if the platform type is OpenStack. OpenStack() OpenStackProviderConfig // VSphere returns the VSphereProviderConfig if the platform type is VSphere. VSphere() VSphereProviderConfig // Generic returns the GenericProviderConfig if we are on a platform that is using generic provider abstraction. Generic() GenericProviderConfig }
ProviderConfig is an interface that allows external code to interact with provider configuration across different platform types.
func NewProviderConfigFromMachineSpec ¶
func NewProviderConfigFromMachineSpec(logger logr.Logger, machineSpec machinev1beta1.MachineSpec, infrastructure *configv1.Infrastructure) (ProviderConfig, error)
NewProviderConfigFromMachineSpec creates a new ProviderConfig from the provided machineSpec object.
func NewProviderConfigFromMachineTemplate ¶
func NewProviderConfigFromMachineTemplate(logger logr.Logger, tmpl machinev1.OpenShiftMachineV1Beta1MachineTemplate, infrastructure *configv1.Infrastructure) (ProviderConfig, error)
NewProviderConfigFromMachineTemplate creates a new ProviderConfig from the provided machine template.
type VSphereProviderConfig ¶
type VSphereProviderConfig struct {
// contains filtered or unexported fields
}
VSphereProviderConfig holds the provider spec of a VSphere Machine. It allows external code to extract and inject failure domain information, as well as gathering the stored config.
func (VSphereProviderConfig) Config ¶
func (v VSphereProviderConfig) Config() machinev1beta1.VSphereMachineProviderSpec
Config returns the stored VSphereMachineProviderSpec.
func (VSphereProviderConfig) Diff ¶
func (v VSphereProviderConfig) Diff(other machinev1beta1.VSphereMachineProviderSpec) ([]string, error)
Diff compares two ProviderConfigs and returns a list of differences, or nil if there are none.
func (VSphereProviderConfig) ExtractFailureDomain ¶
func (v VSphereProviderConfig) ExtractFailureDomain() machinev1.VSphereFailureDomain
ExtractFailureDomain is used to extract a failure domain from the ProviderConfig.
func (VSphereProviderConfig) InjectFailureDomain ¶
func (v VSphereProviderConfig) InjectFailureDomain(fd machinev1.VSphereFailureDomain) (VSphereProviderConfig, error)
InjectFailureDomain returns a new VSphereProviderConfig configured with the failure domain.
func (VSphereProviderConfig) ResetTopologyRelatedFields ¶
func (v VSphereProviderConfig) ResetTopologyRelatedFields() ProviderConfig
ResetTopologyRelatedFields resets fields related to topology and VM placement such as the workspace, network, and template.