-
Notifications
You must be signed in to change notification settings - Fork 308
Move default image from CRD spec to command line flag #858
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
Conversation
Instead of the default image for RabbitmqClusters being hard-coded into the CRD, it is now available as a command-line flag to the operator's `manager` binary. Changing the operator's Deployment manifest to call `/manager --default-rabbitmq-image image:tag` will now cause all RabbitmqClusters deployed by the operator to use that default image if one is not specified in `spec.image`. This closes #856
This is useful to test specific values for the operator. For example, to test different values to `-default-rabbitmq-image`. Signed-off-by: Aitor Perez Cedres <[email protected]>
Zerpet
left a comment
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.
Approving after doing acceptance and adding my own commit to the Makefile 🙈
|
Thank you so much for the PR! Just leaving a note in case it is useful. When testing the Contour Operator (another operator that we have in our catalog) in our CI/CD, we found that in some Marketplaces like Azure Marketplace or AWS Marketplace the provided examples would not work out of the box because the imagePullSecrets were missing. In this sense, it is likely that this will happen with the RabbitMQ Cluster Operator as well (rigth now we are rendering the imagePullSecrets in the CRD but we want to get rid of templating the CRD), would it make sense to also allow setting a list of default imagePullSecrets to be set when deploying the RabbitMQCluster instance? Otherwise, all users that would use the RabbitMQ Cluster Operator chart from Azure Marketplace or similar (which require imagePullSecrets) would not be able to run the default examples unless they specify the secrets. Thoughts? |
This follows the same path as #858, and allows for easier helm integration
Summary Of Changes
Instead of the default image for RabbitmqClusters being hard-coded into
the CRD, it is now available as a command-line flag to the operator's
managerbinary. Changing the operator's Deployment manifest to call/manager --default-rabbitmq-image image:tagwill now cause allRabbitmqClusters deployed by the operator to use that default image if
one is not specified in
spec.image.This closes #856
Note to reviewers: remember to look at the commits in this PR and consider if they can be squashed
Additional Context
This change will make it easier to deploy the operator using helm - the CRD itself will no longer change when bumping the default image, and so the raw CRD manifest can be placed in the
crd/directory, while still allowing the default image to be configurable on a per-operator-Deployment scope.Local Testing
Please ensure you run the unit, integration and system tests before approving the PR.
To run the unit and integration tests:
You will need to target a k8s cluster and have the operator deployed for running the system tests.
For example, for a Kubernetes context named
dev-bunny: