resolver

package
v2.14.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: 35 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ResolveAuthRefAndPodIdentity added in v2.4.0

func ResolveAuthRefAndPodIdentity(ctx context.Context, client client.Client, logger logr.Logger,
	triggerAuthRef *kedav1alpha1.AuthenticationRef, podTemplateSpec *corev1.PodTemplateSpec,
	namespace string, secretsLister corev1listers.SecretLister) (map[string]string, kedav1alpha1.AuthPodIdentity, error)

ResolveAuthRefAndPodIdentity provides authentication parameters and pod identity needed authenticate scaler with the environment.

func ResolveContainerEnv

func ResolveContainerEnv(ctx context.Context, client client.Client, logger logr.Logger, podSpec *corev1.PodSpec, containerName, namespace string, secretsLister corev1listers.SecretLister) (map[string]string, error)

ResolveContainerEnv resolves all environment variables in a container. It returns either map of env variable key and value or error if there is any.

func ResolveScaleTargetPodSpec added in v2.4.0

func ResolveScaleTargetPodSpec(ctx context.Context, kubeClient client.Client, scalableObject interface{}) (*corev1.PodTemplateSpec, string, error)

ResolveScaleTargetPodSpec for given scalableObject inspects the scale target workload, which could be almost any k8s resource (Deployment, StatefulSet, CustomResource...) and for the given resource returns *corev1.PodTemplateSpec and a name of the container which is being used for referencing environment variables

Types

type AwsSecretManagerHandler added in v2.13.0

type AwsSecretManagerHandler struct {
	// contains filtered or unexported fields
}

func NewAwsSecretManagerHandler added in v2.13.0

func NewAwsSecretManagerHandler(a *kedav1alpha1.AwsSecretManager) *AwsSecretManagerHandler

func (*AwsSecretManagerHandler) Initialize added in v2.13.0

func (ash *AwsSecretManagerHandler) Initialize(ctx context.Context, client client.Client, logger logr.Logger, triggerNamespace string, secretsLister corev1listers.SecretLister, podSpec *corev1.PodSpec) error

Initialize sets up the AWS Secret Manager handler by configuring AWS credentials, AWS region, or using pod identity. It initializes the AWS Secret Manager session and metadata.

func (*AwsSecretManagerHandler) Read added in v2.13.0

func (ash *AwsSecretManagerHandler) Read(ctx context.Context, logger logr.Logger, secretName, versionID, versionStage string) (string, error)

Read fetches the secret value from AWS Secret Manager using the provided secret name, version ID(optional), and version stage(optional). It returns the secret value as a string.

func (*AwsSecretManagerHandler) Stop added in v2.13.0

func (ash *AwsSecretManagerHandler) Stop()

type AzureKeyVaultHandler added in v2.7.0

type AzureKeyVaultHandler struct {
	// contains filtered or unexported fields
}

func NewAzureKeyVaultHandler added in v2.7.0

func NewAzureKeyVaultHandler(v *kedav1alpha1.AzureKeyVault) *AzureKeyVaultHandler

func (*AzureKeyVaultHandler) Initialize added in v2.7.0

func (vh *AzureKeyVaultHandler) Initialize(ctx context.Context, client client.Client, logger logr.Logger, triggerNamespace string, secretsLister corev1listers.SecretLister) error

func (*AzureKeyVaultHandler) Read added in v2.7.0

func (vh *AzureKeyVaultHandler) Read(ctx context.Context, secretName string, version string) (string, error)

type GCPSecretManagerHandler added in v2.13.0

type GCPSecretManagerHandler struct {
	// contains filtered or unexported fields
}

func NewGCPSecretManagerHandler added in v2.13.0

func NewGCPSecretManagerHandler(v *kedav1alpha1.GCPSecretManager) *GCPSecretManagerHandler

NewGCPSecretManagerHandler creates a GCPSecretManagerHandler object

func (*GCPSecretManagerHandler) Initialize added in v2.13.0

func (vh *GCPSecretManagerHandler) Initialize(ctx context.Context, client client.Client, logger logr.Logger, triggerNamespace string, secretsLister corev1listers.SecretLister) error

Initialize the GCP Secret Manager client

func (*GCPSecretManagerHandler) Read added in v2.13.0

func (vh *GCPSecretManagerHandler) Read(ctx context.Context, secretID, secretVersion string) (string, error)

type HashicorpVaultHandler

type HashicorpVaultHandler struct {
	// contains filtered or unexported fields
}

HashicorpVaultHandler is specification of Hashi Corp Vault

func NewHashicorpVaultHandler

func NewHashicorpVaultHandler(v *kedav1alpha1.HashiCorpVault) *HashicorpVaultHandler

NewHashicorpVaultHandler creates a HashicorpVaultHandler object

func (*HashicorpVaultHandler) Initialize

func (vh *HashicorpVaultHandler) Initialize(logger logr.Logger) error

Initialize the Vault client

func (*HashicorpVaultHandler) Read

func (vh *HashicorpVaultHandler) Read(path string) (*vaultapi.Secret, error)

Read is used to get a secret from vault Read api. (e.g. secret)

func (*HashicorpVaultHandler) ResolveSecrets added in v2.13.0

func (vh *HashicorpVaultHandler) ResolveSecrets(secrets []kedav1alpha1.VaultSecret) ([]kedav1alpha1.VaultSecret, error)

ResolveSecrets allows to resolve a slice of secrets by vault. The function returns the list of secrets with the value updated. If multiple secret refers to the same SecretGroup, the secret will be fetched only once.

func (*HashicorpVaultHandler) Stop

func (vh *HashicorpVaultHandler) Stop()

Stop is responsible for stopping the renewal token process

func (*HashicorpVaultHandler) Write added in v2.13.0

func (vh *HashicorpVaultHandler) Write(path string, data map[string]interface{}) (*vaultapi.Secret, error)

Write is used to get a secret from vault that needs to pass along data and uses the vault Write api. (e.g. pki)

type SecretGroup added in v2.13.0

type SecretGroup struct {
	// contains filtered or unexported fields
}

SecretGroup is used to group secret together by path, secretType and vaultPkiData.

Jump to

Keyboard shortcuts

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