Documentation
¶
Index ¶
- func ApplyResponseDataToSecrets(ctx context.Context, localKube client.Client, logger logging.Logger, ...)
- func PatchSecretsIntoHeaders(ctx context.Context, localKube client.Client, headers map[string][]string, ...) (map[string][]string, error)
- func PatchSecretsIntoMap(ctx context.Context, localKube client.Client, data map[string]interface{}, ...) (map[string]interface{}, error)
- func PatchSecretsIntoResponse(ctx context.Context, localKube client.Client, response interfaces.HTTPResponse, ...) (interfaces.HTTPResponse, error)
- func PatchSecretsIntoString(ctx context.Context, localKube client.Client, str string, ...) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyResponseDataToSecrets ¶ added in v1.0.6
func ApplyResponseDataToSecrets(ctx context.Context, localKube client.Client, logger logging.Logger, response *httpClient.HttpResponse, secretConfigs []common.SecretInjectionConfig, cr metav1.Object)
ApplyResponseDataToSecrets applies response data to Kubernetes Secrets as specified in the resource's SecretInjectionConfigs. For each SecretInjectionConfig, it extracts a value from the HTTP response and patches it into the referenced Secret. Ownership of the Secret is optionally set based on the configuration.
func PatchSecretsIntoHeaders ¶
func PatchSecretsIntoHeaders(ctx context.Context, localKube client.Client, headers map[string][]string, logger logging.Logger) (map[string][]string, error)
PatchSecretsIntoHeaders takes a map of headers and applies security measures to sensitive values within the headers. It creates a copy of the input map to avoid modifying the original map and iterates over the copied map to process each list of headers. It then applies the necessary modifications to each header using patchSecretsToValue function.
func PatchSecretsIntoMap ¶ added in v1.0.5
func PatchSecretsIntoMap(ctx context.Context, localKube client.Client, data map[string]interface{}, logger logging.Logger) (map[string]interface{}, error)
PatchSecretsIntoMap takes a map of string to interface{} and patches secrets into any string values within the map, including nested maps and slices.
func PatchSecretsIntoResponse ¶ added in v1.0.10
func PatchSecretsIntoResponse(ctx context.Context, localKube client.Client, response interfaces.HTTPResponse, logger logging.Logger) (interfaces.HTTPResponse, error)
PatchSecretsIntoResponse patches secrets into the provided response.
Types ¶
This section is empty.