v1alpha1

ResourceCanary API

The practical reference for recommendation, rollout, safety, analysis, persistence, and status fields.

Target reference

targetRef:
  apiVersion: apps/v1
  kind: Deployment
  name: checkout
API versionKinds
apps/v1Deployment, StatefulSet
argoproj.io/v1alpha1Rollout

Recommendation

recommendation:
  source: Manual | VPA
  manual:
    containers:
      - name: app
        resources:
          requests: { cpu: 500m, memory: 768Mi }
          limits: { cpu: "1", memory: 1Gi }
  vpa:
    name: checkout-vpa
    selection: Target | LowerBound | UpperBound

Manual requests must not exceed their corresponding limits. VPA recommendations provide requests; the refresh policy can derive limits.

VPA refresh and limit policy

refreshPolicy:
  mode: ManualCapture | ThresholdBased
  minimumCpuDeltaPercent: 10
  minimumMemoryDeltaPercent: 10
  minimumTimeSinceLastValidation: 168h
  defaultCpuLimitPercentageBump: 0
  defaultMemoryLimitPercentageBump: 20
  forceLimitResizing: false

ThresholdBased requires the minimum time to have elapsed and at least one container's CPU or memory delta to meet its threshold. Deltas may increase or decrease.

A limit bump of 0 makes limit equal request; 20 makes it 120% of request. With forceLimitResizing: false, an existing limit is preserved whenever it already accommodates the new request. These rules only apply to VPA recommendations.

Rollout

rollout:
  initialDelay: 5m
  maxConcurrentResizes: 2
  podSelection: { strategy: StableHash }
  steps:
    - { percent: 10, pause: 10m }
    - { percent: 50, pause: 30m }
    - { percent: 100, pause: 1h }

Steps must be strictly increasing and end at exactly 100%. initialDelay measures pod age since its latest Ready transition.

Safety

safety:
  minReadyPods: 3
  requireAllTargetPodsReadyBeforeStarting: true
  stopIfTargetWorkloadUpdating: true
  allowSingleReplicaWorkload: false

CPU throttling analysis

analysis:
  cpuThrottling:
    enabled: true
    thresholdFraction: 0.05
    window: 5m
    mode: AnyPod | PercentageOfPods | Average
    percentageOfPodsThreshold: 30
    onMetricsUnavailable: Pass | Fail
    prometheus:
      url: http://prometheus.monitoring.svc:9090

The configured pause is a minimum. Analysis waits until every selected pod has spent at least one full analysis window at its resized target.

Persistence

persistence:
  mode: AdmissionOnNextPodTemplateChange | Disabled
  gitOps:
    enabled: false

Disabled validates live pods but never propagates the result to the workload template. The terminal phase is ValidatedWithoutPersistence.

Selected status fields

FieldPurpose
status.phaseHigh-level lifecycle state.
recommendation.currentRevisionHash of the current candidate.
recommendation.validatedRevisionRevision proven across the fleet.
validation.baselineResourcesResources being changed from.
validation.candidateResourcesResources being validated.
validation.podsPer-pod resize lifecycle.
recommendation.failedRevisionsSticky deny-list of failed hashes.
conditionsKubernetes-style decision details.

For every field and metric, see the repository's full source reference.