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
Cache CRD #224
Comments
@rigazilla What is the relation between
Do you have some examples that would require to instantiate differently configured Infinispan clusters? It would be good to have some reasonable default specified as part of the issue too. Btw. I like the way you solved getting connection info to the user. |
I was thinking to force them to be exclusive or one to override the other, but your option is good too if the template doesn't exist on the cluster (or the cluster is new)
I'm referring to proper cache options like the 'number of owners' or 'maximum size'...
thank you :) |
Hi @slaskawi, this is the issue for the cache CRD, please share here anything |
I think there might be a better way than submitting XML. If I'm not mistaken, we can define a I think it's a clever way of pushing the responsibility for JSON representation to a user (and Infinispan Servier). Let me experiment a little bit with it. |
I agree with @slaskawi, it'd be better to have something other than XML. However, a few weeks back I was trying out sending JSON as configuration, which @gustavonalle had pointed me to, but we need to improve that experience because it didn't feel easy to figure out what's the right JSON for a given XML. I was in a bit of a rush so I went with XML for my examples (HTTP REST calls), which are just as fine. |
I agree with @Crumby, it'd be good for template and xml to work together. So if XML is not present, create a cache out of an existing template, otherwise create the cache with the XML and create a cache too. One more thing, as also hinted by @Crumby, there probably needs to be a link between our current |
How about using labels: we can use selectors with them and we don't need to define any new ad-hoc field. |
@galderz I think, this is more a documentation issue, right? A user should know how the JSON Cache configuration representation should look like.
@galderz I think it's possible. But do you really want to support 2 exchangeable formats out of the box? To me, this increases maintenance burden and gives nothing back.
@rigazilla Yes, in general I prefer labels approach, similar to what we did for Keycloak: https://github.com/keycloak/keycloak-operator/blob/master/deploy/crds/keycloak.org_keycloakrealms_crd.yaml#L34 |
If we could implement the policy above with JSON, I think it's ok to have just one format as first step. |
Not only documentation IMO. Sure, documentation should explain what a JSON Cache configuration looks like. But aside from that, many users might have XML configuration today and they'd want the JSON version for that, e.g. create cache calls via curl are much less verbose with JSON vs XML. There should be a way to provide XML and spit out JSON that works. Taking this further, I'd skip JSON and allow YAML configuration to be included directly? Since the CRD is yaml, you can take a subset of it and be it the YAML configuration? YAML is even less verbose.
Good point, if I had to choose one I'd go for the option of just embedding the YAML (instead of XML) of the configuration for the cache. The template option could come later if really needed. In fact, for templates to work, the user would have had to add them in advance to an existing cluster, so maybe that could an independent CR, e.g. CacheTemplate CR? |
Implement a new Custom Resource Definition Cache that looks like this:
With the following behaviour:
if an Infinispan cluster named
mycluster
is not present the operator must create it with a configuration that fits the cache needs.The operator must create the cache
mycache
and return in status.connectionInfo the correct info on how to use it.The text was updated successfully, but these errors were encountered: