MarshalSecretsToMapStrings
Marshals a slice of core.Secret objects into a map of strings, where each secret is encoded and stored with a unique key. It validates mount requirements and ensures that the encoded secret size does not exceed a predefined limit.
def MarshalSecretsToMapStrings(
secrets: []*core.Secret
) - > map[string]string, error
Marshals a slice of core.Secret objects into a map of strings, where each secret is encoded and stored with an indexed annotation prefix. This function is used to prepare secrets for storage or transmission as string key-value pairs.
Parameters
| Name | Type | Description |
|---|---|---|
| secrets | []*core.Secret | A slice of core.Secret objects to be marshaled. Each secret in this slice will be processed and converted into a string representation. |
Returns
| Type | Description |
|---|---|
map[string]string, error | A map where keys are indexed annotation prefixes and values are the encoded secret strings, or an error if a secret has an invalid mount requirement or exceeds the total annotation size limit. |