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
migration dics
varonixeb817ae9e012
diff --git a/docs/integrations/platforms/kubernetes/infisical-secret-crd.mdx b/docs/integrations/platforms/kubernetes/infisical-secret-crd.mdxindex b4cc7d58af..ce99cfe25f 100644--- a/docs/integrations/platforms/kubernetes/infisical-secret-crd.mdx+++ b/docs/integrations/platforms/kubernetes/infisical-secret-crd.mdx@@ -13,6 +13,7 @@ import KubernetesAuthGatewayReviewer from "/snippets/documentation/platform/idenThe `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) for further details.+ To move the Secrets and ConfigMaps that an `InfisicalSecret` manages to an `InfisicalStaticSecret` without deleting them, see [Migrating from InfisicalSecret](/integrations/platforms/kubernetes/infisical-static-secret-crd#migrating-from-infisicalsecret).</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 c78882a19c..bf880a328f 100644--- a/docs/integrations/platforms/kubernetes/infisical-static-secret-crd.mdx+++ b/docs/integrations/platforms/kubernetes/infisical-static-secret-crd.mdx@@ -1054,6 +1054,53 @@ secrets.infisical.com/auto-reload: "true"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>+## Migrating from InfisicalSecret++If you sync secrets with the v1alpha1 [InfisicalSecret CRD](/integrations/platforms/kubernetes/infisical-secret-crd), an `InfisicalStaticSecret` can take over the Secrets and ConfigMaps that the `InfisicalSecret` manages. The operator doesn't delete or recreate the Secrets and ConfigMaps during the migration.++The `InfisicalStaticSecret` spec is different from the `InfisicalSecret` spec:++- It authenticates through an [InfisicalAuth](/integrations/platforms/kubernetes/infisical-auth-crd) resource, which connects to Infisical through an [InfisicalConnection](/integrations/platforms/kubernetes/infisical-connection-crd) resource+- Its templates use the [v1 template syntax](#templating), which has no `includeAllSecrets` option++<Steps>+ <Step>+ Upgrade the operator to v0.11.12 or later. Earlier versions can't take over Secrets and ConfigMaps from an `InfisicalSecret`.+ </Step>+ <Step>+ Create an `InfisicalStaticSecret` in the same namespace as the `InfisicalSecret`. Add a target for each Secret and ConfigMap that the `InfisicalSecret` manages, with the same name, namespace, kind, and `creationPolicy`.++ <Note>+ If a workload has the [auto-reload annotation](#automatic-redeployment), the workload can restart one time during the migration.+ </Note>+ </Step>+ <Step>+ When the `SYNCED` column shows `True` for the `InfisicalStaticSecret`, delete the `InfisicalSecret`:++ ```bash+ kubectl get infisicalstaticsecret <static-secret-name> -n <namespace>+ kubectl delete infisicalsecret <infisical-secret-name> -n <namespace>+ ```++ The Secrets and ConfigMaps stay in place, and the `InfisicalStaticSecret` manages them from now on.++ <Warning>+ Don't delete the `InfisicalSecret` before `SYNCED` shows `True`. If you do, Kubernetes can delete the Secrets and ConfigMaps, and the operator creates them again only at the next `refreshInterval`.+ </Warning>+ </Step>+</Steps>++### How the migration works++If an `InfisicalStaticSecret` target has the same name, namespace, and kind as a Secret or ConfigMap that an `InfisicalSecret` owns, the operator removes the `InfisicalSecret` [owner reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/owners-dependents/) at the next sync. After that, deleting the `InfisicalSecret` doesn't delete the Secret or ConfigMap. What happens next depends on the target's `creationPolicy`:++- `Owner`: the `InfisicalStaticSecret` becomes the new owner of the Secret or ConfigMap+- `Orphan`: the Secret or ConfigMap stays unowned++An `InfisicalStaticSecret` can only own a Secret or ConfigMap in its own namespace. If the operator can't make the `InfisicalStaticSecret` the owner, the Secret or ConfigMap stays unowned, and the operator still syncs the data to it.++The operator changes the owner and writes the data in the same update, so when `SYNCED` shows `True`, the migration is complete.+## TroubleshootingYou can check the status of your `InfisicalStaticSecret` resource by inspecting its conditions: