Skip to content

[Backport release-1.5] fix(harbor): preserve jobservice and trivy storageClass on upgrade - #3147

Merged
myasnikovdaniil merged 1 commit into
release-1.5from
backport-2930-to-release-1.5
Jun 30, 2026
Merged

[Backport release-1.5] fix(harbor): preserve jobservice and trivy storageClass on upgrade#3147
myasnikovdaniil merged 1 commit into
release-1.5from
backport-2930-to-release-1.5

Conversation

@github-actions

Copy link
Copy Markdown

Description

Backport of #2930 to release-1.5.

The cozy-harbor wrapper never passed storageClass to the jobservice
jobLog PVC, so it was created without a storageClassName and the
default-StorageClass admission stamped the cluster default. Because PVC
storageClassName is immutable, this caused rendered-vs-live drift on
upgrade. Preserve an existing PVC's class via lookup and fall back to the
configured storageClass for fresh installs.

The trivy StatefulSet's volumeClaimTemplate had the same latent drift --
.Values.storageClass was forwarded blindly into a VCT that cannot be
patched at all -- so it gets the same lookup-preserve treatment, keyed
off data-<release>-trivy-0.

A live object pinned to an explicit "" (no dynamic provisioning) now
round-trips through upstream's "-" sentinel instead of collapsing to an
omitted storageClassName, and the spec lookup is guarded with
`| default dict` so a PVC carrying no storageClassName key stays omitted.

Adds a helm-unittest regression suite and wires a test target so
make unit-tests stops skipping packages/apps/harbor.

Fixes #2368

Assisted-By: Claude <noreply@anthropic.com>
Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
(cherry picked from commit bdf520b)
@dosubot dosubot Bot added area/storage Issues or PRs related to storage (linstor, seaweedfs, bucket, velero, harbor) backport Should change be backported on previous release kind/bug Categorizes issue or PR as related to a bug labels Jun 30, 2026
@myasnikovdaniil
myasnikovdaniil merged commit 76f2964 into release-1.5 Jun 30, 2026
5 checks passed
@myasnikovdaniil
myasnikovdaniil deleted the backport-2930-to-release-1.5 branch June 30, 2026 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/storage Issues or PRs related to storage (linstor, seaweedfs, bucket, velero, harbor) backport Should change be backported on previous release kind/bug Categorizes issue or PR as related to a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant