Enabling CP Subsystem
CP Subsystem is a component of a Hazelcast cluster that builds a strongly consistent layer for a set of distributed data structures. As well as network partitions, the CP Subsystem withstands server and client failures.
See CP Subsystem for more detailed information about the configuration and behavior of CP Subsystem component of Hazelcast.
Configuring CP Subsystem
To enable CP Subsystem you must configure the cpSubsystem
section in the Hazelcast custom resource. All the cluster members will be configured as CP Members.
apiVersion: hazelcast.com/v1alpha1
kind: Hazelcast
metadata:
name: hazelcast
spec:
clusterSize: 3
repository: 'docker.io/hazelcast/hazelcast-enterprise'
licenseKeySecretName: hazelcast-license-key
cpSubsystem:
sessionTTLSeconds: 30
pvc:
accessModes: ["ReadWriteOnce"]
requestStorage: 8Gi
When CP subsystem is enabled, it always enables CP Subsystem Persistence. This means that a PVC must be configured before enabling CP Subsystem.
When the pvc
section is configured in cpSubsystem
, a PVC is created and mounted for the CP Subsystem. If you want to use the same PVC for both Persistence and CP Subsytem, configure the Persistence but do not configure pvc
for the CP Subsystem.
apiVersion: hazelcast.com/v1alpha1
kind: Hazelcast
metadata:
name: hazelcast
spec:
clusterSize: 3
repository: 'docker.io/hazelcast/hazelcast-enterprise'
licenseKeySecretName: hazelcast-license-key
persistence:
pvc:
accessModes: ["ReadWriteOnce"]
requestStorage: 8Gi
cpSubsystem: {}