Documentation ¶
Index ¶
- func AnyImmutableFieldChanged(oldNmc, newNmc *v1alpha1.NutanixMachineConfig) bool
- func NeedsNewControlPlaneTemplate(oldSpec, newSpec *cluster.Spec, oldNmc, newNmc *v1alpha1.NutanixMachineConfig) bool
- func NeedsNewKubeadmConfigTemplate(newWorkerNodeGroup *v1alpha1.WorkerNodeGroupConfiguration, ...) bool
- func NeedsNewWorkloadTemplate(oldSpec, newSpec *cluster.Spec, oldNmc, newNmc *v1alpha1.NutanixMachineConfig) bool
- type Client
- type Provider
- func (p *Provider) BootstrapClusterOpts(_ *cluster.Spec) ([]bootstrapper.BootstrapClusterOption, error)
- func (p *Provider) BootstrapSetup(ctx context.Context, clusterConfig *v1alpha1.Cluster, cluster *types.Cluster) error
- func (p *Provider) ChangeDiff(currentSpec, newSpec *cluster.Spec) *types.ComponentChangeDiff
- func (p *Provider) DatacenterConfig(_ *cluster.Spec) providers.DatacenterConfig
- func (p *Provider) DatacenterResourceType() string
- func (p *Provider) DeleteResources(ctx context.Context, clusterSpec *cluster.Spec) error
- func (p *Provider) EnvMap(_ *cluster.Spec) (map[string]string, error)
- func (p *Provider) GenerateCAPISpecForCreate(ctx context.Context, cluster *types.Cluster, clusterSpec *cluster.Spec) (controlPlaneSpec, workersSpec []byte, err error)
- func (p *Provider) GenerateCAPISpecForUpgrade(ctx context.Context, bootstrapCluster, workloadCluster *types.Cluster, ...) (controlPlaneSpec, workersSpec []byte, err error)
- func (p *Provider) GenerateMHC(_ *cluster.Spec) ([]byte, error)
- func (p *Provider) GenerateStorageClass() []byte
- func (p *Provider) GetDeployments() map[string][]string
- func (p *Provider) GetInfrastructureBundle(clusterSpec *cluster.Spec) *types.InfrastructureBundle
- func (p *Provider) InstallCustomProviderComponents(ctx context.Context, kubeconfigFile string) error
- func (p *Provider) MachineConfigs(_ *cluster.Spec) []providers.MachineConfig
- func (p *Provider) MachineDeploymentsToDelete(workloadCluster *types.Cluster, currentSpec, newSpec *cluster.Spec) []string
- func (p *Provider) MachineResourceType() string
- func (p *Provider) Name() string
- func (p *Provider) PostBootstrapDeleteForUpgrade(ctx context.Context) error
- func (p *Provider) PostBootstrapSetup(ctx context.Context, clusterConfig *v1alpha1.Cluster, cluster *types.Cluster) error
- func (p *Provider) PostBootstrapSetupUpgrade(ctx context.Context, clusterConfig *v1alpha1.Cluster, cluster *types.Cluster) error
- func (p *Provider) PostClusterDeleteValidate(ctx context.Context, managementCluster *types.Cluster) error
- func (p *Provider) PostMoveManagementToBootstrap(ctx context.Context, bootstrapCluster *types.Cluster) error
- func (p *Provider) PostWorkloadInit(ctx context.Context, cluster *types.Cluster, clusterSpec *cluster.Spec) error
- func (p *Provider) PreCAPIInstallOnBootstrap(ctx context.Context, cluster *types.Cluster, clusterSpec *cluster.Spec) error
- func (p *Provider) RunPostControlPlaneCreation(ctx context.Context, clusterSpec *cluster.Spec, cluster *types.Cluster) error
- func (p *Provider) RunPostControlPlaneUpgrade(ctx context.Context, oldClusterSpec *cluster.Spec, clusterSpec *cluster.Spec, ...) error
- func (p *Provider) SetupAndValidateCreateCluster(ctx context.Context, clusterSpec *cluster.Spec) error
- func (p *Provider) SetupAndValidateDeleteCluster(ctx context.Context, cluster *types.Cluster, clusterSpec *cluster.Spec) error
- func (p *Provider) SetupAndValidateUpgradeCluster(ctx context.Context, _ *types.Cluster, _ *cluster.Spec, _ *cluster.Spec) error
- func (p *Provider) UpdateKubeConfig(content *[]byte, clusterName string) error
- func (p *Provider) UpdateSecrets(ctx context.Context, cluster *types.Cluster, clusterSpec *cluster.Spec) error
- func (p *Provider) UpgradeNeeded(ctx context.Context, newSpec, currentSpec *cluster.Spec, ...) (bool, error)
- func (p *Provider) ValidateNewSpec(_ context.Context, _ *types.Cluster, _ *cluster.Spec) error
- func (p *Provider) Version(clusterSpec *cluster.Spec) string
- type ProviderKubectlClient
- type TemplateBuilder
- func (ntb *TemplateBuilder) GenerateCAPISpecControlPlane(clusterSpec *cluster.Spec, buildOptions ...providers.BuildMapOption) (content []byte, err error)
- func (ntb *TemplateBuilder) GenerateCAPISpecSecret(clusterSpec *cluster.Spec, buildOptions ...providers.BuildMapOption) (content []byte, err error)
- func (ntb *TemplateBuilder) GenerateCAPISpecWorkers(clusterSpec *cluster.Spec, ...) (content []byte, err error)
- type Validator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AnyImmutableFieldChanged ¶
func AnyImmutableFieldChanged(oldNmc, newNmc *v1alpha1.NutanixMachineConfig) bool
func NeedsNewControlPlaneTemplate ¶
func NeedsNewControlPlaneTemplate(oldSpec, newSpec *cluster.Spec, oldNmc, newNmc *v1alpha1.NutanixMachineConfig) bool
func NeedsNewKubeadmConfigTemplate ¶
func NeedsNewKubeadmConfigTemplate(newWorkerNodeGroup *v1alpha1.WorkerNodeGroupConfiguration, oldWorkerNodeGroup *v1alpha1.WorkerNodeGroupConfiguration, oldWorkerNodeNmc *v1alpha1.NutanixMachineConfig, newWorkerNodeNmc *v1alpha1.NutanixMachineConfig) bool
func NeedsNewWorkloadTemplate ¶
func NeedsNewWorkloadTemplate(oldSpec, newSpec *cluster.Spec, oldNmc, newNmc *v1alpha1.NutanixMachineConfig) bool
Types ¶
type Client ¶
type Client interface { GetSubnet(ctx context.Context, uuid string) (*v3.SubnetIntentResponse, error) ListSubnet(ctx context.Context, getEntitiesRequest *v3.DSMetadata) (*v3.SubnetListIntentResponse, error) GetImage(ctx context.Context, uuid string) (*v3.ImageIntentResponse, error) ListImage(ctx context.Context, getEntitiesRequest *v3.DSMetadata) (*v3.ImageListIntentResponse, error) GetCluster(ctx context.Context, uuid string) (*v3.ClusterIntentResponse, error) ListCluster(ctx context.Context, getEntitiesRequest *v3.DSMetadata) (*v3.ClusterListIntentResponse, error) }
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider implements the Nutanix Provider
func NewProvider ¶
func NewProvider( datacenterConfig *v1alpha1.NutanixDatacenterConfig, machineConfigs map[string]*v1alpha1.NutanixMachineConfig, clusterConfig *v1alpha1.Cluster, providerKubectlClient ProviderKubectlClient, nutanixClient Client, now types.NowFunc, ) *Provider
NewProvider returns a new nutanix provider
func (*Provider) BootstrapClusterOpts ¶
func (p *Provider) BootstrapClusterOpts(_ *cluster.Spec) ([]bootstrapper.BootstrapClusterOption, error)
func (*Provider) BootstrapSetup ¶
func (*Provider) ChangeDiff ¶
func (p *Provider) ChangeDiff(currentSpec, newSpec *cluster.Spec) *types.ComponentChangeDiff
func (*Provider) DatacenterConfig ¶
func (p *Provider) DatacenterConfig(_ *cluster.Spec) providers.DatacenterConfig
func (*Provider) DatacenterResourceType ¶
func (*Provider) DeleteResources ¶
func (*Provider) GenerateCAPISpecForCreate ¶
func (*Provider) GenerateCAPISpecForUpgrade ¶
func (*Provider) GenerateStorageClass ¶
func (*Provider) GetDeployments ¶
func (*Provider) GetInfrastructureBundle ¶
func (p *Provider) GetInfrastructureBundle(clusterSpec *cluster.Spec) *types.InfrastructureBundle
func (*Provider) InstallCustomProviderComponents ¶
func (*Provider) MachineConfigs ¶
func (p *Provider) MachineConfigs(_ *cluster.Spec) []providers.MachineConfig
func (*Provider) MachineDeploymentsToDelete ¶
func (*Provider) MachineResourceType ¶
func (*Provider) PostBootstrapDeleteForUpgrade ¶
func (*Provider) PostBootstrapSetup ¶
func (*Provider) PostBootstrapSetupUpgrade ¶
func (*Provider) PostClusterDeleteValidate ¶
func (*Provider) PostMoveManagementToBootstrap ¶
func (*Provider) PostWorkloadInit ¶
func (*Provider) PreCAPIInstallOnBootstrap ¶
func (*Provider) RunPostControlPlaneCreation ¶
func (*Provider) RunPostControlPlaneUpgrade ¶
func (*Provider) SetupAndValidateCreateCluster ¶
func (*Provider) SetupAndValidateDeleteCluster ¶
func (*Provider) SetupAndValidateUpgradeCluster ¶
func (*Provider) UpdateKubeConfig ¶
func (*Provider) UpdateSecrets ¶
func (*Provider) UpgradeNeeded ¶
func (*Provider) ValidateNewSpec ¶
type ProviderKubectlClient ¶
type ProviderKubectlClient interface { ApplyKubeSpecFromBytes(ctx context.Context, cluster *types.Cluster, data []byte) error SetEksaControllerEnvVar(ctx context.Context, envVar, envVarVal, kubeconfig string) error GetEksaCluster(ctx context.Context, cluster *types.Cluster, clusterName string) (*v1alpha1.Cluster, error) GetEksaNutanixDatacenterConfig(ctx context.Context, nutanixDatacenterConfigName string, kubeconfigFile string, namespace string) (*v1alpha1.NutanixDatacenterConfig, error) GetEksaNutanixMachineConfig(ctx context.Context, nutanixMachineConfigName string, kubeconfigFile string, namespace string) (*v1alpha1.NutanixMachineConfig, error) GetKubeadmControlPlane(ctx context.Context, cluster *types.Cluster, clusterName string, opts ...executables.KubectlOpt) (*kubeadmv1beta1.KubeadmControlPlane, error) GetMachineDeployment(ctx context.Context, workerNodeGroupName string, opts ...executables.KubectlOpt) (*clusterv1.MachineDeployment, error) SearchNutanixMachineConfig(ctx context.Context, name string, kubeconfigFile string, namespace string) ([]*v1alpha1.NutanixMachineConfig, error) SearchNutanixDatacenterConfig(ctx context.Context, name string, kubeconfigFile string, namespace string) ([]*v1alpha1.NutanixDatacenterConfig, error) DeleteEksaNutanixDatacenterConfig(ctx context.Context, nutanixDatacenterConfigName string, kubeconfigFile string, namespace string) error DeleteEksaNutanixMachineConfig(ctx context.Context, nutanixMachineConfigName string, kubeconfigFile string, namespace string) error }
type TemplateBuilder ¶
type TemplateBuilder struct {
// contains filtered or unexported fields
}
TemplateBuilder builds templates for nutanix
func NewNutanixTemplateBuilder ¶
func NewNutanixTemplateBuilder( datacenterSpec *v1alpha1.NutanixDatacenterConfigSpec, controlPlaneMachineSpec, etcdMachineSpec *v1alpha1.NutanixMachineConfigSpec, workerNodeGroupMachineSpecs map[string]v1alpha1.NutanixMachineConfigSpec, creds basicAuthCreds, now types.NowFunc, ) *TemplateBuilder
func (*TemplateBuilder) GenerateCAPISpecControlPlane ¶
func (ntb *TemplateBuilder) GenerateCAPISpecControlPlane(clusterSpec *cluster.Spec, buildOptions ...providers.BuildMapOption) (content []byte, err error)
func (*TemplateBuilder) GenerateCAPISpecSecret ¶
func (ntb *TemplateBuilder) GenerateCAPISpecSecret(clusterSpec *cluster.Spec, buildOptions ...providers.BuildMapOption) (content []byte, err error)
func (*TemplateBuilder) GenerateCAPISpecWorkers ¶
type Validator ¶
type Validator struct {
// contains filtered or unexported fields
}
Validator is a client to validate nutanix resources
func NewValidator ¶
NewValidator returns a new validator client
func (*Validator) ValidateMachineConfig ¶
func (v *Validator) ValidateMachineConfig(ctx context.Context, config *anywherev1.NutanixMachineConfig) error
ValidateMachineConfig validates the Prism Element cluster, subnet, and image for the machine
Click to show internal directories.
Click to hide internal directories.