Configuring Kubernetes Kit
- Packages Inspected during Serialization
- Hazelcast for Session Replication
- Redis for Session Replication
- Backend Session Expiration Policy
Packages Inspected during Serialization
When a session is serialized, Kubernetes Kit inspects classes for transient fields that can be injected during deserialization (see session replication).
Kubernetes Kit provides two properties to limit the packages to be inspected. The include-package
property defines all of the packages that should be inspected. If this is undefined, all packages are assessed. For this reason, it’s recommended that you specify the top-level package for your application in the include-packages
property.
The exclude-package
property lists packages that should not be assessed.
vaadin.serialization.include-packages=com.example.application
vaadin.serialization.exclude-packages=com.example.application.service
Hazelcast for Session Replication
The service-name
property defines the name of the Hazelcast service deployment within a cluster.
The optional namespace
property is used when the Hazelcast service is deployed in a namespace other than default
.
vaadin.kubernetes.hazelcast.service-name=hazelcast-service
vaadin.kubernetes.hazelcast.namespace=namespace
Redis for Session Replication
This property defines the name of the Redis service deployment within a cluster.
spring.data.redis.host: redis-service
Backend Session Expiration Policy
The backend session expiration policy allows you to define an expiration timeout for the backend stored session. By default, no expiration is set. However, expiration can be activated by setting the vaadin.kubernetes.backend-session-expiration-tolerance
property. The property defines the amount of time to be added to the HTTP session timeout to determine the expiration of the backend session. If a time unit is not given, milliseconds is assumed. Another option is to provide a custom SessionExpirationPolicy
bean, which allows you to define a custom expiration timeout, independent of the HTTP session timeout value.
Given an HTTP session timeout of 30 minutes, the session stored in the backend will expire after 35 minutes of inactivity.
vaadin.kubernetes.backend-session-expiration-tolerance: 5m