Documentation
¶
Index ¶
- Variables
- func ApplySecretInCrossplaneNamespace(secretName string, data map[string][]byte) env.Func
- func CreateProviderConfig(ctx context.Context, cfg *envconf.Config, namespace string, cfEndpoint string, ...) error
- func DeleteResourcesFromDirsGracefully(ctx context.Context, cfg *envconf.Config, resourceDirs []string, ...) error
- func GetCFCredentialsOrPanic() map[string][]byte
- func GetImagesFromJsonOrPanic(imagesJson string) (string, string)
- func GetObjectsToImport(ctx context.Context, cfg *envconf.Config, dirs []string) ([]k8s.Object, error)
- func LoadUpgradePackages(fromTag, toTag string, fromPackage, toPackage string) (string, string)
- func SetupLogging(verbosity int)
- type CFCredentials
Constants ¶
This section is empty.
Variables ¶
var ( UUT_IMAGES_KEY = "UUT_IMAGES" UUT_CONFIG_KEY = "crossplane/provider-cloudfoundry" UUT_CONTROLLER_KEY = "crossplane/provider-cloudfoundry-controller" UUIDRegex = regexp.MustCompile(`^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$`) )
Functions ¶
func ApplySecretInCrossplaneNamespace ¶
ApplySecretInCrossplaneNamespace creates a secret in the crossplane-system namespace This is used to store CloudFoundry credentials that the provider will use
Parameters:
- secretName: Name of the secret to create
- data: Map of secret data (key -> value as bytes)
Returns: An env.Func that can be used with testenv.Setup()
func CreateProviderConfig ¶
func CreateProviderConfig( ctx context.Context, cfg *envconf.Config, namespace string, cfEndpoint string, secretName string, ) error
CreateProviderConfig contains the core logic for creating or updating a ProviderConfig. Returns an error if the operation fails.
func GetCFCredentialsOrPanic ¶
GetCFCredentialsOrPanic retrieves CloudFoundry credentials from environment variables and returns them as a map suitable for creating a Kubernetes secret
Required environment variables:
- CF_EMAIL: Email address for CF authentication
- CF_USERNAME: Username for CF authentication
- CF_PASSWORD: Password for CF authentication
Returns: map with "credentials" key containing JSON-encoded credentials
func GetObjectsToImport ¶
func LoadUpgradePackages ¶
LoadUpgradePackages resolves provider packages for upgrade tests. Returns: fromProviderPackage, toProviderPackage
func SetupLogging ¶
func SetupLogging(verbosity int)
SetupLogging configures klog and controller-runtime logging with the specified verbosity TODO: Consider extracting to shared package - identical in BTP and CF providers
Types ¶
type CFCredentials ¶
type CFCredentials struct {
Email string `json:"email"`
Username string `json:"username"`
Password string `json:"password"`
}
CFCredentials represents the CloudFoundry credentials structure