Code Monkey home page Code Monkey logo

Comments (6)

carrodher avatar carrodher commented on July 21, 2024

Bitnami containers are designed to operate as non-root by default. Consequently, any files or directories used by the application should be owned by the root group, as the random user (1001 by default) is a member of this root group. To ensure proper permissions, you'll need to adjust the ownership of your local directory accordingly.

For more comprehensive information about non-root containers and their significance for security, you can explore the following resources:

These references provide valuable insights into the best practices and considerations when working with non-root containers in Bitnami applications.

from charts.

maximveksler avatar maximveksler commented on July 21, 2024

@carrodher spec that works on 14.3.3 breaks on 15.1.0. Am I to understand that it's an expected regression ?

from charts.

carrodher avatar carrodher commented on July 21, 2024

There were some related changes in this new major, see https://github.com/bitnami/charts/tree/main/bitnami/postgresql#to-1500

from charts.

cernockyd avatar cernockyd commented on July 21, 2024

In my case when setting volumePermissions.enabled = true, the pod still fails since there is no way to set allowPrivilegeEscalation and capabilities.drop = ["ALL"] for the initContainer.

In our cluster, nonroot, allowPrivilegeEscalation=false and capabilities.drop=["ALL"] are required, hope i don't misunderstand something

from charts.

javsalgar avatar javsalgar commented on July 21, 2024

Hi,

@maximveksler I believe it has to do with setting readOnlyRootFilesystem=true. In the case persistence is disabled, we should mount an empty dir in /bitnami/postgresql. I think this should work. In the statefulset.yaml file, change this:

            {{- if .Values.primary.persistence.enabled }}
            - name: data
              mountPath: {{ .Values.primary.persistence.mountPath }}
              {{- if .Values.primary.persistence.subPath }}
              subPath: {{ .Values.primary.persistence.subPath }}
              {{- end }}
            {{- end }}

To this

            - name: data
              mountPath: {{ .Values.primary.persistence.mountPath }}
              {{- if .Values.primary.persistence.subPath }}
              subPath: {{ .Values.primary.persistence.subPath }}
              {{- end }}

If that works, would you like to submit a PR with the change? If not, we will work on it.

from charts.

javsalgar avatar javsalgar commented on July 21, 2024

@cernockyd which exact init container is failing? In principle this should work

          {{- if eq ( toString ( .Values.volumePermissions.containerSecurityContext.runAsUser )) "auto" }}
          securityContext: {{- omit .Values.volumePermissions.containerSecurityContext "runAsUser" | toYaml | nindent 12 }}
          {{- else }}
          securityContext: {{- .Values.volumePermissions.containerSecurityContext | toYaml | nindent 12 }}
          {{- end }}

from charts.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.