Repository navigation
fix(postgres): bound the CNPG instance pods' emptyDirs - #878
Merged
Merged
Conversation
Published Helm chart
|
| Chart | agent-platform-connectivity |
| Version | 4.122.1-r7c3033cet20261009153930haefe1bb |
| OCI reference | oci://gsoci.azurecr.io/charts/giantswarm/agent-platform-connectivity:4.122.1-r7c3033cet20261009153930haefe1bb |
| Digest | sha256:c145eea3d88a39b41473a21385c49c7b0737f5a523f5b43de2f906d22f195ad7 |
| Registry | public — gsoci.azurecr.io |
| Git catalog | giantswarm-test-catalog (index) |
Pull this chart
helm pull oci://gsoci.azurecr.io/charts/giantswarm/agent-platform-connectivity --version 4.122.1-r7c3033cet20261009153930haefe1bbPosted by architect-orb · build 20667 · commit aefe1bb · updated in place on every push
Published Helm chart
|
| Chart | agent-platform |
| Version | 4.122.1-r7c3033cet20261009153930haefe1bb |
| OCI reference | oci://gsoci.azurecr.io/charts/giantswarm/agent-platform:4.122.1-r7c3033cet20261009153930haefe1bb |
| Digest | sha256:7692d9af58f0ebf5179aa3cf8e36fdcb11086324733fcfd4e882547470d844af |
| Registry | public — gsoci.azurecr.io |
| Git catalog | giantswarm-test-catalog (index) |
Pull this chart
helm pull oci://gsoci.azurecr.io/charts/giantswarm/agent-platform --version 4.122.1-r7c3033cet20261009153930haefe1bbPosted by architect-orb · build 20668 · commit aefe1bb · updated in place on every push
…l-storage * origin/main: feat(model-serving): mount the cache claim a model pod names (#869)
This was referenced Oct 9, 2026
Open
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.
Closes #875
Problem
The connectivity chart's CloudNativePG
Cluster(kagent-pg) renders noresourcesand noephemeralVolumesSizeLimit. The operator then mounts thescratch-dataandshmemptyDirs without asizeLimitand leavesbootstrap-controllerandpostgreswithoutephemeral-storagerequests and limits, so Kyverno'srequire-emptydir-requests-and-limitsreports every instance pod. Withpostgres.backup.method: pluginthe operator adds a third emptyDir,plugins, which no Cluster field can bound.postgresand theplugin-barman-cloudsidecar both mount it. Same class as #780 (hook Jobs) and #866 (agent-manager migrate CronJob).Change
postgres.ephemeralVolumesSizeLimit→Cluster.spec.ephemeralVolumesSizeLimit, defaultshm: 256Mi,temporaryData: 1Gi. The operator sets these as thesizeLimitofshmandscratch-data.postgres.resources→Cluster.spec.resources(thepostgresandbootstrap-controllercontainers). Defaults: requestscpu: 100m,memory: 512Mi,ephemeral-storage: 256Mi; limitscpu: 1,memory: 2Gi,ephemeral-storage: 2Gi. The memory limit leaves room for the memory-backedshm.postgres.backup.objectStore.sidecar.resources(was{}) →ObjectStore.spec.instanceSidecarConfiguration.resources. Defaults: requestscpu: 10m,memory: 64Mi,ephemeral-storage: 16Mi; limitsmemory: 256Mi,ephemeral-storage: 256Mi. These cover the sidecar's mount of the unboundedpluginsemptyDir.make verify-postgres-ephemeral-storage(chained intoverify-postgres) builds the pod the operator renders from the Cluster and the ObjectStore, without and with the plugin backup, and applies the rule to it. It checks that the pod passes with the defaults and fails with all three knobs null, and that the meta chart forwards the connectivity defaults.Open PR #852 changes
templates/postgres/policy-exception.yaml, the ImageVolume exception forrestrict-volume-types. That is a different policy, and its change does not overlap this one.Proof
CNPG builds the pod, so the proof is on the live pod. Policy:
require-emptydir-requests-and-limitsas the kyverno-policies chart renders it, evaluated with the Kyverno CLI 1.19.1.kyverno apply policy.yaml --cluster --namespace kagentreportskagent/Pod/kagent-pg-1(failed at path /resources/limits/). The pod's emptyDirs arescratch-data: {}andshm: {medium: Memory}, and both containers haveresources: {}.platform.chartPath): the operator rolled the instance. The live pod:--clusterscan no longer reportskagent-pg-1. The namespace's remaining findings are the agent-manager migrate CronJob and its runs, which fix(agent-manager): bound the migrate CronJob's emptyDir storage #873 addresses.kagent-pg"Cluster in healthy state", 16 of 16 releases Ready,agentlab platform-testpasses.What the lab cannot show:
pluginsemptyDir and sidecar): the lab runs no backup. That shape is covered bymake verify-postgres-ephemeral-storage, which models the pod after the operator's observed layout (pluginsemptyDir withoutsizeLimit, mounted bypostgresandplugin-barman-cloud).Written by an agent.