Repository navigation
fix: honour existingClaim and appSecret, roll pods on config changes; strengthen tests - #83
Merged
Merged
Conversation
Chart fixes (1.8.2): - persistence.*.existingClaim is now mounted by the Deployment; previously the PVC was skipped but the pod still referenced <fullname>-<volume>. - New cnpg.appSecret (superuserSecret kept as deprecated alias). Paperless now reads DB credentials from it instead of the <cluster>-app secret that CNPG does not create when a custom initdb secret is given. - Checksum annotations on the Paperless and Redis pods so changes to paperless.config, paperless.secrets or redis.password trigger a rollout. - cnpg.postgresVersion is now used as the image tag when cnpg.image.tag is empty (new default), matching the README. - Renovate: drop the helmv3 manager and its rules, which never matched. Tests: - helm-unittest suites covering strategy, volumes, DB secret, checksums, CNPG image/plugins/initdb secret, PVCs, Redis and secret validation. - Integration tests run as an install/upgrade matrix: the upgrade scenario installs the latest published chart, writes data through the API, upgrades to this chart and checks the data survived. - Smoke test uses a port-forward with retries and an authenticated API call instead of `kubectl run -i`, which could lose the curl output. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QD1kFPcmFFoZmmgw6t4XGw
Contributor
There was a problem hiding this comment.
All reported issues were addressed across 17 files
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
- podAnnotations can no longer override the generated checksum keys. - Redis checksums only when the chart-managed password is actually used (not with passwordSecretKeyRef); document that external secrets need a manual restart, and that cnpg.appSecret only applies at cluster creation. - Unit tests now pin the secret/Redis checksums and check they change. - Smoke test: curl timeouts, port-forward liveness check, retries on every API call, and unknown actions are rejected. - wait-ready.sh fails with an explicit error when the Cluster never appears. - Integration Test gate only accepts a skip when the path filter ran and found no chart changes (not when Lint failed). - README: PostgreSQL component is :18. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QD1kFPcmFFoZmmgw6t4XGw
Contributor
There was a problem hiding this comment.
All reported issues were addressed across 9 files (changes from recent commits).
Tip: cubic used a learning from your PR history. Let your coding agent read cubic learnings directly with the cubic MCP.
View guided diff | Turn on auto-fix | Re-trigger cubic
… count Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QD1kFPcmFFoZmmgw6t4XGw
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Chart fixes (1.8.1 → 1.8.2)
persistence.*.existingClaimwas broken. With it set, the PVC was skipped but the Deployment still mounted<fullname>-<volume>, so the pod stayed Pending. It now mounts the existing claim.cnpg.superuserSecretactually set the application user secret (bootstrap.initdb.secret), and CNPG then doesn't create<cluster>-app. But Paperless always read<cluster>-app. Now:cnpg.appSecretis used both for initdb and by Paperless;superuserSecretis kept as a deprecated alias.paperless.config,paperless.secretsorredis.passwordchange. The checksums are computed from the values, not the rendered manifests, so a chart version bump alone doesn't restart the pods.cnpg.postgresVersionwas unused, even though the README says bumping it triggers the major upgrade. It is now the image tag whencnpg.image.tagis empty, which is the new default. The rendered output is unchanged for default values (postgresql:18).postgresVersionto something other than its actual image tag, without settingcnpg.image.tag, will now change images.helmv3manager and its rules. They never matched anything, because the chart has no Chart.yaml dependencies andhelmv3doesn't read images from values.yaml.Tests
Unit tests (
helm-unittest, run in the Lint job): 30 cases inpaperless-ngx/tests/, excluded from the package via.helmignore. They cover:existingClaim;Checked that they fail against the previous templates.
Integration tests now run as a matrix:
install: fresh install.upgrade: install the latest published chart from GHCR, create a tag through the API,helm upgradeto this chart, then check the tag survived.Integration Testaggregator job keeps the existing check name.Smoke test moved to
.github/scripts/smoke-test.sh. It uses a port-forward with retries plus an authenticated API call, instead ofkubectl run -i, which could lose the curl output (the flake seen on fix: default to Recreate strategy and allow CNPG plugins #82).Local validation
helm lint,helm unittest(30/30)🤖 Generated with Claude Code
https://claude.ai/code/session_01QD1kFPcmFFoZmmgw6t4XGw
Generated by Claude Code
Summary by cubic
Fixes chart configuration bugs, makes
cnpg.postgresVersioneffective, and adds safer rollout and CI coverage.persistence.*.existingClaimnow mounts the configured PVC instead of the chart-managed name.cnpg.appSecretconfigures and reads the application database credentials;superuserSecretremains a deprecated alias.cnpg.postgresVersionsupplies the image tag whencnpg.image.tagis empty, so affected releases may change images on upgrade.podAnnotations, and nullpodAnnotationsare tolerated.helmv3manager and rules.Tests
helm-unittestcases for strategies, volumes, claims, database secrets, checksums, CNPG images, PVCs, Redis, and secret validation.Written for commit e7b5b26. Summary will update on new commits.