Skip to content

Helm chart hook job fails under PSA restricted (missing securityContext) #180

Description

@ggualerz

Hi Chatwoot team,

We’re using the official Helm chart (2.0.9) on a cluster with Pod Security Admission restricted:latest enforced. The install/upgrade hook Job chatwoot-migrate fails because its containers don’t set the required securityContext fields:

  • allowPrivilegeEscalation: false
  • capabilities.drop: ["ALL"]
  • runAsNonRoot: true
  • seccompProfile.type: RuntimeDefault
  • Error excerpt:
pods "chatwoot-migrate-..." is forbidden: violates PodSecurity "restricted:latest":
allowPrivilegeEscalation != false (containers "init-postgres", "init-redis", "db-migrate-job" must set securityContext.allowPrivilegeEscalation=false),
unrestricted capabilities (containers "init-postgres", "init-redis", "db-migrate-job" must set securityContext.capabilities.drop=["ALL"]),
runAsNonRoot != true (pod or containers "init-postgres", "init-redis", "db-migrate-job" must set securityContext.runAsNonRoot=true),
seccompProfile (pod or containers "init-postgres", "init-redis", "db-migrate-job" must set securityContext.seccompProfile.type to "RuntimeDefault" or "Localhost")

The chart currently applies .Values.securityContext only at the pod level and not on containers, and the hook job doesn’t expose container‑level securityContext for initContainers/main container. Because Helm hooks are rendered separately, post‑render patches (Kustomize/Fleet) can’t fix this.

Could you please add container‑level securityContext for the hook job (init + main), ideally configurable via values (e.g. hooks.migrate.securityContext / hooks.migrate.podSecurityContext)? This would make the chart compatible with PSA restricted clusters without exemptions.

Thanks!

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