nats-io / nats-streaming-operator

NATS Streaming Operator
Apache License 2.0
174 stars 44 forks source link

Add option to switch to FT mode #60

Closed wallyqs closed 4 years ago

wallyqs commented 4 years ago

This adds an option to enable using fault tolerance mode for the case when using shared storage.

---
apiVersion: "streaming.nats.io/v1alpha1"
kind: "NatsStreamingCluster"
metadata:
  name: "stan"
spec:
  natsSvc: "nats"
  size: 3

  image: "nats-streaming:latest"

  config:
    storeDir: "/pv/stan"

    # When this option is introduced, the servers are restarted
    # one by one until they are all running with ft mode.
    ftGroup: "stan"

  # Define mounts in the Pod Spec
  template:
    spec:
      volumes:
      - name: stan-store-dir
        persistentVolumeClaim:
          claimName: efs2
      containers:
        - name: nats-streaming
          volumeMounts:
          - mountPath: /pv
            name: stan-store-dir

Signed-off-by: Waldemar Quevedo wally@synadia.com