-
Notifications
You must be signed in to change notification settings - Fork 276
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
Support OpenShift #303
Support OpenShift #303
Conversation
@ansd Two things that we've charted about:
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I suggest squashing commits when merging since the commits doesn't add individual features.
One small thing and it's up to you. The initContainer is called 'copy-config', and arguably it is doing way more and whatever it's necessary to set up the rabbitmq-server container. We can rename it.
1. Allow rabbitmq-cluster-operator-role to update rabbitmqclusters/finalizers 2. Do not BlockOwnerDeletion for PVCs 3. Change group owner of mnesia dir to 999 Otherwise, the RabbitMQ process can't write the pid file into the /var/lib/rabbitmq/mnesia/ directory on OpenShift due to permissions denied. Before this commit, mnesia dir was owned by user root and group root. On OpenShift, mnesia does not have rwx bits for everyone due to stricter security constraints: drwxrwx---. 2 root root 6 Aug 20 10:03 mnesia Fixes #234
Fixes #234
Changes:
rabbitmq-cluster-operator-role
to updaterabbitmqclusters/finalizers
BlockOwnerDeletion
for PVCs (as done in Set BlockOwnerDeletion to false on PVCs elastic/cloud-on-k8s#1891)/var/lib/rabbitmq/mnesia/
to999
Docs:
https://github.com/ansd/rabbitmq-website/tree/k8s-openshift (need to create PR)
Testing on OpenShift:
If you don't have an OpenShift cluster available, the easiest way to set one up within a few minutes is CodeReady Containers.
crc setup
crc config set memory 12000
(the default of 8192 MiB is too low to run the RabbitMQ operator and a RabbitMQ cluster instance since there isn't much memory left when starting crc)crc start
eval $(crc oc-env)
oc login -u kubeadmin -p <password> https://api.crc.testing:6443
make deploy-dev
oc edit namespace rabbitmq-system
Change theuid-range
andsupplemental-groups
for the operator:uid-range
andsupplemental-groups
for RabbitMQ (here we assume that the RabbitMQ cluster gets deployed into thedefault
namespace):oc edit namespace default
kubectl rabbitmq create test
in thedefault
namespace.Fixed by change 1 above.
Fixed by change 2 above.
Fixed by change 3 above.
I tested the above steps with the changes on this branch against