feat(helm): add hash cache persistence support#67
Open
amascia-gg wants to merge 5 commits intomainfrom
Open
Conversation
7db8017 to
a72d9ea
Compare
Add PVC-based persistence for the scrypt hash cache so it survives across CronJob runs. Only the inventory CronJob gets the cache mount. Includes PVC template, schema validation, values defaults, and 11 helm-unittest test cases. Issue: NHI-1429 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Issue: NHI-1429 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The persistence property was only in the generated values.schema.json but not in values-base-schema.schema.json, causing the schema-bundle pre-commit hook to strip it during regeneration. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds a pre-flight curl check against /nhi/ping to surface the actual error when auth fails. Removes delinea from validation groups as its OAuth credentials have been expired for 10 months. Issue: NHI-1429 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
InitContainer checks the cache file mtime before each inventory run and flushes it if stale (default 24h), preventing sensitive hash data from lingering when the job stops. PVC is no longer rendered when the inventory fetch job is disabled. Issue: NHI-1429 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Made-with: Cursor
a72d9ea to
370898f
Compare
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.
Summary
persistencesection tovalues.yaml,values.schema.json, and templatesChanges
values.yamlpersistenceblock:enabled,storageClassName,size,existingClaimvalues.schema.jsontemplates/persistentvolumeclaim.yamlpersistence.enabled && !existingClaimtemplates/_cronjob.tplHASH_CACHE_PATHenv, volumeMount, and PVC volumetemplates/cronjob_inventory.yamluse_cache_pvc: trueto shared templatetests/persistence_test.yamlChart.yamlUsage
Without
persistence.enabled, behavior is unchanged — secrets are hashed from scratch every run.Test plan
helm unittest charts/ggscout— all 40 tests pass (11 new persistence tests)helm templaterenders correctly with and without persistencepersistence.enabled: true— cold run: 0 hits/40 misses, warm run: 40 hits/0 missesIn eks-sandbox-01: