[Dashboards] Fix readOnlyRootFilesystem by adding emptyDir for data dir#726
Open
faarshad wants to merge 1 commit intoopensearch-project:mainfrom
Open
[Dashboards] Fix readOnlyRootFilesystem by adding emptyDir for data dir#726faarshad wants to merge 1 commit intoopensearch-project:mainfrom
faarshad wants to merge 1 commit intoopensearch-project:mainfrom
Conversation
…lume for data directory When securityContext.readOnlyRootFilesystem is set to true, OpenSearch Dashboards fails to start because it cannot write the UUID file to /usr/share/opensearch-dashboards/data/uuid (EROFS error). This adds a conditional emptyDir volume mounted at /usr/share/opensearch-dashboards/data when readOnlyRootFilesystem is enabled, providing a writable directory for the UUID file. Resolves opensearch-project#368 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Fahad Arshad <26278466+faarshad@users.noreply.github.com>
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
securityContext.readOnlyRootFilesystem: trueis setemptyDirvolume mounted at/usr/share/opensearch-dashboards/dataso the UUID file can be writtenreadOnlyRootFilesystemis enabled — no change to default behaviorResolves #368
Changes
charts/opensearch-dashboards/templates/deployment.yaml— Added conditional emptyDir volume (dashboards-data) and volumeMount at/usr/share/opensearch-dashboards/datawhen.Values.securityContext.readOnlyRootFilesystemis truecharts/opensearch-dashboards/Chart.yaml— Bumped chart version from 3.4.0 to 3.5.0charts/opensearch-dashboards/CHANGELOG.md— Documented the fix under[Unreleased] > FixedTest plan
helm lintpasseshelm templatewithreadOnlyRootFilesystem=truerenders the emptyDir volume and mount correctlyhelm templatewithoutreadOnlyRootFilesystemdoes NOT include the extra volume (no regression)readOnlyRootFilesystem=trueConnectionError/getaddrinfo EBUSYerrors — Dashboards connects to OpenSearch successfully/usr/share/opensearch-dashboards/data/uuidReady 1/1with zero restartsreadOnlyRootFilesystem) — behavior unchanged, no extra volume added