helm-charts
helm-charts copied to clipboard
Cannot specify securityContext container attribute
This is an improvement request
Describe the bug The timescaledb-single chart won't let you configure a securityContext container attribute. This is required in Kubernetes clusters that use pod security policies (else the container start as root and postgres refuses to start):
containers:
- name: timescaledb
securityContext:
allowPrivilegeEscalation: false
runAsGroup: 1000
runAsNonRoot: true
runAsUser: 1000
We have to create a local copy of the chart to work around this issue.
The Single Helm Chart defaults to the default securityContext
, which:
Defaults to user specified in image metadata if unspecified.
https://v1-18.docs.kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#securitycontext-v1-core
Which is postgres
for this image.
docker inspect timescaledev/timescaledb-ha:pg12.5-ts2.0.0-p0 | jq '.[0].Config.User' -r
postgres
However, it may be good to explicitly configure this setup. See #252