-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Disable world write access on directories #48
Conversation
@andrewegel This change makes it unable to run the images on Openshift without elevated Openshift permissions. Openshift runs the container as a random user/uid. Making the
|
@erikgb Whats the technical reason why you can't run this as the I don't see a scenario where we can support both requirements:
If this were being ran by true root, root could write to it:
But your situation shows precisely what this PR was trying to fix: Which was unknown users should not have write access in the container. To a certain extent, we called this out in the changelog: https://docs.confluent.io/platform/6.2.2/release-notes/changelog.html#cp-docker-images
These updates were tested with openshift before release and testing didn't run into these issues. |
@andrewegel The reason we can't run as How do you test this in OpenShift? Is it running with the "restricted" SCC or an elevated permission, like Our current situation, is that we have to "patch" all Confluent images, since they do not work in our Openshift-context. And this is painful and something we would like to avoid. Our "patch" for the schema-registry image is:
But we also had to patch rest-proxy and multiple connect images equivalently. 😓 And that represents a maintenance burden for us. Would you consider to change the ownership to An OpenShift reference: https://cloud.redhat.com/blog/a-guide-to-openshift-and-uids |
And even the simplest Deployment is failing on OpenShift: kind: Deployment
apiVersion: apps/v1
metadata:
name: cp-sr
labels:
app: cp-sr
spec:
replicas: 1
selector:
matchLabels:
app: cp-sr
template:
metadata:
labels:
app: cp-sr
spec:
containers:
- name: app
image: confluentinc/cp-schema-registry:6.2.2
ports:
- name: app
containerPort: 8081
protocol: TCP
env:
- name: SCHEMA_REGISTRY_KAFKASTORE_BOOTSTRAP_SERVERS
value: 'PLAINTEXT://kafka:9092'
- name: SCHEMA_REGISTRY_LISTENERS
value: 'http://0.0.0.0:8081'
- name: SCHEMA_REGISTRY_HOST_NAME
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: status.podIP As for your testing on OpenShift, I would expect a Deployment like this to successfully run on OpenShift. |
Firstly, lets open a separate issue and move the conversation to there. Secondary, contact Confluent's support and have them escalate to the Operator team who have conducted these tests on an OpenShift cluster. Your change of moving to |
And I'm locking this PR's conversation so issues can be raised and tracked elsewhere. |
Furthermore @erikgb - If you don't want to go through the Confluent Support route, join the |
Disables world write access on directories.