Open mcgrawia opened 3 years ago
It seems to me that the currently published charts don't include the securityContext
sections.
helm template -f values.yaml .
- produces yaml with securityContext (given the command runs inside the cloned repo)
helm template -f values.yaml confluentinc/cp-helm-charts
- produces yaml without securityContext
Hi!
Having same issue of user not correctly defined on chart. And since confluent images 6.2.2+ releases there is a check to ensure correct rights on directory leading to a crashloopbackoff with:
===> User
uid=10001 gid=10001 groups=10001
===> Configuring ...
Command [/usr/local/bin/dub path /etc/schema-registry/ writable] FAILED !
Same as https://github.com/confluentinc/schema-registry-images/pull/48#issuecomment-991336270 and https://github.com/confluentinc/kafka-images/issues/127
Since january 2020 the appuser
user is use by default in all cp-* images and defined like that:
uid=1000(appuser) gid=1000(appuser) groups=1000(appuser)
See PRs https://github.com/confluentinc/common-docker/pull/54 and https://github.com/confluentinc/schema-registry-images/pull/13
So the securityConfig
section in all Helm charts in this repository aren't correct as they defined the user as 10001:10001
.
Also, in my opinion, having the possibility to define a securityConfig
properties is good but chart won't have to set default values as it's up to deployment teams to know their cluster configuration.
Even more, if the image already run a non root user.
you can override default values.yaml for securityContext like this:
securityContext:
runAsUser: 0
Hi confluent team,
My team and I encountered user permissions issues with the kafka, schema registry, and zookeeper charts when using them out of the box on EKS. Here are the issues we saw:
Issues
1. Kafka
Logs:
It looks like the directory is owned by root, but the pod is running as user 1000:
The fix: To get the pod to start, we needed to add this to the pod's
spec:
2. Zookeeper
Logs:
Again, it looks like the directory is owned by root:
The fix: To get the pod to start, we needed to add this to the pod's
spec:
3. Schema registry
The pod fails to start at all with
ContainerCannotRun
:The fix: Override the chart's default
values.yaml
to user 1000:instead of:
Related?
I think this is also related to the following issues: https://github.com/confluentinc/cp-helm-charts/issues/501 https://github.com/confluentinc/cp-helm-charts/issues/497
Do you accept PRs? Happy to submit one to fix these.
Thanks