Skip to content

InitScripts can't execute when running as nonRootUser #728

@cbuffett

Description

@cbuffett

The statefulset mounts the initScripts into the docker-entrypoint-initdb.d/ as being only executable by root. This prevents the script from executing when Influx is being run as a nonRootUser

{{- if .Values.initScripts.enabled }}
- name: init
configMap:
name: {{ include "influxdb.fullname" . }}-init
defaultMode: 0744

influxdb-influxdb2-0:/docker-entrypoint-initdb.d/..data$ ls -l
total 4
-rwxr--r--    1 root     influxdb       141 Jul 22 20:29 init.sh
securityContext:
  runAsNonRoot: true
  runAsUser: 1000
  runAsGroup: 1000

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