misc: corrected template doc

This commit is contained in:
Sheen Capadngan
2025-06-19 02:26:13 +08:00
parent 3276853427
commit 07d491acd1
2 changed files with 5 additions and 5 deletions
+4 -4
View File
@@ -107,7 +107,7 @@ When using `k8-secret`, the command will create or update a Kubernetes secret di
infisical bootstrap --k8-secret-template='{"data":{"token":"{{.Identity.Credentials.Token | b64enc}}"}}' infisical bootstrap --k8-secret-template='{"data":{"token":"{{.Identity.Credentials.Token | b64enc}}"}}'
# Example template with multiple fields # Example template with multiple fields
infisical bootstrap --k8-secret-template='{"stringData":{"token":"{{.Identity.Credentials.Token}}","org-id":"{{.Organization.Id}}","user-email":"{{.User.Email}}"}}' infisical bootstrap --k8-secret-template='{"stringData":{"token":"{{.Identity.Credentials.Token}}","org-id":"{{.Organization.ID}}","user-email":"{{.User.Email}}"}}'
``` ```
Available template functions: Available template functions:
@@ -117,13 +117,13 @@ Available template functions:
Available data fields: Available data fields:
- `.Identity.Credentials.Token`: The machine identity token - `.Identity.Credentials.Token`: The machine identity token
- `.Identity.Id`: The identity ID - `.Identity.ID`: The identity ID
- `.Identity.Name`: The identity name - `.Identity.Name`: The identity name
- `.Organization.Id`: The organization ID - `.Organization.ID`: The organization ID
- `.Organization.Name`: The organization name - `.Organization.Name`: The organization name
- `.Organization.Slug`: The organization slug - `.Organization.Slug`: The organization slug
- `.User.Email`: The admin user email - `.User.Email`: The admin user email
- `.User.Id`: The admin user ID - `.User.ID`: The admin user ID
- `.User.FirstName`: The admin user first name - `.User.FirstName`: The admin user first name
- `.User.LastName`: The admin user last name - `.User.LastName`: The admin user last name
@@ -112,7 +112,7 @@ The Helm chart auto bootstrap feature:
The `secretTemplate` field allows you to customize the data section of the created Kubernetes secret. The template has access to the full bootstrap response and includes helper functions: The `secretTemplate` field allows you to customize the data section of the created Kubernetes secret. The template has access to the full bootstrap response and includes helper functions:
- `{{ .Identity.Credentials.Token }}` - The admin machine identity token - `{{ .Identity.Credentials.Token }}` - The admin machine identity token
- `{{ .Organization.Id }}` - The created organization ID - `{{ .Organization.ID }}` - The created organization ID
- `{{ .Organization.Slug }}` - The organization slug - `{{ .Organization.Slug }}` - The organization slug
- `{{ .User.Email }}` - The admin user email - `{{ .User.Email }}` - The admin user email
- `b64enc` function for base64 encoding values - `b64enc` function for base64 encoding values