helper

package
v2.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2026 License: Apache-2.0 Imports: 15 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 OpenStack actuators.
	Scheme *runtime.Scheme
)

Functions

func CloudProfileConfigFromCluster

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

CloudProfileConfigFromCluster decodes the provider specific cloud profile configuration for a cluster

func CloudProfileConfigFromRawExtension

func CloudProfileConfigFromRawExtension(raw *runtime.RawExtension) (*stackitv1alpha1.CloudProfileConfig, error)

func ControlPlaneConfigFromCluster

func ControlPlaneConfigFromCluster(cluster *controller.Cluster) (*stackitv1alpha1.ControlPlaneConfig, error)

ControlPlaneConfigFromCluster retrieves the ControlPlaneConfig from the Cluster. Returns nil if decoding fails

func FindFloatingPool

func FindFloatingPool(floatingPools []stackitv1alpha1.FloatingPool, floatingPoolNamePattern, region string, domain *string) (*stackitv1alpha1.FloatingPool, error)

FindFloatingPool receives a list of floating pools and tries to find the best match for a given `floatingPoolNamePattern` considering constraints like `region` and `domain`. If no matching floating pool was found then an error will be returned.

func FindImageFromCloudProfile

func FindImageFromCloudProfile(cloudProfileConfig *stackitv1alpha1.CloudProfileConfig, imageName, imageVersion, regionName, architecture string) (*stackitv1alpha1.MachineImage, error)

FindImageFromCloudProfile takes a list of machine images, and the desired image name and version. It tries to find the image with the given name and version in the desired cloud profile. If it cannot be found then an error is returned.

func FindKeyStoneCACert

func FindKeyStoneCACert(keyStoneURLs []stackitv1alpha1.KeyStoneURL, keystoneCABundle *string, region string) *string

FindKeyStoneCACert takes a list of keystone URLs and tries to find the first entry whose region matches with the given region and returns the CA cert for this region. If no such entry is found then it tries to use the non-regional value.

func FindKeyStoneURL

func FindKeyStoneURL(keyStoneURLs []stackitv1alpha1.KeyStoneURL, keystoneURL, region string) (string, error)

FindKeyStoneURL takes a list of keystone URLs and tries to find the first entry whose region matches with the given region. If no such entry is found then it tries to use the non-regional keystone URL. If this is not specified then an error will be returned.

func FindMachineImage

func FindMachineImage(machineImages []stackitv1alpha1.MachineImage, name, version, architecture string) (*stackitv1alpha1.MachineImage, error)

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

func FindSecurityGroupByPurpose

func FindSecurityGroupByPurpose(securityGroups []stackitv1alpha1.SecurityGroup, purpose stackitv1alpha1.Purpose) (*stackitv1alpha1.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 FindSubnetByPurpose

func FindSubnetByPurpose(subnets []stackitv1alpha1.Subnet, purpose stackitv1alpha1.Purpose) (*stackitv1alpha1.Subnet, error)

FindSubnetByPurpose takes a list of subnets 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 InfrastructureConfigFromInfrastructure

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

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

func InfrastructureConfigFromRawExtension

func InfrastructureConfigFromRawExtension(raw *runtime.RawExtension) (*stackitv1alpha1.InfrastructureConfig, error)

InfrastructureConfigFromRawExtension extracts the InfrastructureConfig from the ProviderConfig.

func InfrastructureStatusFromRaw

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

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

func WorkerConfigFromRawExtension

func WorkerConfigFromRawExtension(raw *runtime.RawExtension) (*stackitv1alpha1.WorkerConfig, error)

WorkerConfigFromRawExtension extracts the provider specific configuration for a worker pool.

Types

This section is empty.

Jump to

Keyboard shortcuts

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