Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

docs(kubernetes-operator): move InfisicalStaticSecret metrics to the CRD page

DimitrisStaratzisd5a960ef890c
diff --git a/docs/integrations/platforms/kubernetes/infisical-static-secret-crd.mdx b/docs/integrations/platforms/kubernetes/infisical-static-secret-crd.mdx
index 73a278f7d6..5bc6fedcf1 100644
--- a/docs/integrations/platforms/kubernetes/infisical-static-secret-crd.mdx
+++ b/docs/integrations/platforms/kubernetes/infisical-static-secret-crd.mdx
@@ -1054,6 +1054,40 @@ 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>
+## Metrics
+
+The operator exposes Prometheus metrics about each `InfisicalStaticSecret`, which you can use to count your resources, alert when a sync fails, and track how workloads use automatic redeployment. To collect the metrics, [enable the ServiceMonitor](/integrations/platforms/kubernetes/overview#metrics-and-prometheus).
+
+- `infisical_static_secrets` - One series per resource with the value `1`, labeled with `status` (`synced`, `failed`, or `unknown` before the first sync) and `instant_updates` (`true` or `false`)
+- `infisical_static_secret_refresh_interval_seconds` - The resource's `refreshInterval`, in seconds
+- `infisical_static_secret_auto_reload_workloads` - Number of workloads with [automatic redeployment](#automatic-redeployment) enabled that consume the resource's managed Secret or ConfigMap
+- `infisical_static_secret_workload_redeploys_total` - Number of workloads that automatic redeployment has restarted
+
+Each of these metrics has `namespace` and `name` labels that identify the `InfisicalStaticSecret`.
+
+<Note>
+ These metrics require operator v0.11.14 or later.
+</Note>
+
+### Example queries
+
+```promql
+# InfisicalStaticSecret resources
+count(infisical_static_secrets)
+
+# InfisicalStaticSecret resources whose last sync failed (use as an alert expression)
+infisical_static_secrets{status="failed"}
+
+# Average refresh interval (seconds)
+avg(infisical_static_secret_refresh_interval_seconds)
+
+# InfisicalStaticSecret resources with automatic redeployment enabled on at least one workload
+count(infisical_static_secret_auto_reload_workloads > 0)
+
+# Workloads restarted by automatic redeployment in the last 24 hours
+sum(increase(infisical_static_secret_workload_redeploys_total[24h]))
+```
+
## 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.
diff --git a/docs/integrations/platforms/kubernetes/overview.mdx b/docs/integrations/platforms/kubernetes/overview.mdx
index fa74dd21a6..790f8c7d1d 100644
--- a/docs/integrations/platforms/kubernetes/overview.mdx
+++ b/docs/integrations/platforms/kubernetes/overview.mdx
@@ -174,17 +174,7 @@ The operator exposes standard controller-runtime metrics. For a complete list of
**v1alpha1 controllers:** `InfisicalSecret`, `InfisicalPushSecret`, `InfisicalDynamicSecret`
-**InfisicalStaticSecret metrics:**
-- `infisical_static_secrets` - One series per resource with the value `1`, labeled with `status` (`synced`, `failed`, or `unknown` before the first sync) and `instant_updates` (`true` or `false`)
-- `infisical_static_secret_refresh_interval_seconds` - The resource's `refreshInterval`, in seconds
-- `infisical_static_secret_auto_reload_workloads` - Number of workloads with [automatic redeployment](/integrations/platforms/kubernetes/infisical-static-secret-crd#automatic-redeployment) enabled that consume the resource's managed Secret or ConfigMap
-- `infisical_static_secret_workload_redeploys_total` - Number of workloads that automatic redeployment has restarted
-
-Each of these metrics has `namespace` and `name` labels that identify the `InfisicalStaticSecret`.
-
-<Note>
- The InfisicalStaticSecret metrics require operator v0.11.14 or later.
-</Note>
+For metrics about each InfisicalStaticSecret resource, such as its sync status, see [InfisicalStaticSecret metrics](/integrations/platforms/kubernetes/infisical-static-secret-crd#metrics).
### Example Prometheus setup
@@ -237,21 +227,6 @@ histogram_quantile(0.99, rate(controller_runtime_reconcile_time_seconds_bucket[5
# Memory usage (MB)
process_resident_memory_bytes / 1024 / 1024
-
-# InfisicalStaticSecret resources
-count(infisical_static_secrets)
-
-# InfisicalStaticSecret resources whose last sync failed (use as an alert expression)
-infisical_static_secrets{status="failed"}
-
-# Average refresh interval (seconds)
-avg(infisical_static_secret_refresh_interval_seconds)
-
-# InfisicalStaticSecret resources with automatic redeployment enabled on at least one workload
-count(infisical_static_secret_auto_reload_workloads > 0)
-
-# Workloads restarted by automatic redeployment in the last 24 hours
-sum(increase(infisical_static_secret_workload_redeploys_total[24h]))
```
## General configuration