Repository navigation
feat(netbird): keep the management image's data directory - #77
Open
codechirag5610 wants to merge 1 commit into
Open
codechirag5610 wants to merge 1 commit into
codechirag5610 wants to merge 1 commit into
Conversation
The chart always mounted a volume at the management data directory, an emptyDir when persistence was disabled. That hides anything the image ships at the same path, so an air-gapped image that bakes in the geolocation databases starts with an empty /var/lib/netbird and management fails when it cannot download them. backend.split.management.persistence.mount, true by default, drops the volume and its mount when set to false, leaving the image's directory in place. Enabling persistence without the mount fails the render, because a claim that is never mounted keeps no data. Closes netbirdio#19
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 59 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Author
|
Ran the repository's own e2e suite against this branch, since the workflows here are waiting on approval: Real peers connected through the chart as usual, and the suite cleaned up after itself. |
This branch has not been deployed
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 #19.
Problem
The management deployment always mounts a
datavolume atpersistence.mountPath— a PVC when persistence is on, anemptyDirwhen it is off. Either way the mount hides whatever the image ships at that path.That breaks air-gapped installs. Since NetBird 0.55 management fails when it cannot download its geolocation databases, so the documented workaround is to bake them into the image at
/var/lib/netbird— which the chart then masks with an empty volume.Change
backend.split.management.persistence.mount,trueby default, drops both the volume and its mount when set tofalse, leaving the image's own directory in place. Enabling persistence whilemount: falsefails the render, since a claim that is never mounted keeps no data.The default is unchanged, so the existing
emptyDir-for-a-writable-datadir behaviour (andrender.shcheck 21) still holds. The image's directory must already be writable by the user the pod runs as.Tests
render.shcheck 24: withenabled: false+mount: falsethe deployment renders nodatavolume, noemptyDir, nomountPath: /var/lib/netbirdand no PVC, while themanagement.jsonConfigMap mount stays;mount: falsewith persistence enabled fails the render.helm lint --strict, bothrender.shsuites, all seven example renders and kubeconform pass. Existing check 21 still passes.netbirdio/management:0.82.0with stub geolocation files baked into/var/lib/netbird:mount: true(today's behaviour) — directory empty,/proc/mountsshowsext4mounted over/var/lib/netbirdmount: false—GeoLite2-City.mmdbandgeonames.dbintact, no mount at that path