nodes

package
v5.22.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 4, 2022 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AnyOutOfDate

func AnyOutOfDate(ctx context.Context, tenantClusterK8sClient ctrlclient.Client, destinationRelease string, releases []releasev1alpha1.Release, nodeLabels map[string]string) (bool, error)

AnyOutOfDate iterates over all nodes in tenant cluster and finds corresponding azure-operator version from node labels. If node doesn't have this label or was created with older version than currently reconciling one, then this function returns true. Otherwise (including on error) false.

func GetTenantClusterNodes

func GetTenantClusterNodes(ctx context.Context, tenantClusterK8sClient client.Client) ([]corev1.Node, error)

func IsClientNotFound

func IsClientNotFound(err error) bool

IsClientNotFound asserts clientNotFoundError.

func IsInvalidConfig

func IsInvalidConfig(err error) bool

IsInvalidConfig asserts invalidConfigError.

func IsScaleSetNotFound

func IsScaleSetNotFound(err error) bool

IsScaleSetNotFound asserts scaleSetNotFoundError.

Types

type Config

type Config struct {
	CtrlClient ctrlclient.Client
	Debugger   *debugger.Debugger
	Logger     micrologger.Logger

	Azure         setting.Azure
	ClientFactory client.OrganizationFactory
	Name          string
}

type Resource

type Resource struct {
	CtrlClient   ctrlclient.Client
	Debugger     *debugger.Debugger
	Logger       micrologger.Logger
	StateMachine state.Machine

	Azure         setting.Azure
	ClientFactory client.OrganizationFactory
	// contains filtered or unexported fields
}

func New

func New(config Config) (*Resource, error)

func (*Resource) CreateARMDeployment

func (r *Resource) CreateARMDeployment(ctx context.Context, deploymentsClient *azureresource.DeploymentsClient, computedDeployment azureresource.Deployment, resourceGroupName, deploymentName string) error

func (*Resource) CreateDrainerConfig

func (r *Resource) CreateDrainerConfig(ctx context.Context, clusterID, clusterAPIEndpoint string, nodeName string) error

func (*Resource) GetEncrypterObject

func (r *Resource) GetEncrypterObject(ctx context.Context, secretName string) (encrypter.Interface, error)

func (*Resource) GetResourceStatus

func (r *Resource) GetResourceStatus(ctx context.Context, customObject providerv1alpha1.AzureConfig, t string) (string, error)

func (*Resource) GetVMSSInstances

func (r *Resource) GetVMSSInstances(ctx context.Context, azureMachinePool capzexp.AzureMachinePool) ([]compute.VirtualMachineScaleSetVM, error)

func (*Resource) Name

func (r *Resource) Name() string

func (*Resource) SetResourceStatus

func (r *Resource) SetResourceStatus(ctx context.Context, customObject providerv1alpha1.AzureConfig, t string, s string) error

func (*Resource) SetStateMachine

func (r *Resource) SetStateMachine(stateMachine state.Machine)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL