Skip to content

Init Container permission problem #888

@oazabir

Description

@oazabir

The init containers are failing with permission denied when trying to write configuration files:

Error writing to file: open /conf/homeserver.yaml: permission denied

This is affecting:

  • ess-synapse-main-0 - render-config container
  • ess-matrix-authentication-service - render-config container
  • ess-matrix-rtc-sfu - render-config-keys-yaml container

the pods are running as non-root user (10091)
with strict security contexts, but the init containers need to write
configuration files to emptyDir volumes. The fsGroup should handle
this, but it's not working properly.

There's no way to override security context via values.yaml:

# Override security context to allow init containers to write configs
synapse:
  securityContext:
    runAsUser: 0
    runAsGroup: 0
    runAsNonRoot: false
    fsGroup: 0

matrixAuthenticationService:
  securityContext:
    runAsUser: 0
    runAsGroup: 0
    runAsNonRoot: false
    fsGroup: 0

matrixRTC:
  sfu:
    securityContext:
      runAsUser: 0
      runAsGroup: 0
      runAsNonRoot: false
      fsGroup: 0

This does not work. The pods have to be manually patched.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions