cozystack/packages
Myasnikov Daniil 3d7155c11f
fix(harbor): merge BucketInfo at values root, drop targetPath
The previous fix (a21c18f9) sourced BucketInfo via Flux valuesFrom with
`targetPath: bucket.bucketInfo`. Flux runs values with `targetPath`
through Helm's `strvals.ParseInto`, which splits the value on commas as
list separators. The COSI BucketInfo JSON is comma-rich, so values
resolution bailed:

  could not resolve Secret chart values reference
  'tenant-X/harbor-X-registry-bucket' with key 'BucketInfo':
  key "\"spec\":{\"bucketName\":\"bucket-1785...\""
  has no value (cannot end with ,)

Drop `targetPath`. With only `valuesKey: BucketInfo`, helm-controller
unmarshals the value as YAML and merges at the chart's values root, so
JSON commas stay nested instead of being split. The system chart's
bucket-secret.yaml now reads `.Values.spec.bucketName` /
`.Values.spec.secretS3.{accessKeyID,accessSecretKey,endpoint}`,
guarded by nested `with` blocks so the registry-s3 Secret renders only
when secretS3 has been populated.

Gating semantics from the previous fix are preserved: with the default
`optional: false`, helm-controller still refuses to compose values
until the COSI BucketAccess controller writes `BucketInfo` into the
Secret, and the value's content still drives the HR config-digest.

Verified via `helm template` against the system chart with three
scenarios: missing `spec` and `spec` without `secretS3` render
nothing; full BucketInfo renders all five S3 env keys correctly.

Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
Assisted-By: Claude <noreply@anthropic.com>
2026-04-30 09:34:22 +05:00
..
apps fix(harbor): merge BucketInfo at values root, drop targetPath 2026-04-30 09:34:22 +05:00
core fix(installer): drop labeler Job hook in favour of caller-applied Namespace 2026-04-28 13:46:49 +05:00
extra Prepare release v1.3.0 2026-04-22 07:28:09 +00:00
library [cozy-lib] Add a hexToInt helper 2026-03-19 07:29:50 +03:00
system fix(harbor): merge BucketInfo at values root, drop targetPath 2026-04-30 09:34:22 +05:00
tests/cozy-lib-tests refactor: replace Helm lookup with valuesFrom mechanism 2026-01-05 16:10:55 +01:00