Repository navigation
fix(deploy): compare resource quantities by value in the read-only drift check (OK-170) - #183
Merged
Merged
Conversation
…ift check (OK-170)
…paths and test precision (OK-170)
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.
Why
deploy/kubernetes/verify-ok-shared-readonly.shcompares every rendered field of an object the gates do not admit with the live object by exact JSON equality. The API server and operators such as CNPG normalise resource quantities, so a rendered0.5read back as500m, or1024Mias1Gi, reports DRIFT on an unchanged object. That STOPs G0 of the ok-shared window when nothing has changed (OK-170).What changes
resources.requests|limitsfor Deployment, StatefulSet, DaemonSet, ReplicaSet, Job, CronJob and Pod, including List items.postgresql.cnpg.ioClusterspec.resources.Decimal, with enough precision for binary suffixes.1Gvs1Gi.Tests
deploy/kubernetes/verify-ok-shared-readonly.test.ts: 70 tests pass.resourcesand foreign or misplaced paths all report DRIFT.Scope of this evidence
ok-shared-liverender.ok-console-dbquantity paths. Today's results are unchanged.cpu: 0.1against a rendered100mreads unchanged.101mreads DRIFT.spec-only pin, the container-array name check, the typedClusterListbranch, and index-type checks. In each case the surviving variant either crashes (fail closed) or value-compares quantities the server would treat as equal anyway.spec.resources,volumeClaimTemplates, PVCs, and CNPG Pooler andpvcTemplate. None appears today.requests/limitsthat the render lacks are not reported. This is existing behaviour.Refs OK-170.