-
Hi everyone, I am trying to deploy the Stackable Operator for Apache NiFi solution on an OpenShift cluster. I need to enforce some security directives through scc (securityContextConstraints). I have deployed with helm declaring said directives when installing: And everything went well with the operator Pod, but the nodes are not deployed with those properties (runAsUser and NonRoot). How can I make the nodes also have those properties when they are created? The error I get is: Regards, and thank you very much, |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
I am going to use OPA Gatekeeper to mutate the pods and thus get the desired security values: apiVersion: mutations.gatekeeper.sh/v1
kind: Assign
metadata:
name: scc
spec:
applyTo:
- groups: [""]
kinds: ["Pod"]
versions: ["v1"]
match:
scope: Namespaced
kinds:
- apiGroups: ["*"]
kinds: ["Pod"]
namespaces: ["nifi-stackable"]
location: "spec.containers[name:*].securityContext"
parameters:
assign:
value:
privileged: false
runAsNonRoot: true
runAsUser: 1000669988 It's works!!! Now I am trying to modify zookeeper-operator so that it, as well as the zookeeper nodes that it raises, use the UID I choose and not uid 1000 (by default). If not, it gives a permissions error on boot. So I'm compiling with: RUN groupadd -g 1000669988 stackable && adduser -u 1000669988 -g stackable -c 'Stackable Operator' stackable and I want to point to a private repository to use the images that HELM will deploy. |
Beta Was this translation helpful? Give feedback.
-
Hello @grandeon , sorry for taking so long to reply. Your message has somehow went unnoticed until today. Sorry for that. We are currently working on getting all our operators and supported products to run on OpenShift. We didn't get to Nifi yet but ZooKeeper should work out of the box. The operator will create a service account for each ZooKeeper cluster and that account has an SCC attached to it. Why do you need that particular user id for your cluster? Stackable supported products don't need to run as root and can run with any user id that is generated by OpenShift (there are some exceptions) |
Beta Was this translation helpful? Give feedback.
Hello @grandeon ,
sorry for taking so long to reply. Your message has somehow went unnoticed until today. Sorry for that.
We are currently working on getting all our operators and supported products to run on OpenShift. We didn't get to Nifi yet but ZooKeeper should work out of the box. The operator will create a service account for each ZooKeeper cluster and that account has an SCC attached to it.
Why do you need that particular user id for your cluster? Stackable supported products don't need to run as root and can run with any user id that is generated by OpenShift (there are some exceptions)