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
PR feedback
Matheus Nogueira15ae70387203
diff --git a/docs/integrations/platforms/kubernetes/infisical-auth-crd.mdx b/docs/integrations/platforms/kubernetes/infisical-auth-crd.mdxindex 881e7fcb75..8349fcbeaa 100644--- a/docs/integrations/platforms/kubernetes/infisical-auth-crd.mdx+++ b/docs/integrations/platforms/kubernetes/infisical-auth-crd.mdx@@ -4,10 +4,6 @@ title: "Using the InfisicalAuth CRD"description: "Learn how to configure the InfisicalAuth CRD to define how the operator authenticates with Infisical."----<Info>- This CRD is part of the **v1beta1** API and is only used with v1beta1 secret resources (`InfisicalStaticSecret`).-</Info>-## OverviewThe **InfisicalAuth** CRD defines how the Infisical Operator authenticates with your Infisical instance. It encapsulates the machine identity authentication method and credentials. Once created, it can be referenced by multiple secret resources, so you only need to define authentication details once per identity.@@ -22,8 +18,263 @@ The operator caches authenticated credentials using the token's TTL (at 70% of t## Example+Only define **one** authentication method per resource. Note that `spec.method` uses kebab-case while the corresponding configuration field uses camelCase.++`SecretReference` means a reference to a key inside a Kubernetes Secret:++| Field | Description |+| ----------- | ----------- |+| `name` | Name of the Kubernetes Secret. |+| `namespace` | Namespace where the Kubernetes Secret exists. |+| `key` | Key inside the Kubernetes Secret data. |++<AccordionGroup>+ <Accordion title="Kubernetes Auth (Recommended)">+Authenticates using a Kubernetes service account token. This is the recommended method when running inside a Kubernetes cluster. The operator automatically creates short-lived service account tokens (10 minutes) for authentication.++[Read more about Kubernetes Auth](/documentation/platform/identities/kubernetes-auth).+<Tabs>- <Tab title="Kubernetes Auth (Recommended)">+ <Tab title="Short-lived service account tokens (Recommended)">+<Steps>+ <Step title="Create a token reviewer service account">+ Create a reviewer service account in your Kubernetes cluster. Infisical uses this account to authenticate with the Kubernetes API Server through the TokenReview API.++ ```yaml infisical-reviewer-service-account.yaml+ apiVersion: v1+ kind: ServiceAccount+ metadata:+ name: infisical-token-reviewer+ namespace: default+ ```++ ```bash+ kubectl apply -f infisical-reviewer-service-account.yaml+ ```+ </Step>++ <Step title="Bind the reviewer service account">+ Bind the reviewer service account to the `system:auth-delegator` cluster role. This allows Infisical to perform delegated authentication checks against the TokenReview API.++ ```yaml infisical-reviewer-cluster-role-binding.yaml+ apiVersion: rbac.authorization.k8s.io/v1+ kind: ClusterRoleBinding+ metadata:+ name: infisical-token-reviewer-role-binding+ namespace: default+ roleRef:+ apiGroup: rbac.authorization.k8s.io+ kind: ClusterRole+ name: system:auth-delegator+ subjects:+ - kind: ServiceAccount+ name: infisical-token-reviewer+ namespace: default+ ```++ ```bash+ kubectl apply -f infisical-reviewer-cluster-role-binding.yaml+ ```+ </Step>++ <Step title="Create and retrieve the token reviewer JWT">+ Create a service account token secret for the reviewer service account:++ ```yaml service-account-reviewer-token.yaml+ apiVersion: v1+ kind: Secret+ type: kubernetes.io/service-account-token+ metadata:+ name: infisical-token-reviewer-token+ annotations:+ kubernetes.io/service-account.name: "infisical-token-reviewer"+ ```++ ```bash+ kubectl apply -f service-account-reviewer-token.yaml+ ```++ Link the secret to the reviewer service account:++ ```bash+ kubectl patch serviceaccount infisical-token-reviewer \+ -p '{"secrets": [{"name": "infisical-token-reviewer-token"}]}' \+ -n default+ ```++ Retrieve the token reviewer JWT:++ ```bash+ kubectl get secret infisical-token-reviewer-token \+ -n default \+ -o=jsonpath='{.data.token}' | base64 --decode+ ```++ Keep this JWT token handy. You will need it for the **Token Reviewer JWT** field when configuring Kubernetes Auth on the machine identity in Infisical.+ </Step>++ <Step title="Create and configure a machine identity">+ Follow the [Kubernetes Auth guide](/documentation/platform/identities/kubernetes-auth#guide) to create a machine identity, configure its **Kubernetes Auth** authentication method, and add it to the projects it should access.++ Use the token reviewer JWT from the previous step when filling the **Token Reviewer JWT** field.+ </Step>++ <Step title="Create the service account used for authentication">+ Create the Kubernetes service account that the operator will use to authenticate with Infisical. The operator creates short-lived tokens for this service account automatically.++ ```yaml infisical-service-account.yaml+ apiVersion: v1+ kind: ServiceAccount+ metadata:+ name: infisical-service-account+ namespace: default+ ```++ ```bash+ kubectl apply -f infisical-service-account.yaml+ ```+ </Step>+</Steps>+ </Tab>+ <Tab title="Manual long-lived service account tokens">+ Manual long-lived service account tokens are created as Kubernetes secrets and remain valid until deleted or rotated. In most cases, use short-lived service account tokens instead because they are easier to operate and reduce the lifetime of exposed credentials.++ <Steps>+ <Step title="Create a token reviewer service account">+ Create a reviewer service account in your Kubernetes cluster. Infisical uses this account to authenticate with the Kubernetes API Server through the TokenReview API.++ ```yaml infisical-reviewer-service-account.yaml+ apiVersion: v1+ kind: ServiceAccount+ metadata:+ name: infisical-token-reviewer+ namespace: default+ ```++ ```bash+ kubectl apply -f infisical-reviewer-service-account.yaml+ ```+ </Step>++ <Step title="Bind the reviewer service account">+ Bind the reviewer service account to the `system:auth-delegator` cluster role. This allows Infisical to perform delegated authentication checks against the TokenReview API.++ ```yaml infisical-reviewer-cluster-role-binding.yaml+ apiVersion: rbac.authorization.k8s.io/v1+ kind: ClusterRoleBinding+ metadata:+ name: infisical-token-reviewer-role-binding+ namespace: default+ roleRef:+ apiGroup: rbac.authorization.k8s.io+ kind: ClusterRole+ name: system:auth-delegator+ subjects:+ - kind: ServiceAccount+ name: infisical-token-reviewer+ namespace: default+ ```++ ```bash+ kubectl apply -f infisical-reviewer-cluster-role-binding.yaml+ ```+ </Step>++ <Step title="Create and retrieve the token reviewer JWT">+ Create a service account token secret for the reviewer service account:++ ```yaml service-account-reviewer-token.yaml+ apiVersion: v1+ kind: Secret+ type: kubernetes.io/service-account-token+ metadata:+ name: infisical-token-reviewer-token+ annotations:+ kubernetes.io/service-account.name: "infisical-token-reviewer"+ ```++ ```bash+ kubectl apply -f service-account-reviewer-token.yaml+ ```++ Link the secret to the reviewer service account:++ ```bash+ kubectl patch serviceaccount infisical-token-reviewer \+ -p '{"secrets": [{"name": "infisical-token-reviewer-token"}]}' \+ -n default+ ```++ Retrieve the token reviewer JWT:++ ```bash+ kubectl get secret infisical-token-reviewer-token \+ -n default \+ -o=jsonpath='{.data.token}' | base64 --decode+ ```++ Keep this JWT token handy. You will need it for the **Token Reviewer JWT** field when configuring Kubernetes Auth on the machine identity in Infisical.+ </Step>++ <Step title="Create and configure a machine identity">+ Follow the [Kubernetes Auth guide](/documentation/platform/identities/kubernetes-auth#guide) to create a machine identity, configure its **Kubernetes Auth** authentication method, and add it to the projects it should access.++ Use the token reviewer JWT from the previous step when filling the **Token Reviewer JWT** field.+ </Step>++ <Step title="Create the service account used for authentication">+ Create the Kubernetes service account that the operator will use to authenticate with Infisical.++ ```yaml infisical-service-account.yaml+ apiVersion: v1+ kind: ServiceAccount+ metadata:+ name: infisical-service-account+ namespace: default+ ```++ ```bash+ kubectl apply -f infisical-service-account.yaml+ ```+ </Step>++ <Step title="Create a long-lived token for the service account">+ Create a service account token secret for the service account used to authenticate with Infisical:++ ```yaml infisical-service-account-token.yaml+ apiVersion: v1+ kind: Secret+ type: kubernetes.io/service-account-token+ metadata:+ name: infisical-service-account-token+ namespace: default+ annotations:+ kubernetes.io/service-account.name: "infisical-service-account"+ ```++ ```bash+ kubectl apply -f infisical-service-account-token.yaml+ ```++ Patch the service account with the newly created service account token:++ ```bash+ kubectl patch serviceaccount infisical-service-account \+ -p '{"secrets": [{"name": "infisical-service-account-token"}]}' \+ -n default+ ```+ </Step>+ </Steps>+ </Tab>+</Tabs>++| Field | Required | Description |+| ------------------------------ | -------- | --------------------------------------------------------- |+| `identityIdRef` | Yes | Reference to the secret containing the machine identity ID. |+| `serviceAccountRef.name` | Yes | Name of the Kubernetes service account. |+| `serviceAccountRef.namespace` | Yes | Namespace of the service account. |+| `serviceAccountTokenAudiences` | No | Custom audiences for the generated service account token. |+```yaml infisical-auth.yamlapiVersion: secrets.infisical.com/v1beta1kind: InfisicalAuth@@ -40,7 +291,7 @@ spec:namespace: defaultkey: identityIdserviceAccountRef:- name: service-account+ name: infisical-service-accountnamespace: default```@@ -50,8 +301,17 @@ The referenced Kubernetes secret must contain the machine identity ID:kubectl create secret generic kubernetes-credentials \--from-literal=identityId="<your-machine-identity-id>"```- </Tab>- <Tab title="Universal Auth">+ </Accordion>+ <Accordion title="Universal Auth">+Authenticates using a client ID and client secret. Works anywhere, not tied to any cloud provider.++[Read more about Universal Auth](/documentation/platform/identities/universal-auth).++| Field | Required | Description |+| ----------------- | -------- | ----------------------------------------------------- |+| `clientIdRef` | Yes | Reference to the secret containing the client ID. |+| `clientSecretRef` | Yes | Reference to the secret containing the client secret. |+```yaml infisical-auth.yamlapiVersion: secrets.infisical.com/v1beta1kind: InfisicalAuth@@ -80,8 +340,16 @@ kubectl create secret generic universal-auth-credentials \--from-literal=clientId="<your-client-id>" \--from-literal=clientSecret="<your-client-secret>"```- </Tab>- <Tab title="AWS IAM Auth">+ </Accordion>+ <Accordion title="AWS IAM Auth">+Authenticates using AWS IAM. Can only be used within AWS environments such as EC2, Lambda, and EKS.++[Read more about AWS IAM Auth](/documentation/platform/identities/aws-auth).++| Field | Required | Description |+| --------------- | -------- | --------------------------------------------------------- |+| `identityIdRef` | Yes | Reference to the secret containing the machine identity ID. |+```yaml infisical-auth.yamlapiVersion: secrets.infisical.com/v1beta1kind: InfisicalAuth@@ -105,153 +373,93 @@ The referenced Kubernetes secret must contain the machine identity ID:kubectl create secret generic aws-iam-credentials \--from-literal=identityId="<your-machine-identity-id>"```- </Tab>-</Tabs>--Apply the resource:--```bash-kubectl apply -f infisical-auth.yaml-```--## Spec--The `InfisicalAuth` spec has the following top-level fields:+ </Accordion>+ <Accordion title="Azure Auth">+Authenticates using Azure managed identity. Can only be used within Azure environments.-| Field | Type | Required | Description |-| ------------------------ | -------------- | -------- | --------------------------------------------------------------------------- |-| `infisicalConnectionRef` | NamespacedName | Yes | Reference to the `InfisicalConnection` resource that defines the Infisical host. |-| `method` | string | Yes | The authentication method to use. Must be one of: `universal`, `kubernetes`, `aws-iam`, `azure`, `gcp-id-token`, `gcp-iam`, `ldap`. |+[Read more about Azure Auth](/documentation/platform/identities/azure-auth).-In addition, you must provide the configuration object that matches your chosen `method`.+| Field | Required | Description |+| --------------- | -------- | --------------------------------------------------------- |+| `identityIdRef` | Yes | Reference to the secret containing the machine identity ID. |+| `resource` | No | The Azure resource (audience) to request a token for. |-## Authentication methods--Only define **one** authentication method per resource. Note that `spec.method` uses kebab-case while the corresponding configuration field uses camelCase:--| `spec.method` | Configuration field |-| -------------- | ------------------- |-| `kubernetes` | `kubernetes` |-| `universal` | `universal` |-| `aws-iam` | `awsIam` |-| `azure` | `azure` |-| `gcp-id-token` | `gcpIdToken` |-| `gcp-iam` | `gcpIam` |-| `ldap` | `ldap` |--<Accordion title="kubernetes">- Authenticates using a Kubernetes service account token. This is the recommended method when running inside a Kubernetes cluster. The operator automatically creates short-lived service account tokens (10 minutes) for authentication.-- [Read more about Kubernetes Auth](/documentation/platform/identities/kubernetes-auth).-- | Field | Type | Required | Description |- | ------------------------------ | ----------------- | -------- | ------------------------------------------------------------- |- | `identityIdRef` | SecretReference | Yes | Reference to the secret containing the machine identity ID. |- | `serviceAccountRef.name` | string | Yes | Name of the Kubernetes service account. |- | `serviceAccountRef.namespace` | string | Yes | Namespace of the service account. |- | `serviceAccountTokenAudiences` | string[] | No | Custom audiences for the generated service account token. |-- ```yaml- method: kubernetes- kubernetes:- identityIdRef:- name: kubernetes-credentials- namespace: default- key: identityId- serviceAccountRef:- name: default- namespace: default- ```-</Accordion>--<Accordion title="universal">- Authenticates using a client ID and client secret. Works anywhere, not tied to any cloud provider.- [Read more about Universal Auth](/documentation/platform/identities/universal-auth).-- | Field | Type | Required | Description |- | ----------------- | --------------- | -------- | ---------------------------------------------------------- |- | `clientIdRef` | SecretReference | Yes | Reference to the secret containing the client ID. |- | `clientSecretRef` | SecretReference | Yes | Reference to the secret containing the client secret. |-- ```yaml- method: universal- universal:- clientIdRef:- name: universal-auth-credentials- namespace: default- key: clientId- clientSecretRef:- name: universal-auth-credentials- namespace: default- key: clientSecret- ```-</Accordion>--<Accordion title="aws-iam">- Authenticates using AWS IAM. Can only be used within AWS environments (EC2, Lambda, EKS).- [Read more about AWS IAM Auth](/documentation/platform/identities/aws-auth).-- | Field | Type | Required | Description |- | --------------- | --------------- | -------- | --------------------------------------------------------- |- | `identityIdRef` | SecretReference | Yes | Reference to the secret containing the machine identity ID. |-- ```yaml- method: aws-iam- awsIam:- identityIdRef:- name: aws-iam-credentials- namespace: default- key: identityId- ```-</Accordion>--<Accordion title="azure">- Authenticates using Azure managed identity. Can only be used within Azure environments.- [Read more about Azure Auth](/documentation/platform/identities/azure-auth).-- | Field | Type | Required | Description |- | --------------- | --------------- | -------- | --------------------------------------------------------- |- | `identityIdRef` | SecretReference | Yes | Reference to the secret containing the machine identity ID. |- | `resource` | string | No | The Azure resource (audience) to request a token for. |-- ```yaml+```yaml infisical-auth.yaml+apiVersion: secrets.infisical.com/v1beta1+kind: InfisicalAuth+metadata:+ name: my-infisical-auth+spec:+ infisicalConnectionRef:+ name: my-infisical-connection+ namespace: defaultmethod: azureazure:identityIdRef:name: azure-credentialsnamespace: defaultkey: identityId- ```-</Accordion>+```++The referenced Kubernetes secret must contain the machine identity ID:++```bash+kubectl create secret generic azure-credentials \+ --from-literal=identityId="<your-machine-identity-id>"+```+ </Accordion>+ <Accordion title="GCP ID Token Auth">+Authenticates using GCP ID tokens. Can only be used within GCP environments.-<Accordion title="gcp-id-token">- Authenticates using GCP ID tokens. Can only be used within GCP environments.- [Read more about GCP Auth](/documentation/platform/identities/gcp-auth).+[Read more about GCP ID Token Auth](/documentation/platform/identities/gcp-auth).- | Field | Type | Required | Description |- | --------------- | --------------- | -------- | --------------------------------------------------------- |- | `identityIdRef` | SecretReference | Yes | Reference to the secret containing the machine identity ID. |+| Field | Required | Description |+| --------------- | -------- | --------------------------------------------------------- |+| `identityIdRef` | Yes | Reference to the secret containing the machine identity ID. |- ```yaml+```yaml infisical-auth.yaml+apiVersion: secrets.infisical.com/v1beta1+kind: InfisicalAuth+metadata:+ name: my-infisical-auth+spec:+ infisicalConnectionRef:+ name: my-infisical-connection+ namespace: defaultmethod: gcp-id-tokengcpIdToken:identityIdRef:name: gcp-id-token-credentialsnamespace: defaultkey: identityId- ```-</Accordion>+```-<Accordion title="gcp-iam">- Authenticates using GCP IAM with a service account key file. Works both within and outside GCP environments.- [Read more about GCP Auth](/documentation/platform/identities/gcp-auth).+The referenced Kubernetes secret must contain the machine identity ID:- | Field | Type | Required | Description |- | ---------------------------- | --------------- | -------- | --------------------------------------------------------- |- | `identityIdRef` | SecretReference | Yes | Reference to the secret containing the machine identity ID. |- | `serviceAccountKeyFilePath` | string | Yes | Path to the GCP service account key file mounted in the operator pod. |+```bash+kubectl create secret generic gcp-id-token-credentials \+ --from-literal=identityId="<your-machine-identity-id>"+```+ </Accordion>+ <Accordion title="GCP IAM Auth">+Authenticates using GCP IAM with a service account key file. Works both within and outside GCP environments.++[Read more about GCP IAM Auth](/documentation/platform/identities/gcp-auth).- ```yaml+| Field | Required | Description |+| --------------------------- | -------- | --------------------------------------------------------- |+| `identityIdRef` | Yes | Reference to the secret containing the machine identity ID. |+| `serviceAccountKeyFilePath` | Yes | Path to the GCP service account key file mounted in the operator pod. |++```yaml infisical-auth.yaml+apiVersion: secrets.infisical.com/v1beta1+kind: InfisicalAuth+metadata:+ name: my-infisical-auth+spec:+ infisicalConnectionRef:+ name: my-infisical-connection+ namespace: defaultmethod: gcp-iamgcpIam:identityIdRef:@@ -259,20 +467,35 @@ Only define **one** authentication method per resource. Note that `spec.method`namespace: defaultkey: identityIdserviceAccountKeyFilePath: /path/to/service-account-key.json- ```-</Accordion>+```-<Accordion title="ldap">- Authenticates using LDAP credentials.- [Read more about LDAP Auth](/documentation/platform/identities/ldap-auth).+The referenced Kubernetes secret must contain the machine identity ID:++```bash+kubectl create secret generic gcp-iam-credentials \+ --from-literal=identityId="<your-machine-identity-id>"+```+ </Accordion>+ <Accordion title="LDAP Auth">+Authenticates using LDAP credentials.- | Field | Type | Required | Description |- | --------------- | --------------- | -------- | --------------------------------------------------------- |- | `identityIdRef` | SecretReference | Yes | Reference to the secret containing the machine identity ID. |- | `usernameRef` | SecretReference | Yes | Reference to the secret containing the LDAP username. |- | `passwordRef` | SecretReference | Yes | Reference to the secret containing the LDAP password. |+[Read more about LDAP Auth](/documentation/platform/identities/ldap-auth).- ```yaml+| Field | Required | Description |+| --------------- | -------- | --------------------------------------------------------- |+| `identityIdRef` | Yes | Reference to the secret containing the machine identity ID. |+| `usernameRef` | Yes | Reference to the secret containing the LDAP username. |+| `passwordRef` | Yes | Reference to the secret containing the LDAP password. |++```yaml infisical-auth.yaml+apiVersion: secrets.infisical.com/v1beta1+kind: InfisicalAuth+metadata:+ name: my-infisical-auth+spec:+ infisicalConnectionRef:+ name: my-infisical-connection+ namespace: defaultmethod: ldapldap:identityIdRef:@@ -287,8 +510,24 @@ Only define **one** authentication method per resource. Note that `spec.method`name: ldap-credentialsnamespace: defaultkey: password- ```-</Accordion>+```++The referenced Kubernetes secret must contain `identityId`, `username`, and `password` keys:++```bash+kubectl create secret generic ldap-credentials \+ --from-literal=identityId="<your-machine-identity-id>" \+ --from-literal=username="<your-ldap-username>" \+ --from-literal=password="<your-ldap-password>"+```+ </Accordion>+</AccordionGroup>++Apply the resource:++```bash+kubectl apply -f infisical-auth.yaml+```## Troubleshootingdiff --git a/docs/integrations/platforms/kubernetes/infisical-connection-crd.mdx b/docs/integrations/platforms/kubernetes/infisical-connection-crd.mdxindex a7ea9b1c58..a713991fc0 100644--- a/docs/integrations/platforms/kubernetes/infisical-connection-crd.mdx+++ b/docs/integrations/platforms/kubernetes/infisical-connection-crd.mdx@@ -4,10 +4,6 @@ title: "Using the InfisicalConnection CRD"description: "Learn how to configure the InfisicalConnection CRD to define how the operator connects to your Infisical instance."----<Info>- This CRD is part of the **v1beta1** API and is only used with v1beta1 secret resources (`InfisicalStaticSecret`).-</Info>-## OverviewThe **InfisicalConnection** CRD defines how the Infisical Operator connects to your Infisical instance. It holds the instance address and optional TLS configuration. Once created, it can be referenced by multiple `InfisicalAuth` so you only need to define connection details once per Infisical instance.@@ -25,7 +21,8 @@ kind: InfisicalConnectionmetadata:name: my-infisical-connectionspec:- address: https://app.infisical.com/api+ address: https://infisical.domain.com+ # If you are using cloud instances, this is not necessarytls:caCertificate:name: custom-ca-certificate@@ -44,7 +41,7 @@ kubectl apply -f infisical-connection.yaml<Accordion title="address">The URL of the Infisical API to connect to.- When `address` is not defined, the operator connects to the address defined in the environment variable `INFISICAL_HOST_API`.+ When `address` is not defined, the operator connects to the address defined by the Helm value `hostAPI`.For self-hosted instances, set this to `https://your-self-hosted-instance.com/api`.</Accordion>@@ -57,7 +54,7 @@ kubectl apply -f infisical-connection.yamlA reference to a Kubernetes secret containing a CA certificate for SSL/TLS connections.- `name`: Name of the Kubernetes secret containing the CA certificate.- - `namespace`: Namespace of the Kubernetes secret.+ - `namespace`: Namespace of the Kubernetes secret containing the CA certificate.- `key`: The key within the secret that holds the CA certificate value.```yamldiff --git a/docs/integrations/platforms/kubernetes/infisical-dynamic-secret-crd.mdx b/docs/integrations/platforms/kubernetes/infisical-dynamic-secret-crd.mdxindex a66abf2296..dad4884fed 100644--- a/docs/integrations/platforms/kubernetes/infisical-dynamic-secret-crd.mdx+++ b/docs/integrations/platforms/kubernetes/infisical-dynamic-secret-crd.mdx@@ -4,12 +4,6 @@ title: "Using the InfisicalDynamicSecret CRD"description: "Learn how to generate dynamic secret leases in Infisical and sync them to your Kubernetes cluster."----<Warning>- The `InfisicalDynamicSecret` CRD currently uses the **v1alpha1** API version. A v1beta1 version using the new- [InfisicalConnection](/integrations/platforms/kubernetes/infisical-connection-crd) and [InfisicalAuth](/integrations/platforms/kubernetes/infisical-auth-crd)- pattern is coming soon. The v1alpha1 version will be deprecated once the v1beta1 replacement is available.-</Warning>-## OverviewThe **InfisicalDynamicSecret** CRD allows you to easily create and manage dynamic secret leases in Infisical and automatically sync them to your Kubernetes cluster as native **Kubernetes Secret** resources.diff --git a/docs/integrations/platforms/kubernetes/infisical-push-secret-crd.mdx b/docs/integrations/platforms/kubernetes/infisical-push-secret-crd.mdxindex 95d03682e7..d15611d73d 100644--- a/docs/integrations/platforms/kubernetes/infisical-push-secret-crd.mdx+++ b/docs/integrations/platforms/kubernetes/infisical-push-secret-crd.mdx@@ -4,14 +4,6 @@ title: "Using the InfisicalPushSecret CRD"description: "Learn how to use the InfisicalPushSecret CRD to push and manage secrets in Infisical."----import KubernetesOperatorTemplatingHelpers from "/snippets/kubernetes-operator-templating-helpers.mdx";--<Warning>- The `InfisicalPushSecret` CRD currently uses the **v1alpha1** API version. A v1beta1 version using the new- [InfisicalConnection](/integrations/platforms/kubernetes/infisical-connection-crd) and [InfisicalAuth](/integrations/platforms/kubernetes/infisical-auth-crd)- pattern is coming soon. The v1alpha1 version will be deprecated once the v1beta1 replacement is available.-</Warning>-## OverviewThe **InfisicalPushSecret** CRD allows you to create secrets in your Kubernetes cluster and push them to Infisical.@@ -528,7 +520,7 @@ Using Go templates, you can format, combine, and create new key-value pairs of sTo help transform your config map data further, the operator provides a set of built-in functions that you can use in your templates.- <KubernetesOperatorTemplatingHelpers />+ For the full list of built-in template helper functions and usage examples, see [Kubernetes Operator templating](/integrations/platforms/kubernetes/overview#templating).</Accordion>## Using generators to push secretsdiff --git a/docs/integrations/platforms/kubernetes/infisical-secret-crd.mdx b/docs/integrations/platforms/kubernetes/infisical-secret-crd.mdxindex 3e3677168f..8092203421 100644--- a/docs/integrations/platforms/kubernetes/infisical-secret-crd.mdx+++ b/docs/integrations/platforms/kubernetes/infisical-secret-crd.mdx@@ -7,9 +7,9 @@ description: "Learn how to use the InfisicalSecret CRD to fetch secrets from Infimport KubernetesOperatorTemplatingHelpers from "/snippets/kubernetes-operator-templating-helpers.mdx";<Warning>- The `InfisicalSecret` CRD (v1alpha1) is deprecated and will be removed in a future release.+ The `InfisicalSecret` CRD is deprecated and will be removed in a future release.For new installations, use [InfisicalStaticSecret](/integrations/platforms/kubernetes/infisical-static-secret-crd) (v1beta1) instead.- See the [migration guide](/integrations/platforms/kubernetes/overview#migrating-from-v1alpha1-to-v1beta1).+ See the [migration guide](/integrations/platforms/kubernetes/overview#migrating-from-v1alpha1-to-v1beta1) for further details.</Warning>Once you have installed the operator to your cluster, you'll need to create a `InfisicalSecret` custom resource definition (CRD).diff --git a/docs/integrations/platforms/kubernetes/infisical-static-secret-crd.mdx b/docs/integrations/platforms/kubernetes/infisical-static-secret-crd.mdxindex ec2426a108..57a7a4bd6d 100644--- a/docs/integrations/platforms/kubernetes/infisical-static-secret-crd.mdx+++ b/docs/integrations/platforms/kubernetes/infisical-static-secret-crd.mdx@@ -4,7 +4,7 @@ title: "Using the InfisicalStaticSecret CRD"description: "Learn how to sync secrets from Infisical and store them as native Kubernetes secret resources using the v1beta1 InfisicalStaticSecret CRD."----import KubernetesOperatorTemplating from "/snippets/kubernetes-operator-templating.mdx";+import KubernetesOperatorTemplating from "/snippets/kubernetes-operator-v1beta1-templating.mdx";The `InfisicalStaticSecret` CRD syncs secrets from Infisical into your Kubernetes cluster as native Kubernetes Secrets or ConfigMaps.It replaces the v1alpha1 `InfisicalSecret` CRD with a cleaner design: authentication and connection details are defined as separate reusable resources ([InfisicalAuth](/integrations/platforms/kubernetes/infisical-auth-crd) and [InfisicalConnection](/integrations/platforms/kubernetes/infisical-connection-crd)) instead of inline blocks.@@ -52,10 +52,10 @@ spec:<Accordion title="infisicalAuthRef">A reference to the `InfisicalAuth` resource that defines how to authenticate with Infisical. The connection to the Infisical instance is resolved through the `InfisicalAuth` resource's `infisicalConnectionRef` field.- | Field | Type | Required | Description |- | ----------- | ------ | -------- | ----------------------------------------------------- |- | `name` | string | Yes | The name of the `InfisicalAuth` resource. |- | `namespace` | string | Yes | The namespace of the `InfisicalAuth` resource. |+ | Field | Required | Description |+ | ----------- | -------- | ----------------------------------------------------- |+ | `name` | Yes | The name of the `InfisicalAuth` resource. |+ | `namespace` | Yes | The namespace of the `InfisicalAuth` resource. |See the [InfisicalAuth CRD](/integrations/platforms/kubernetes/infisical-auth-crd) documentation for details.</Accordion>@@ -63,10 +63,10 @@ spec:<Accordion title="syncOptions">Controls the synchronization behavior.- | Field | Type | Required | Description |- | ----------------- | ------ | -------- | --------------------------------------------------------------------------- |- | `refreshInterval` | string | Yes | How often to resync (e.g. `60s`, `5m`, `1h`). |- | `instantUpdates` | bool | No | When `true`, the operator receives real-time push updates from Infisical. Enterprise feature. |+ | Field | Required | Description |+ | ----------------- | -------- | --------------------------------------------------------------------------- |+ | `refreshInterval` | Yes | How often to resync (e.g. `60s`, `5m`, `1h`). |+ | `instantUpdates` | No | When `true`, the operator receives real-time push updates from Infisical. Please note that this is an Enterprise feature. |</Accordion><Accordion title="sources">@@ -74,13 +74,13 @@ spec:When multiple sources produce a secret with the same key, the **first occurrence wins** — sources listed earlier in the array take precedence over later ones. Direct secrets always take precedence over imported secrets, regardless of source order.- | Field | Type | Required | Description |- | ------------------ | -------- | -------- | ------------------------------------------------------------- |- | `projectId` | string | Yes | The Infisical project ID. |- | `environmentSlug` | string | Yes | The environment slug (e.g. `dev`, `staging`, `prod`). |- | `secretPath` | string | Yes | The path to the secrets. Root is `/`. |- | `tagSlugs` | string[] | No | Filter secrets by tag slugs. |- | `recursive` | bool | No | Whether to recursively fetch secrets from sub-folders. Defaults to `false`. |+ | Field | Required | Description |+ | ------------------ | -------- | ------------------------------------------------------------- |+ | `projectId` | Yes | The Infisical project ID. |+ | `environmentSlug` | Yes | The environment slug (e.g. `dev`, `staging`, `prod`). |+ | `secretPath` | Yes | The path to the secrets. Root is `/`. |+ | `tagSlugs` | No | Filter secrets by tag slugs. |+ | `recursive` | No | Whether to recursively fetch secrets from sub-folders. Defaults to `false`. |```yamlsources:@@ -99,15 +99,15 @@ spec:<Accordion title="targets">An array of Kubernetes Secrets or ConfigMaps to create/update with the fetched secrets.- | Field | Type | Required | Description |- | ---------------- | --------------- | -------- | --------------------------------------------------------------------------- |- | `name` | string | Yes | Name of the managed Kubernetes Secret or ConfigMap. |- | `namespace` | string | Yes | Namespace of the managed Kubernetes Secret or ConfigMap. |- | `kind` | string | Yes | The type of resource to create. Must be `Secret` or `ConfigMap`. |- | `secretType` | string | No | Override the default `Opaque` secret type. Only applies when `kind: Secret`. When using a typed secret (e.g. `kubernetes.io/tls`, `kubernetes.io/dockerconfigjson`), you must use a `template` to produce the keys that Kubernetes requires for that type, otherwise the API server will reject the resource. |- | `creationPolicy` | string | Yes | `Owner` sets a Kubernetes owner reference so the managed resource is automatically deleted by the garbage collector when the `InfisicalStaticSecret` is removed. `Orphan` leaves the managed resource in place. |- | `template` | SecretTemplate | No | Optional templating configuration (see [Templating](#templating) below). |- | `metadata` | object | No | Custom `labels` and `annotations` to set on the managed resource. When set, these values are used as-is and **not** merged with the `InfisicalStaticSecret` CRD metadata. |+ | Field | Required | Description |+ | ---------------- | -------- | --------------------------------------------------------------------------- |+ | `name` | Yes | Name of the managed Kubernetes Secret or ConfigMap. |+ | `namespace` | Yes | Namespace of the managed Kubernetes Secret or ConfigMap. |+ | `kind` | Yes | The type of resource to create. Must be `Secret` or `ConfigMap`. |+ | `secretType` | No | Override the default `Opaque` secret type. Only applies when `kind: Secret`. When using a typed secret (e.g. `kubernetes.io/tls`, `kubernetes.io/dockerconfigjson`), you must use a `template` to produce the keys that Kubernetes requires for that type, otherwise the API server will reject the resource. |+ | `creationPolicy` | Yes | `Owner` sets a Kubernetes owner reference so the managed resource is automatically deleted by the garbage collector when the `InfisicalStaticSecret` is removed. `Orphan` leaves the managed resource in place. |+ | `template` | No | Optional templating configuration (see [Templating](#templating) below). |+ | `metadata` | No | Custom `labels` and `annotations` to set on the managed resource. When set, these values are used as-is and **not** merged with the `InfisicalStaticSecret` CRD metadata. |<Warning>ConfigMaps are intended for non-sensitive data only. Use `kind: Secret` for sensitive values.@@ -135,9 +135,137 @@ spec:## Metadata propagation-Labels and annotations on the `InfisicalStaticSecret` resource are automatically propagated to all managed Secrets and ConfigMaps that don't have explicit `metadata` set on the target. This allows you to set labels and annotations once on the CRD and have them applied to all managed resources.+The operator provides flexible options for managing labels and annotations on managed Kubernetes Secrets and ConfigMaps.-When a target has explicit `metadata` set, only those labels and annotations are used instead of inheriting from the CRD.+<AccordionGroup>+ <Accordion title="Default behavior">+ By default, the operator merges labels and annotations from the `InfisicalStaticSecret` resource into each managed Secret or ConfigMap that does not define target-level `metadata`.++ Conflict behavior:++ - Existing labels and annotations that were not previously managed by the operator are preserved.+ - Labels and annotations from the `InfisicalStaticSecret` resource take precedence when the same key already exists on the managed resource.+ - Labels and annotations previously propagated by the operator are removed if they are removed from the `InfisicalStaticSecret` resource.+ - Kubernetes system annotations and Infisical operator tracking annotations are preserved.++ ```yaml+ apiVersion: secrets.infisical.com/v1beta1+ kind: InfisicalStaticSecret+ metadata:+ name: my-static-secret+ labels:+ label-to-be-passed-to-managed-secret: sample-value+ annotations:+ example.com/annotation-to-be-passed-to-managed-secret: "sample-value"+ spec:+ infisicalAuthRef:+ name: my-infisical-auth+ namespace: default+ sources:+ - projectId: <your-project-id>+ environmentSlug: dev+ secretPath: /+ targets:+ - name: managed-secret+ namespace: default+ kind: Secret+ creationPolicy: Owner+ ```++ This creates a managed Secret with the inherited metadata:++ ```yaml+ apiVersion: v1+ kind: Secret+ metadata:+ name: managed-secret+ namespace: default+ labels:+ label-to-be-passed-to-managed-secret: sample-value+ annotations:+ example.com/annotation-to-be-passed-to-managed-secret: sample-value+ secrets.infisical.com/version: W/"3f1-ZyOSsrCLGSkAhhCkY2USPu2ivRw"+ type: Opaque+ data: ...+ ```+ </Accordion>++ <Accordion title="Custom target metadata">+ When you specify `metadata` on a target, those labels and annotations are used exclusively for that managed resource:++ - Target `metadata.labels` replaces the managed resource's labels.+ - Target `metadata.annotations` replaces user-defined annotations on the managed resource.+ - Kubernetes system annotations and the Infisical version annotation are preserved.+ - Labels and annotations from the `InfisicalStaticSecret` resource are not propagated to that target.+ - This lets you keep CRD-specific metadata separate from managed resource metadata.++ <Tip>+ To prevent any propagation while using target `metadata`, pass empty objects for labels and/or annotations:++ ```yaml+ targets:+ - name: managed-secret+ namespace: default+ kind: Secret+ creationPolicy: Owner+ metadata:+ labels: {}+ annotations: {}+ ```+ </Tip>++ ```yaml+ apiVersion: secrets.infisical.com/v1beta1+ kind: InfisicalStaticSecret+ metadata:+ name: my-static-secret+ labels:+ managed-by: infisical-operator+ annotations:+ example.com/cr-specific: "metadata"+ spec:+ infisicalAuthRef:+ name: my-infisical-auth+ namespace: default+ sources:+ - projectId: <your-project-id>+ environmentSlug: prod+ secretPath: /+ targets:+ - name: managed-secret-with-custom-metadata+ namespace: default+ kind: Secret+ creationPolicy: Owner+ metadata:+ labels:+ app: my-application+ environment: production+ tier: backend+ annotations:+ secret.example.com/description: "Production database credentials"+ secret.example.com/owner: "platform-team"+ ```++ This creates a managed Secret with only the target metadata:++ ```yaml+ apiVersion: v1+ kind: Secret+ metadata:+ name: managed-secret-with-custom-metadata+ namespace: default+ labels:+ app: my-application+ environment: production+ tier: backend+ annotations:+ secret.example.com/description: "Production database credentials"+ secret.example.com/owner: "platform-team"+ type: Opaque+ data: ...+ ```+ </Accordion>+</AccordionGroup>## Applying the CRD@@ -218,15 +346,232 @@ The managed Kubernetes Secret or ConfigMap works like any other native resource.## Automatic redeployment-Add the following annotation to any Deployment, StatefulSet, or DaemonSet to trigger a rolling restart when the managed secret updates:+Pods that consume a managed Secret or ConfigMap don't reload automatically when the underlying data changes. Without a restart, the workload may continue using stale values, especially when secrets are injected as environment variables.++To trigger a rolling restart when the managed resource updates, add the following annotation to the Deployment, StatefulSet, or DaemonSet that consumes it:```yaml-metadata:- annotations:- secrets.infisical.com/auto-reload: "true"+secrets.infisical.com/auto-reload: "true"```-The operator detects workloads that consume the managed secret (via `envFrom`, `env`, or `volumes`) and automatically triggers a rolling restart when the secret data changes.+<AccordionGroup>+ <Accordion title="Deployment example">+ <Tabs>+ <Tab title="Secret">+ ```yaml+ apiVersion: apps/v1+ kind: Deployment+ metadata:+ name: nginx-deployment+ labels:+ app: nginx+ annotations:+ secrets.infisical.com/auto-reload: "true"+ spec:+ replicas: 1+ selector:+ matchLabels:+ app: nginx+ template:+ metadata:+ labels:+ app: nginx+ spec:+ containers:+ - name: nginx+ image: nginx:1.14.2+ envFrom:+ - secretRef:+ name: managed-secret+ ports:+ - containerPort: 80+ ```+ </Tab>+ <Tab title="ConfigMap">+ ```yaml+ apiVersion: apps/v1+ kind: Deployment+ metadata:+ name: app-deployment+ labels:+ app: app+ annotations:+ secrets.infisical.com/auto-reload: "true"+ spec:+ replicas: 1+ selector:+ matchLabels:+ app: app+ template:+ metadata:+ labels:+ app: app+ spec:+ containers:+ - name: app+ image: mycompany/app:latest+ envFrom:+ - configMapRef:+ name: managed-configmap+ ports:+ - containerPort: 80+ ```+ </Tab>+ </Tabs>+ </Accordion>++ <Accordion title="DaemonSet example">+ <Tabs>+ <Tab title="Secret">+ ```yaml+ apiVersion: apps/v1+ kind: DaemonSet+ metadata:+ name: log-agent+ labels:+ app: log-agent+ annotations:+ secrets.infisical.com/auto-reload: "true"+ spec:+ selector:+ matchLabels:+ app: log-agent+ template:+ metadata:+ labels:+ app: log-agent+ spec:+ containers:+ - name: log-agent+ image: mycompany/log-agent:latest+ envFrom:+ - secretRef:+ name: managed-secret+ volumeMounts:+ - name: secrets-volume+ mountPath: /etc/secrets+ readOnly: true+ volumes:+ - name: secrets-volume+ secret:+ secretName: managed-secret+ ```+ </Tab>+ <Tab title="ConfigMap">+ ```yaml+ apiVersion: apps/v1+ kind: DaemonSet+ metadata:+ name: log-agent+ labels:+ app: log-agent+ annotations:+ secrets.infisical.com/auto-reload: "true"+ spec:+ selector:+ matchLabels:+ app: log-agent+ template:+ metadata:+ labels:+ app: log-agent+ spec:+ containers:+ - name: log-agent+ image: mycompany/log-agent:latest+ envFrom:+ - configMapRef:+ name: managed-configmap+ volumeMounts:+ - name: config-volume+ mountPath: /etc/config+ readOnly: true+ volumes:+ - name: config-volume+ configMap:+ name: managed-configmap+ ```+ </Tab>+ </Tabs>+ </Accordion>++ <Accordion title="StatefulSet example">+ <Tabs>+ <Tab title="Secret">+ ```yaml+ apiVersion: apps/v1+ kind: StatefulSet+ metadata:+ name: db-worker+ labels:+ app: db-worker+ annotations:+ secrets.infisical.com/auto-reload: "true"+ spec:+ selector:+ matchLabels:+ app: db-worker+ serviceName: "db-worker"+ replicas: 2+ template:+ metadata:+ labels:+ app: db-worker+ spec:+ containers:+ - name: db-worker+ image: mycompany/db-worker:stable+ env:+ - name: DATABASE_PASSWORD+ valueFrom:+ secretKeyRef:+ name: managed-secret+ key: DB_PASSWORD+ ports:+ - containerPort: 5432+ ```+ </Tab>+ <Tab title="ConfigMap">+ ```yaml+ apiVersion: apps/v1+ kind: StatefulSet+ metadata:+ name: db-worker+ labels:+ app: db-worker+ annotations:+ secrets.infisical.com/auto-reload: "true"+ spec:+ selector:+ matchLabels:+ app: db-worker+ serviceName: "db-worker"+ replicas: 2+ template:+ metadata:+ labels:+ app: db-worker+ spec:+ containers:+ - name: db-worker+ image: mycompany/db-worker:stable+ env:+ - name: DATABASE_HOST+ valueFrom:+ configMapKeyRef:+ name: managed-configmap+ key: DATABASE_HOST+ ports:+ - containerPort: 5432+ ```+ </Tab>+ </Tabs>+ </Accordion>+</AccordionGroup>++<Info>+ When a managed Secret or ConfigMap is updated, the operator checks for any Deployments, DaemonSets, or StatefulSets that consume the updated resource and have the `secrets.infisical.com/auto-reload: "true"` annotation. For each matching workload, the operator triggers a rolling restart so the pods pick up the latest values.+</Info>## Troubleshootingdiff --git a/docs/integrations/platforms/kubernetes/overview.mdx b/docs/integrations/platforms/kubernetes/overview.mdxindex 0ebed5a373..b9fba67c1f 100644--- a/docs/integrations/platforms/kubernetes/overview.mdx+++ b/docs/integrations/platforms/kubernetes/overview.mdx@@ -4,7 +4,7 @@ sidebarTitle: "Overview"description: "How to use Infisical to inject, push, and manage secrets within Kubernetes clusters"----import KubernetesOperatorTemplating from "/snippets/kubernetes-operator-templating.mdx";+import KubernetesOperatorTemplating from "/snippets/kubernetes-operator-v1beta1-templating.mdx";The Infisical Operator is a collection of Kubernetes controllers that streamline how secrets are managed between Infisical and your Kubernetes cluster.It provides multiple Custom Resource Definitions (CRDs) which enable you to:@@ -17,9 +17,7 @@ When these CRDs are configured, the Infisical Operator will continuously monitorIt can also automatically reload dependent Deployment resources whenever relevant secrets are updated.<Info>- The operator supports two CRD API versions. **v1beta1** is the recommended version for new installations.- The v1alpha1 `InfisicalSecret` CRD is deprecated in favor of `InfisicalStaticSecret` (v1beta1) and will be removed in a future release — see the [migration guide](#migrating-from-v1alpha1-to-v1beta1) below.- The v1alpha1 `InfisicalPushSecret` and `InfisicalDynamicSecret` CRDs are **not deprecated** and remain the current way to use those features until v1beta1 replacements are available.+ The operator supports two CRD API versions: **v1beta1** and **v1alpha1**. Use **v1beta1** for new installations; **v1alpha1** is legacy and will be deprecated soon.</Info><Note>@@ -196,6 +194,10 @@ controllerManager:| [InfisicalStaticSecret](/integrations/platforms/kubernetes/infisical-static-secret-crd) | Sync secrets from Infisical to a Kubernetes secret. Replaces `InfisicalSecret`. |</Tab><Tab title="v1alpha1">+ <Warning>+ The v1alpha1 CRDs are legacy and are planned for deprecation.+ </Warning>+| CRD | Status | Description || --- | ------ | ----------- || [InfisicalSecret](/integrations/platforms/kubernetes/infisical-secret-crd) | Deprecated | Sync secrets from Infisical to a Kubernetes secret. Use [InfisicalStaticSecret](/integrations/platforms/kubernetes/infisical-static-secret-crd) (v1beta1) instead. See [migration guide](#migrating-from-v1alpha1-to-v1beta1). |@@ -349,7 +351,7 @@ to point to a CA certificate stored in a Kubernetes secret resource.metadata:name: my-infisical-connectionspec:- address: https://app.infisical.com/api+ address: https://infisical.mydomain.comtls:caCertificate:name: custom-ca-certificate@@ -376,55 +378,6 @@ to point to a CA certificate stored in a Kubernetes secret resource.<KubernetesOperatorTemplating />--## Global configuration (v1alpha1 only)--<Warning>- Global configuration via ConfigMap only applies to v1alpha1 CRDs (`InfisicalSecret`, `InfisicalPushSecret`, and `InfisicalDynamicSecret`).- In v1beta1, connection and TLS settings are configured through the [InfisicalConnection](/integrations/platforms/kubernetes/infisical-connection-crd) CRD, which can be shared across multiple resources.-</Warning>--To configure global settings that will apply to all v1alpha1 CRD instances, you can define these configurations in a Kubernetes ConfigMap.-For example, you can configure all CRD instances to fetch secrets from a single backend API without specifying the `hostAPI` parameter for each instance.--### Available global properties--| Property | Description | Default value |-| -------- | --------------------------------------------------------------------------------- | ----------------------------- |-| hostAPI | If `hostAPI` in a CRD instance is left empty, this value will be used | https://app.infisical.com/api |-| tls.caRef.secretName | If `tls.caRef.secretName` in a CRD instance is left empty, this value will be used | - |-| tls.caRef.secretNamespace | If `tls.caRef.secretNamespace` in a CRD instance is left empty, this value will be used | - |-| tls.caRef.key | If `tls.caRef.key` in a CRD instance is left empty, this value will be used | - |--### Applying global configurations--All global configurations must reside in a Kubernetes ConfigMap named `infisical-config` in the namespace `infisical-operator-system`.-To apply global configuration to the operator, copy the following yaml into `infisical-config.yaml` file.--```yaml infisical-config.yaml-apiVersion: v1-kind: Namespace-metadata:- name: infisical-operator-system-----apiVersion: v1-kind: ConfigMap-metadata:- name: infisical-config- namespace: infisical-operator-system-data:- hostAPI: https://example.com/api # <-- global hostAPI- tls.caRef.secretName: custom-ca-certificate # <-- global TLS CA secret name- tls.caRef.secretNamespace: default # <-- global TLS CA secret namespace- tls.caRef.key: ca.crt # <-- global TLS CA secret key-```--Then apply this change via kubectl by running the following--```bash-kubectl apply -f infisical-config.yaml-```-## Migrating from v1alpha1 to v1beta1<Info>@@ -435,11 +388,17 @@ The v1beta1 API introduces a cleaner separation of concerns. Instead of defining### Key changes-| v1alpha1 | v1beta1 | What changed |-| -------- | ------- | ------------ |-| `InfisicalSecret` | `InfisicalStaticSecret` | New CRD that replaces `InfisicalSecret`. Auth and connection are now referenced via `InfisicalAuth` and `InfisicalConnection` instead of inline. |-| Inline `authentication` block | `InfisicalAuth` CRD | Auth config is now a standalone resource, reusable across CRDs. Authenticated credentials are cached and shared by all resources referencing the same `InfisicalAuth`. |-| Inline `hostAPI` / `tls` | `InfisicalConnection` CRD | Connection config is now a standalone resource. |+- **Secret resource:** `InfisicalSecret` -> `InfisicalStaticSecret`++ `InfisicalStaticSecret` replaces the v1alpha1 `InfisicalSecret` CRD. Instead of defining auth and connection settings inline, it references dedicated `InfisicalAuth` and `InfisicalConnection` resources.++- **Authentication:** inline `authentication` -> `InfisicalAuth`++ Authentication config is now defined in a standalone `InfisicalAuth` resource that can be reused across CRDs. Authenticated credentials are cached and shared by all resources referencing the same `InfisicalAuth`.++- **Connection:** inline `hostAPI` / `tls` -> `InfisicalConnection`++ Connection config is now defined in a standalone `InfisicalConnection` resource that can be reused by auth and secret resources.### Migration steps@@ -461,75 +420,11 @@ The v1beta1 API introduces a cleaner separation of concerns. Instead of defining</Step></Steps>-## Troubleshoot operator--If the operator is unable to fetch secrets from the API, it will not affect the managed Kubernetes secret.-It will continue attempting to reconnect to the API indefinitely.-All operator CRDs use the `status.conditions` field to report their current state and any errors encountered.--<Tabs>- <Tab title="v1beta1 (Recommended)">- In v1beta1, check the status of each resource independently: `InfisicalConnection`, `InfisicalAuth`, and `InfisicalStaticSecret`.-- ```bash- # List all v1beta1 resources- $ kubectl get infisicalconnections- $ kubectl get infisicalauths- $ kubectl get infisicalstaticsecrets-- # Inspect a specific resource- $ kubectl describe infisicalstaticsecret my-static-secret- ...- Status:- Conditions:- Last Transition Time: 2025-01-15T10:00:00Z- Message: Secrets synced successfully.- Reason: OK- Status: True- Type: secrets.infisical.com/LastReconcileStatus- Events: <none>- ```-- If your `InfisicalStaticSecret` is not syncing, also verify the `InfisicalConnection` and `InfisicalAuth` resources it references are both in a ready state:- ```bash- $ kubectl describe infisicalconnection my-infisical-connection- $ kubectl describe infisicalauth my-infisical-auth- ```- </Tab>- <Tab title="v1alpha1">- ```bash- $ kubectl get infisicalSecrets- NAME AGE- infisicalsecret-sample 12s-- $ kubectl describe infisicalSecret infisicalsecret-sample- ...- Status:- Conditions:- Last Transition Time: 2022-12-18T04:29:09Z- Message: Infisical controller has located the Infisical token in provided Kubernetes secret- Reason: OK- Status: True- Type: secrets.infisical.com/LoadedInfisicalToken- Last Transition Time: 2022-12-18T04:29:10Z- Message: Failed to update secret because: 400 Bad Request- Reason: Error- Status: False- Type: secrets.infisical.com/ReadyToSyncSecrets- Events: <none>- ```- </Tab>-</Tabs>-## Uninstall OperatorThe managed secret created by the operator will not be deleted when the operator is uninstalled.-<Tabs>- <Tab title="Helm">- Uninstall Infisical Helm repository- ```bash- helm uninstall <release name>- ```- </Tab>-</Tabs>+Uninstall Infisical Helm repository+```bash+ helm uninstall <release name>+```diff --git a/docs/snippets/kubernetes-operator-templating.mdx b/docs/snippets/kubernetes-operator-templating.mdxdeleted file mode 100644index 2c4f02f845..0000000000--- a/docs/snippets/kubernetes-operator-templating.mdx+++ /dev/null@@ -1,30 +0,0 @@-import KubernetesOperatorTemplatingHelpers from "/snippets/kubernetes-operator-templating-helpers.mdx";--## Templating--Use Go templates to transform secrets before storing them in the managed Kubernetes resource. When a template is set, only the keys defined in `template.data` are included in the output.-When no template is set, all fetched secrets are included as-is.--| Field | Type | Required | Description |-| --------------- | ----------------- | -------- | ------------------------------------------------------------- |-| `engineVersion` | string | Yes | The template engine version. Must be `v1`. |-| `data` | map[string]string | Yes | Map of output key names to Go template expressions. |--Each secret is available in the template context as `.SECRET_KEY`, which is an object with two accessors:-- `.Value` — the secret's value.-- `.SecretPath` — the path of the secret in Infisical.--```yaml-targets:- - name: my-app-config- namespace: default- kind: Secret- creationPolicy: Owner- template:- engineVersion: v1- data:- DATABASE_URL: "postgres://{{ .DB_USER.Value }}:{{ .DB_PASS.Value }}@{{ .DB_HOST.Value }}:5432/{{ .DB_NAME.Value }}"- REDIS_URL: "redis://{{ .REDIS_HOST.Value }}:6379"-```--<KubernetesOperatorTemplatingHelpers />diff --git a/docs/snippets/kubernetes-operator-v1alpha1-templating.mdx b/docs/snippets/kubernetes-operator-v1alpha1-templating.mdxnew file mode 100644index 0000000000..0dbd2ffd05--- /dev/null+++ b/docs/snippets/kubernetes-operator-v1alpha1-templating.mdx@@ -0,0 +1,59 @@+import KubernetesOperatorTemplatingHelpers from "/snippets/kubernetes-operator-templating-helpers.mdx";++## Templating++Fetching secrets from Infisical as-is via the operator may not be enough. This is where templating functionality may be helpful.+Using Go templates, you can format, combine, and create new key-value pairs from secrets fetched from Infisical before storing them as Kubernetes Secrets or ConfigMaps.++When a template is set, only the keys defined in `template.data` are included in the output unless `includeAllSecrets` is set to `true`.+When no template is set, all fetched secrets are included as-is.++`includeAllSecrets` controls what secrets are included in your managed resource when using templates.+When set to `true`, all secrets fetched from your Infisical project will be added into your managed Kubernetes resource. Use this option when you want to sync all secrets from Infisical to Kubernetes but template a subset of them.+When set to `false`, only secrets defined in `template.data` will be included in the managed resource. Use this option when you want to sync only a subset of secrets from Infisical to Kubernetes.++Each secret is available in the template context as `.SECRET_KEY`, which is an object with two accessors:++- `.Value`: the secret value.+- `.SecretPath`: the path of the secret in Infisical.++### Example template configuration++```yaml+managedKubeSecretReferences:+ - secretName: managed-secret+ secretNamespace: default+ template:+ includeAllSecrets: true+ data:+ # Create a new secret key using values from other secrets+ NEW_KEY: "{{ .DB_PASSWORD.Value }}"+ # Override an existing secret key with a templated value+ API_URL: "https://api.{{.COMPANY_NAME.Value}}.{{.REGION.Value}}.com"+```++For this example, assume the following secrets exist in your Infisical project:++```bash+DB_PASSWORD="secret123"+COMPANY_NAME="acme"+REGION="us-east-1"+API_URL="old-url"+```++The resulting managed Kubernetes resource will contain:++```bash+# Original secrets from includeAllSecrets: true+DB_PASSWORD="secret123"+COMPANY_NAME="acme"+REGION="us-east-1"++# New and overridden templated secrets+NEW_KEY="secret123"+API_URL="https://api.acme.us-east-1.com"+```++To help transform your secrets further, the operator provides a set of built-in functions that you can use in your templates.++<KubernetesOperatorTemplatingHelpers />diff --git a/docs/snippets/kubernetes-operator-v1beta1-templating.mdx b/docs/snippets/kubernetes-operator-v1beta1-templating.mdxnew file mode 100644index 0000000000..cf40cacb3e--- /dev/null+++ b/docs/snippets/kubernetes-operator-v1beta1-templating.mdx@@ -0,0 +1,49 @@+import KubernetesOperatorTemplatingHelpers from "/snippets/kubernetes-operator-templating-helpers.mdx";++## Templating++Fetching secrets from Infisical as-is via the operator may not be enough. This is where templating functionality may be helpful.+Using Go templates, you can format, combine, and create new key-value pairs from secrets fetched from Infisical before storing them as Kubernetes Secrets or ConfigMaps.++When a template is set, only the keys defined in `template.data` are included in the output.+When no template is set, all fetched secrets are included as-is.++Each secret is available in the template context as `.SECRET_KEY`, which is an object with two accessors:++- `.Value`: the secret value.+- `.SecretPath`: the path of the secret in Infisical.++### Key/value template map++```yaml+targets:+ - name: my-app-config+ namespace: default+ kind: Secret+ creationPolicy: Owner+ template:+ engineVersion: v1+ data:+ DSN: "{{ .SECRET.Value }}.namespace:{{ .SECRET2.Value }}"+ ANOTHER_ONE: "{{ .SECRET3.Value }}"+```++### Bulk string template with a loop++```yaml+targets:+ - name: all-secrets+ namespace: default+ kind: Secret+ creationPolicy: Owner+ template:+ engineVersion: v1+ data: |+ {{- range $key, $secret := . }}+ {{ $key }}: "{{ $secret.Value }}"+ {{- end }}+```++To help transform your secrets further, the operator provides a set of built-in functions that you can use in your templates.++<KubernetesOperatorTemplatingHelpers />