helper

package
v1.52.0 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// KnownCodes maps Gardener error codes to respective regex.
	KnownCodes = map[gardencorev1beta1.ErrorCode]func(string) bool{
		gardencorev1beta1.ErrorInfraUnauthenticated:          unauthenticatedRegexp.MatchString,
		gardencorev1beta1.ErrorInfraUnauthorized:             unauthorizedRegexp.MatchString,
		gardencorev1beta1.ErrorInfraQuotaExceeded:            quotaExceededRegexp.MatchString,
		gardencorev1beta1.ErrorInfraRateLimitsExceeded:       rateLimitsExceededRegexp.MatchString,
		gardencorev1beta1.ErrorInfraDependencies:             dependenciesRegexp.MatchString,
		gardencorev1beta1.ErrorRetryableInfraDependencies:    retryableDependenciesRegexp.MatchString,
		gardencorev1beta1.ErrorInfraResourcesDepleted:        resourcesDepletedRegexp.MatchString,
		gardencorev1beta1.ErrorConfigurationProblem:          configurationProblemRegexp.MatchString,
		gardencorev1beta1.ErrorRetryableConfigurationProblem: retryableConfigurationProblemRegexp.MatchString,
	}
)
View Source
var (
	// Scheme is a scheme with the types relevant for Alicloud actuators.
	Scheme *runtime.Scheme
)

Functions

func AppendMachineImage added in v1.25.0

func AppendMachineImage(machineImages []api.MachineImage, machineImage api.MachineImage) []api.MachineImage

AppendMachineImage will append a given MachineImage to an existing image list. If a same image (by checking name, version and encrypted flag) already exists, nothing happens

func CloudProfileConfigFromCluster

func CloudProfileConfigFromCluster(cluster *controller.Cluster) (*api.CloudProfileConfig, error)

CloudProfileConfigFromCluster decodes the provider specific cloud profile configuration for a cluster

func FindImageForRegionFromCloudProfile

func FindImageForRegionFromCloudProfile(cloudProfileConfig *api.CloudProfileConfig, imageName, imageVersion, regionName string) (string, error)

FindImageForRegionFromCloudProfile takes a list of machine images, and the desired image name, version, and region. It tries to find the image with the given name and version in the desired region. If no image is found then an error is returned.

func FindMachineImage

func FindMachineImage(machineImages []api.MachineImage, imageName, imageVersion string, encrypted bool) (*api.MachineImage, error)

FindMachineImage takes a list of machine images and tries to find the first entry whose name, version and encrypted flag matches with the given name, version and encrypted flag. If no such entry is found then an error will be returned.

func FindSecurityGroupByPurpose

func FindSecurityGroupByPurpose(securityGroups []api.SecurityGroup, purpose api.Purpose) (*api.SecurityGroup, error)

FindSecurityGroupByPurpose takes a list of security groups and tries to find the first entry whose purpose matches with the given purpose. If no such entry is found then an error will be returned.

func FindVSwitchForPurpose added in v1.8.0

func FindVSwitchForPurpose(vswitches []api.VSwitch, purpose api.Purpose) (*api.VSwitch, error)

FindVSwitchForPurpose takes a list of vswitches and tries to find the first entry whose purpose matches with the given purpose. If no such entry is found then an error will be returned.

func FindVSwitchForPurposeAndZone

func FindVSwitchForPurposeAndZone(vswitches []api.VSwitch, purpose api.Purpose, zone string) (*api.VSwitch, error)

FindVSwitchForPurposeAndZone takes a list of vswitches and tries to find the first entry whose purpose and zone matches with the given purpose and zone. If no such entry is found then an error will be returned.

func InfrastructureConfigFromInfrastructure

func InfrastructureConfigFromInfrastructure(infra *extensionsv1alpha1.Infrastructure) (*api.InfrastructureConfig, error)

InfrastructureConfigFromInfrastructure extracts the InfrastructureConfig from the ProviderConfig section of the given Infrastructure.

func InfrastructureStatusFromRaw added in v1.38.0

func InfrastructureStatusFromRaw(raw *runtime.RawExtension) (*api.InfrastructureStatus, error)

InfrastructureStatusFromRaw extracts the InfrastructureStatus from the ProviderStatus section of the given Infrastructure.

Types

This section is empty.

Jump to

Keyboard shortcuts

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