Skip to content

Release v0.2.0

Compare
Choose a tag to compare
@wallyqs wallyqs released this 19 Nov 17:42
29bc332

Added

  • Add template field to be able to customize pod spec for a NATS Streaming pod.

    ---
    apiVersion: "streaming.nats.io/v1alpha1"
    kind: "NatsStreamingCluster"
    metadata:
      name: "example-stan-pv"
    spec:
      natsSvc: "example-nats"
    
      config:
        storeDir: "/pv/stan"
    
      # Define custom service account for pods
      template:
        spec:
          serviceAccountName: "admin"
  • Add storeDir configuration fields, which can be used to point to persistent volume mount for example.

    ---
    apiVersion: "streaming.nats.io/v1alpha1"
    kind: "NatsStreamingCluster"
    metadata:
      name: "example-stan-pv"
    spec:
      natsSvc: "example-nats"
    
      config:
        storeDir: "/pv/stan"
    
      # Define mounts in the Pod Spec
      template:
        spec:
      volumes:
      - name: stan-store-dir
        persistentVolumeClaim:
          claimName: streaming-pvc
      containers:
        - name: nats-streaming
          volumeMounts:
          - mountPath: /pv
            name: stan-store-dir
  • Added store and configFile configuration option which can be used to choose storage backend to be an SQL store and load DB credentials securely as part of a secret.

    ---
    apiVersion: "streaming.nats.io/v1alpha1"
    kind: "NatsStreamingCluster"
    metadata:
      name: "example-stan-db"
    spec:
      natsSvc: "example-nats"
    
      # Explicitly set that the managed NATS Streaming instance
      # will be using an SQL storage, to ensure that only a single
      # instance is available.
      store: SQL
    
      # In order to use DB store support, it is needed to include
      # the credentials as a secret on a mounted file.
      configFile: "/etc/stan/config/secret.conf"
    
      # Define Pod Spec
      template:
        spec:
      volumes:
      - name: stan-secret
        secret:
          secretName: stan-secret
      containers:
        - name: nats-streaming
          volumeMounts:
          - mountPath: /etc/stan/config
            name: stan-secret
            readOnly: true
  • Added debug, trace, raftLogging flags to increase verbosity of the logs.'

    ---
    apiVersion: "streaming.nats.io/v1alpha1"
    kind: "NatsStreamingCluster"
    metadata:
      name: "example-stan"
    spec:
      # Number of nodes in the cluster
      size: 3
    
      # NATS Streaming Server image to use, by default
      # the operator will use a stable version
      # 
      # image: "nats-streaming:latest"
    
      # Service to which NATS Streaming Cluster nodes will connect.
      # 
      natsSvc: "example-nats"
    
      config:
        debug: true
        trace: true
        raftLogging: true

Changed

  • Changed pod restart policy to be on failure, though can still be
    overriden via the template.

  • Internals were rewritten to use typed clients instead of Operator SDK which currently still alpha.