util

package
v0.24.0 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClusterctlProviderType

func ClusterctlProviderType(genericProvider operatorv1.GenericProvider) clusterctlv1.ProviderType

ClusterctlProviderType returns the provider type from the genericProvider.

func GetCustomProviders added in v0.17.1

func GetCustomProviders(ctx context.Context, cl ctrlclient.Client, currProvider genericprovider.GenericProvider) ([]operatorv1.GenericProvider, error)

GetCustomProviders retrieves all custom providers using `FetchConfig` that aren't the current provider name / type.

func GetGenericProvider added in v0.9.1

func GetGenericProvider(ctx context.Context, cl ctrlclient.Client, provider configclient.Provider) (operatorv1.GenericProvider, error)

GetGenericProvider returns the first of generic providers matching the type and the name from the configclient.Provider.

func IsCoreProvider

func IsCoreProvider(p genericprovider.GenericProvider) bool

func IsGitHubDomain added in v0.24.0

func IsGitHubDomain(u *url.URL) bool

IsGitHubDomain returns true if the URL is a GitHub repository.

func IsGitLabDomain added in v0.24.0

func IsGitLabDomain(u *url.URL) bool

IsGitLabDomain returns true if the URL is a GitLab repository.

func RepositoryFactory added in v0.9.0

func RepositoryFactory(ctx context.Context, providerConfig configclient.Provider, configVariablesClient configclient.VariablesClient) (repository.Repository, error)

RepositoryFactory returns the repository implementation corresponding to the provider URL. inspired by https://github.com/kubernetes-sigs/cluster-api/blob/124d9be7035e492f027cdc7a701b6b179451190a/cmd/clusterctl/client/repository/client.go#L170

Types

This section is empty.

Jump to

Keyboard shortcuts

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