Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
docs: added docs for template support in k8s operator
=269f851cbfe9
diff --git a/docs/integrations/platforms/kubernetes.mdx b/docs/integrations/platforms/kubernetes.mdxindex 8ea24d65fd..a925f6c4bb 100644--- a/docs/integrations/platforms/kubernetes.mdx+++ b/docs/integrations/platforms/kubernetes.mdx@@ -162,6 +162,10 @@ spec:secretName: managed-secretsecretNamespace: defaultcreationPolicy: "Orphan" ## Owner | Orphan+ # template:+ # includeAllSecrets: true+ # data:+ # CUSTOM_KEY: "{{ .KEY.SecretPath }} {{ .KEY.Value }}"# secretType: kubernetes.io/dockerconfigjson```@@ -674,6 +678,51 @@ The namespace of the managed Kubernetes secret to be created.<Accordion title="managedSecretReference.secretType">Override the default Opaque type for managed secrets with this field. Useful for creating kubernetes.io/dockerconfigjson secrets.</Accordion>+<Accordion title="managedSecretReference.template">+Templates enable you to transform data from Infisical before storing it as a Kubernetes Secret.+</Accordion>+<Accordion title="managedSecretReference.template.includeAllSecrets">+When set to true, this option injects all secrets retrieved from Infisical into your configuration.+Secrets defined in the template will override the automatically injected secrets.+</Accordion>+<Accordion title="managedSecretReference.template.data">+Define secret keys and their corresponding templates.+Each data value uses a Golang template with access to all secrets retrieved from the specified scope.++Secrets are structured as follows:+```golang+type TemplateSecret struct {+ Value string `json:"value"`+ SecretPath string `json:"secretPath"`+}+```++#### Example template configuration:+```golang+ managedSecretReference:+ secretName: managed-secret+ secretNamespace: default+ template:+ includeAllSecrets: true+ data:+ NEW_KEY: "{{ .KEY1.SecretPath }} {{ .KEY1.Value }}"+```++When you run the following command:+```bash+kubectl get secret managed-secret -o jsonpath='{.data}'+```++You'll receive Kubernetes secrets output that includes the NEW_KEY:+```bash+{... "KEY":"d29ybGQ=","NEW_KEY":"LyBoZWxsbw=="}+```++When you set `includeAllSecrets` as `false` the Kubernetes secrets outputs will be:+```bash+{"NEW_KEY":"LyBoZWxsbw=="}+```+</Accordion><Accordion title="managedSecretReference.creationPolicy">Creation polices allow you to control whether or not owner references should be added to the managed Kubernetes secret that is generated by the Infisical operator.This is useful for tools such as ArgoCD, where every resource requires an owner reference; otherwise, it will be pruned automatically.