Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I was experimenting with this idea for toggling safe mode on the operator side.
The idea is to expose pod-level parameters on the Infinispan CR. The offset indexes the target pod. It looks like:
This opens the possibility of including extra parameters in the future.
When the user updates the CR with the
overridesarguments, we intercept that and update the ConfigMap. The idea is to cause anoverrides.envfile to be written in the volume by the operator. This file will look something like:It uses the node's hostname to index all the parameters we define. This file is written in ALL pods in the system, in my example above:
They all have the
overrides.envwith the same content.The second part requires a change on Infinispan's side to search for the
overrides.envfile, parse it, and collect all the options specified by the operator when starting the server.I think this approach also requires the operator to delete the targeted pods to trigger a restart in some cases. If the pod is already in a crash loop state, then it is all good; the pod will restart with safe mode enabled. But if the pod is alive but not ready, toggling safe-mode would require an additional step of forcing the pod restart.