The RWO Volume That Hangs Your Upgrade Forever
Flipping trivy.securityCheck to include secret and config scanning triggers a Harbor helm upgrade that never finishes — a ReadWriteOnce jobservice PVC fighting a RollingUpdate strategy that needs two pods attached at once.
The change looked routine: set trivy.securityCheck to vuln,secret,config so Harbor's scanner starts catching leaked secrets and misconfigurations alongside CVEs, then run helm upgrade. The upgrade hung. A ten-minute shell timeout was the only thing that ended it, and it ended the upgrade in a bad place: helm history recorded the release as revision 2, failed: context canceled.
What the events actually said
The jobservice pod's events named the failure precisely:
Warning FailedAttachVolume 12m attachdetach-controller
Multi-Attach error for volume "pvc-8fb8ce4f-6e2e-4ead-98f5-960b9217ac43"
Volume is already used by pod(s) harbor-jobservice-7d6cbcbc75-kprvjThe new pod, harbor-jobservice-6c56f76f55-q5wz4, was scheduled and waiting on a volume the old pod, harbor-jobservice-7d6cbcbc75-kprvj — nine hours old at that point — still held. Checking the PVC's access mode confirmed the constraint: ["ReadWriteOnce"]. A ReadWriteOnce volume attaches to exactly one node at a time. It cannot be mounted by two pods' worth of scheduling at once, no matter how briefly.
The strategy that assumes it can
Harbor's jobservice Deployment ships with the Kubernetes default rollout strategy:
{"rollingUpdate":{"maxSurge":"25%","maxUnavailable":"25%"},"type":"RollingUpdate"}RollingUpdate with a nonzero maxSurge means Kubernetes brings the new pod up before tearing the old one down, so there's a window with both pods alive. That's the whole point of a rolling update — no downtime. It's also exactly incompatible with a ReadWriteOnce PVC: the new pod cannot attach the volume until the old pod releases it, and the old pod isn't scheduled for termination until the new pod is Ready. Neither side can move first. The rollout doesn't fail with an error that names the deadlock; it just sits at FailedAttachVolume, retrying, indefinitely.
RWO volume, one attach at a time; RollingUpdate wants two pods attached at once. Nothing breaks the tie on its own.
Why this one change was the trigger
Nothing about trivy.securityCheck touches storage. The setting only tells the scanner which checks to run. But changing it changes a value the jobservice Deployment's pod template reads, which is enough to trigger a rollout of that Deployment — and it's the rollout, not the scan setting, that walks straight into the RWO/RollingUpdate conflict. Any change that touches the jobservice pod spec would trigger the identical hang; the scan-check change is just the one that happened to be under test.
The practical fix is the boring one: change jobservice's strategy to Recreate, or set maxSurge: 0, before making any change that forces a rollout of a Deployment sitting on a ReadWriteOnce volume. Checking the access mode and the strategy together, before the upgrade, costs less than a ten-minute timeout and a stuck revision in helm history.
Next: Trivy Operator does not see drift — install a package into a running container, and the VulnerabilityReport never notices.