Docs
Wave Diagnosis
CRDs

Wave Diagnosis CRDs

This kind configures Wave Diagnosis tasks in CRD Mode. It covers four features: memory leak detection, PV capacity forecasting, unused PV cleanup, and Pod/Container Failures.

WaveDiagnosisConfig

WaveDiagnosisConfig tunes the Wave Diagnosis tasks — memory leak detection, PV capacity forecasting, unused PV cleanup, and Pod/Container Failures — through four independent sub-sections. Each sub-section can be set or omitted independently; omitting a sub-section reverts that task's settings to its built-in defaults (see Notes for what each default is).

Scope: cluster-scoped — no metadata.namespace required.

apiVersion: wavek8s.com/v1alpha1
kind: WaveDiagnosisConfig
metadata:
  name: diagnosis-config
spec:
  # Flag containers whose memory utilization reaches 90% of their limit.
  # Omit to use the built-in default of 95%.
  memoryAnomaly:
    oomkillUtilization: 90.0
    # Per-container cooldown between OOM-kill risk events. Omit for 10 minutes.
    oomkillCooldownMinutes: 30
 
  # Monitor specific PVCs for capacity forecasting.
  # Omit the entire sub-section to stop forecasting all PVCs.
  pvForecast:
    enabledPvcs:
      - namespace: prod
        pvcName: data-pvc
      - namespace: prod
        pvcName: logs-pvc
 
  # Automatically delete unused PVs (PVs with no bound PVC).
  # Omit the entire sub-section to disable cleanup (same as enabled: false).
  pvCleanup:
    enabled: true
 
  # Pod/Container Failures detection is zero-config. The only tunable is the
  # exclusion set — listed workloads are skipped by the detector.
  podContainerFailures:
    excludedWorkloads:
      - kind: Deployment
        namespace: dev
        name: flaky-integration-test

memoryAnomaly.oomkillCooldownMinutes and the whole podContainerFailures sub-section were added in Wave 3.4.0. The memoryAnomaly.oomkillUtilization default also changed in 3.4.0 — from 85.0 evaluated against average utilization to 95.0 evaluated against instantaneous utilization.

Spec fields

FieldTypeRequiredDefaultDescription
memoryAnomalyobjectNoConfiguration for memory leak detection and OOM-kill risk. Omit to use built-in defaults (task still runs at the 95% threshold).
memoryAnomaly.oomkillUtilizationnumberNo95.0OOM-kill memory-utilization threshold as a percentage (0–100). A container is flagged when its instantaneous memory utilization is at or above this value. For example, 90.0 flags containers at ≥ 90% of their memory limit.
memoryAnomaly.oomkillCooldownMinutesintegerNo10Per-container cooldown (in minutes) after an OOM-kill risk event. Raise it to cut repeat notifications for a container that stays near its limit. Set to 0 to disable the cooldown — every metrics push from the agent then logs a risk event.
pvForecastobjectNoConfiguration for PV capacity forecasting. Omit to stop forecasting all PVCs (omitting the whole sub-section stops forecasting for all PVCs).
pvForecast.enabledPvcsarrayNo[]List of PVCs to include in capacity forecasting. Each entry requires namespace and pvcName. An empty list disables forecasting for all PVCs.
pvForecast.enabledPvcs[].namespacestringYes (per item)Namespace of the PVC to monitor.
pvForecast.enabledPvcs[].pvcNamestringYes (per item)Name of the PVC to monitor.
pvCleanupobjectNoConfiguration for automatic unused PV deletion. Omit to disable cleanup (same effect as enabled: false).
pvCleanup.enabledbooleanYes (if pvCleanup present)Whether Wave automatically deletes PVs that have no bound PVC. Set to false to disable cleanup without removing the CR.
podContainerFailuresobjectNoConfiguration for Pod/Container Failures detection. Detection itself is zero-config and always on; this sub-section only carries the exclusion set.
podContainerFailures.excludedWorkloadsarrayNo[]Workloads to skip. Presence in the list excludes the workload from detection; removing an entry puts it back under detection.
podContainerFailures.excludedWorkloads[].kindstringYes (per item)Deployment, StatefulSet, or DaemonSet. Any other value fails validation and reports ValidationFailed in .status.conditions.
podContainerFailures.excludedWorkloads[].namespacestringYes (per item)Namespace of the workload to exclude.
podContainerFailures.excludedWorkloads[].namestringYes (per item)Name of the workload to exclude.
⚠️

Deleting the CR is not the same as turning the tasks off — each task behaves differently on deletion:

  • Memory leak detection always runs; deletion only reverts the OOM-kill threshold to 95% and the cooldown to 10 minutes (cannot be disabled via the CR).
  • PV capacity forecasting stops monitoring all PVCs (equivalent to an empty enabledPvcs list).
  • PV cleanup is disabled (same as pvCleanup.enabled: false).
  • Pod/Container Failures keeps detecting everything — the exclusion set is emptied, so previously excluded workloads are detected again.

To stop a task explicitly, keep the CR and set its sub-section accordingly. To turn a Diagnosis task off entirely, use its environment-variable toggle instead.

Notes

  • Four independent sub-sections. memoryAnomaly, pvForecast, pvCleanup, and podContainerFailures are independently optional. Setting one has no effect on the others.
  • Omitting memoryAnomaly reverts the detection threshold to the built-in default of 95% and the cooldown to 10 minutes. The memory leak detection task always runs — there is no enabled flag for this sub-section. To reduce noise, raise the threshold or lengthen the cooldown; you cannot turn the task off via this CR.
  • Omitting pvForecast stops capacity forecasting for all PVCs (equivalent to an empty enabledPvcs list). Re-apply the CR with the desired PVC list to re-enable forecasting.
  • Omitting pvCleanup disables automatic PV deletion — when no settings row exists for PV cleanup, Wave treats cleanup as enabled: false. Explicitly setting pvCleanup.enabled: false produces the same result.
  • Omitting podContainerFailures leaves detection on with an empty exclusion set — every Deployment, StatefulSet, and DaemonSet is detected.
  • pvForecast.enabledPvcs is whole-replace. On each reconcile, the stored PVC list is replaced by exactly what the CR declares. PVCs absent from the list are no longer forecasted. Include every PVC you want monitored.
  • podContainerFailures.excludedWorkloads is whole-replace in the same way. The stored exclusion set is replaced by exactly what the CR declares on each reconcile.
  • Rollout and DeploymentConfig pods map to Deployment. Wave's push-path workload mapping resolves OpenShift DeploymentConfig and Argo Rollout pods to their owning Deployment, so exclude them with kind: Deployment.
  • oomkillUtilization is a percentage (0–100), not a 0–1 ratio. For example, 90.0 means 90%, not 9000%.