Skip to content
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

any possibility to include a cache .json with a schema during pod launch? #84

Open
makdeniss opened this issue Jul 7, 2023 · 3 comments

Comments

@makdeniss
Copy link

So I have a quarkus pod that is starting after my infinispan pod is successfully up.
I would like infinispan to have a specific cache schema already in place when its created / restarted / whatever.
Is there a property in chart I can use to supply a json structure / file to do this?

@ryanemerson
Copy link
Contributor

ryanemerson commented Jul 7, 2023

@makdeniss By Cache schema do you mean a cache instance, e.g. distributed-cache, replicated-cache, that will be available on server startup?

If so, it's possible to define these in the values.yaml under deploy.infinispan. For example:

deploy:
  ...
  infinispan:
    cacheContainer:
      # [USER] Add cache, template, and counter configuration.
      name: default
      # [USER] Specify `security: null` to disable security authorization.
      security:
        authorization: {}
      transport:
        cluster: ${infinispan.cluster.name:cluster}
        node-name: ${infinispan.node.name:}
        stack: kubernetes
      # Define one or more caches
      caches:
        mycacheone:
          distributedCache:
            mode: "ASYNC"
        mycachetwo:
          distributedCache:
            mode: "SYNC"
    server:
      ...

The defined caches will be created on server startup.

@makdeniss
Copy link
Author

@ryanemerson thanks for the reply. And what about protobuf schemas? is it possible to pre-create these through chart on pod startup?

@ryanemerson
Copy link
Contributor

@makdeniss Proto schemas can be registered with an infinispan server on startup by adding a .jar containing SerializationContextInitializer implementations to the server's server/lib directory.

In the helm charts the easiest way to do this is to provide the artifacts via deploy.container.libraries, e.g. deploy.container.libraries=org.postgresql:postgresql:42.3.1. This property allows artifacts to be downloaded via maven, http or ftp.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants