docs(k8s): added better templating docs

This commit is contained in:
Daniel Hougaard
2025-03-29 04:45:04 +04:00
parent ed94e7a8e7
commit 3ad50a4386
3 changed files with 307 additions and 336 deletions

View File

@@ -451,30 +451,7 @@ Using Go templates, you can format, combine, and create new key-value pairs of s
To help transform your config map data further, the operator provides a set of built-in functions that you can use in your templates.
### Available templating functions
<Accordion title="encodeBase64">
**Function name**: encodeBase64
**Description**:
Given a string, this function will encode the string as a base64 encoded string.
This function is useful when you want to store a string as a base64 encoded value in Infisical.
**Returns**: The base64 encoded string.
**Example**:
The example below assumes that the `PLAIN_KEY` secret is stored in your source secret as a plaintext string.
```yaml
push:
secret:
secretName: push-secret-demo
secretNamespace: default
template:
includeAllSecrets: true
data:
PLAIN_KEY: "{{ encodeBase64 .PLAIN_KEY.Value }}" # Will be stored in Infisical as a base64 encoded string
```
</Accordion>
Please refer to the [templating functions documentation](/integrations/platforms/kubernetes/overview#available-helper-functions) for more information.
</Accordion>
## Applying the InfisicalPushSecret CRD to your cluster