Documentation ¶
Index ¶
- Constants
- func CreateSTSARNSecret(ctx context.Context, client k8sclient.Client, ...) (integreatlyv1alpha1.StatusPhase, error)
- func GetSTSCredentials(ctx context.Context, client k8sclient.Client, namespace string) (string, string, error)
- func GetSTSCredentialsFromEnvVar() (string, string, error)
- func GetSTSRoleARN(ctx context.Context, client k8sclient.Client, namespace string) (string, error)
- func IsClusterSTS(ctx context.Context, client k8sclient.Client, log logger.Logger) (bool, error)
- func ValidateAddOnStsRoleArnParameterPattern(client k8sclient.Client, namespace string) (bool, error)
Constants ¶
const ( ClusterCloudCredentialName = "cluster" RoleArnParameterName = "sts-role-arn" RoleSessionName = "Red-Hat-cloud-resources-operator" CredsSecretName = "sts-credentials" CredsSecretRoleARNKeyName = "role_arn" CredsSecretTokenPathKeyName = "web_identity_token_file" CredsRoleEnvKey = "ROLE_ARN" CredsTokenPathEnvKey = "TOKEN_PATH" CredsS3AccessKeyId = "s3-access-key-id" CredsS3SecretAccessKey = "s3-secret-access-key" )
#nosec G101 -- This is a false positive
Variables ¶
This section is empty.
Functions ¶
func CreateSTSARNSecret ¶
func CreateSTSARNSecret(ctx context.Context, client k8sclient.Client, installationNamespace, operatorNamespace string) (integreatlyv1alpha1.StatusPhase, error)
CreateSTSARNSecret create the STS arn secret - should be already validated in preflight checks
func GetSTSCredentials ¶
func GetSTSCredentials(ctx context.Context, client k8sclient.Client, namespace string) (string, string, error)
GetSTSCredentials retrieves the STS secret used by CRO
func GetSTSCredentialsFromEnvVar ¶
GetSTSCredentialsFromEnvVar Gets the role arn and token file path from environment variable Should only be used in functional test container
func GetSTSRoleARN ¶
GetSTSRoleARN retrieves the role ARN addon parameter to be used by CRO
func IsClusterSTS ¶
func ValidateAddOnStsRoleArnParameterPattern ¶
func ValidateAddOnStsRoleArnParameterPattern(client k8sclient.Client, namespace string) (bool, error)
ValidateAddOnStsRoleArnParameterPattern is checking if STS addon parameter Pattern is valid Parameter is Valid only in case: 1. Parameter exists and value matching AWS Role ARN pattern Parameter is Not valid in other cases: 2. parameter exists and value is NOT matching AWS Role ARN pattern 3. parameter exists and value is empty 4. parameter does not exist
Types ¶
This section is empty.