What happened?
Running optiqor analyze on any Helm chart that does not explicitly set replicas or replicaCount produces a spurious idle-workload finding for every workload.
Reproduction steps
1. Create `values.yaml` (see chart fragment below)
2. Run `optiqor analyze ./values.yaml`
3. See `idle-workload` finding for `api` despite replicas never being set
optiqor-cli version
dev (built from source, main branch)
Install method
Built from source
OS and arch
macos
Relevant output
$ optiqor analyze ./values.yaml
────────────────────────────────────────────────────────────────────────
◆ optiqor Helm chart cost optimization · security as a bonus
────────────────────────────────────────────────────────────────────────
Source api/values.yaml
Workloads 1 workload analyzed
Cost 1 optimization
── Cost optimizations ──────────────────────────────────────────────
┌─ LOW · api ────────────────────────────────────────────┐
│ │
│ Workload declared with replicas=0 and no autoscaler │
│ │
│ api ships with replicas=0 and no HPA. In a live │
│ cluster this is the chart pattern that correlates │
│ with abandoned workloads — declared but never │
│ scheduled. If this is intentional (e.g. feature- │
│ flagged deployment), dismiss. Otherwise the chart │
│ can be slimmer: remove the workload entirely, or │
│ document the activation path. │
│ │
│ confidence: ●○○ │
└──────────────────────────────────────────────────────────┘
────────────────────────────────────────────────────────────────────────
Sandbox accuracy: ±40%. Install the Optiqor agent for exact numbers.
Minimal chart fragment (if applicable)
api:
resources:
requests:
cpu: 500m
memory: 256Mi
limits:
cpu: 1000m
memory: 512Mi
image:
repository: myapp
tag: v1.2.3
Additional context
Root cause: parser.Workload.Replicas is documented as // Zero means "unset" but the detector cannot distinguish unset from explicit zero. The parser needs to use a pointer (*int) or a separate ReplicasSet bool field, OR the detector needs to guard against !w.ReplicasSet.
What happened?
Running optiqor analyze on any Helm chart that does not explicitly set replicas or replicaCount produces a spurious idle-workload finding for every workload.
Reproduction steps
optiqor-cli version
dev (built from source, main branch)
Install method
Built from source
OS and arch
macos
Relevant output
$ optiqor analyze ./values.yaml ──────────────────────────────────────────────────────────────────────── ◆ optiqor Helm chart cost optimization · security as a bonus ──────────────────────────────────────────────────────────────────────── Source api/values.yaml Workloads 1 workload analyzed Cost 1 optimization ── Cost optimizations ────────────────────────────────────────────── ┌─ LOW · api ────────────────────────────────────────────┐ │ │ │ Workload declared with replicas=0 and no autoscaler │ │ │ │ api ships with replicas=0 and no HPA. In a live │ │ cluster this is the chart pattern that correlates │ │ with abandoned workloads — declared but never │ │ scheduled. If this is intentional (e.g. feature- │ │ flagged deployment), dismiss. Otherwise the chart │ │ can be slimmer: remove the workload entirely, or │ │ document the activation path. │ │ │ │ confidence: ●○○ │ └──────────────────────────────────────────────────────────┘ ──────────────────────────────────────────────────────────────────────── Sandbox accuracy: ±40%. Install the Optiqor agent for exact numbers.Minimal chart fragment (if applicable)
Additional context
Root cause: parser.Workload.Replicas is documented as // Zero means "unset" but the detector cannot distinguish unset from explicit zero. The parser needs to use a pointer (*int) or a separate ReplicasSet bool field, OR the detector needs to guard against !w.ReplicasSet.