Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add ability to inject extraVolumeMounts into UI container #40

Merged
merged 1 commit into from
Mar 17, 2023

Conversation

mkilchhofer
Copy link
Contributor

Follow-up of discussion in PR:

Just as a note to anyone leveraging this later, the UI container crashes if readOnlyRootFilesystem is true as it needs to write to tmp space.

[emerg] 1#1: mkdir() "/tmp/proxy_temp" failed (30: Read-only file system)

Source: @toscott , #38 (comment)

@mkilchhofer mkilchhofer force-pushed the feature/extraVolumeMounts_for_UI branch from 5eb0c26 to 1099c6c Compare March 16, 2023 08:59
@mkilchhofer mkilchhofer changed the title feat: Add ability to inject extraVolumeMounts into UI pod feat: Add ability to inject extraVolumeMounts into UI container Mar 16, 2023
Signed-off-by: Marco Kilchhofer <mkilchhofer@users.noreply.github.com>
@mkilchhofer mkilchhofer force-pushed the feature/extraVolumeMounts_for_UI branch from 1099c6c to 7c657f9 Compare March 16, 2023 10:02
Copy link
Collaborator

@toscott toscott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Was able to test it out with a read only root filesystem on the ui container and everything starts up. Also ran it with no values and everything starts up clean.

Example configuration with UI read only file system.

podSecurityContext:
  fsGroup: 2000

opencost:
  ui:
    extraVolumeMounts:
      - mountPath: /tmp
        name: test-volume
    securityContext:
      capabilities:
        drop:
        - ALL
      readOnlyRootFilesystem: true
      runAsNonRoot: true
      runAsUser: 1000
extraVolumes:
  - name: test-volume
    emptyDir:
      sizeLimit: 10Mi

@toscott toscott merged commit ca8fa0c into opencost:main Mar 17, 2023
@mkilchhofer mkilchhofer deleted the feature/extraVolumeMounts_for_UI branch March 17, 2023 05:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants