Repository navigation
feat: snapshot, restore and clone CloudNativePG databases - #1
Merged
Merged
Conversation
Each action is a Job in the database's namespace that connects as the owner role; a production restore waits for a second person. The chart's admission policy keeps those Jobs to what the server builds.
A Database resource's label names its app's namespace; the server asks the API server, with a SubjectAccessReview for the user and groups the ID token gives a person, what they may do there. Cross-environment clones take a share from someone who may snapshot the source. A restore drops what the owner owns in the same transaction, so the database ends up exactly as the snapshot.
Brimyr: Quality AssuranceMode:
✅ Patch coverage 95.4% meets the 80.0% threshold. |
Chargate: Security AssuranceMode:
✅ No net-new findings introduced by this change. Uploaded: SARIF in DefectDojo · SBOM in Dependency-Track Pre-existing findings never block; in-source suppressions (accepted risks) and secret false positives are reported but never gate. The full, unfiltered SARIF ships to the Security tab or as an artifact. |
Test code is where Chargate's Bandit default already stops counting asserts; the test people's ids are a sha256 prefix now, and the Azurite URL is marked as the local port-forward it is.
B105 on an empty token cache and a mount path, B108 on the Job pod's own emptyDir, and defused-xml on parsing Azure Storage's own listings.
They build a throwaway test cluster, RoleBindings to edit and admin included, and are applied nowhere else; the secret scanners still read them.
… its directory Under the docker-container builder CI uses, COPY --chmod=0644 gives the directories it creates the same mode: /usr/share/postgresql-common/pgdg became 0644, and apt's sqv, running as _apt, could not read the key. A plain COPY keeps the file's 0644 from git and makes the directories 0755.
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.
Lets app teams snapshot, restore and clone their own PostgreSQL databases on CloudNativePG, with access decided by Kubernetes RBAC in each database's namespace.
Databaseresource names (viewsees,editsnapshots and restores,adminrestores production). Outside your namespaces a database does not exist.pg_dumpstreamed into Blob Storage; restores in one transaction (DROP OWNED, thenpg_restore's script,COMMITonly once it succeeded), in place with the app scaled to 0, or into a<name>_copy.