apiVersion: v1
kind: ConfigMap
metadata:
  name: numaflow-controller-config
data:
  controller-config.yaml: |
    # Within a cluster, setting "instance" can be used to run N Numaflow controllers. 
    # If configured, the controller will only watch the objects having an annotation with the key "numaflow.numaproj.io/instance" and the corresponding value.
    # If not configured (or empty string), the controller will watch all objects.
    instance: ""
    defaults:
      containerResources: |
        requests:
          memory: "128Mi"
          cpu: "100m"
    isbsvc:
      jetstream:
        # Default JetStream settings, could be overridden by InterStepBufferService specs
        settings: |
          # https://docs.nats.io/running-a-nats-service/configuration#limits
          # Only support to configure "max_payload".
          # Max payload size, defaults to 1 MB. It is not recommended to use values over 8MB but max_payload can be set up to 64MB.
          max_payload: 1048576
          # https://docs.nats.io/running-a-nats-service/configuration#jetstream
          # Only configure "max_memory_store" or "max_file_store", do not set "store_dir" as it has been hardcoded.
          # e.g. 1G. -1 means no limit, up to 75% of available memory. This only take effect for streams created using memory storage.
          max_memory_store: -1
          # e.g. 20G. -1 means no limit, Up to 1TB if available
          max_file_store: 1TB
        bufferConfig: |
          # The default properties of the buffers (streams) to be created in this JetStream service
          stream:
            # 0: Limits, 1: Interest, 2: WorkQueue
            retention: 0
            maxMsgs: 2000000
            maxAge: 168h
            maxBytes: -1
            # 0: File, 1: Memory
            storage: 0
            replicas: 3
            duplicates: 60s
          # The default consumer properties for the created streams
          consumer:
            ackWait: 60s
            maxAckPending: 20000
          otBucket:
            maxValueSize: 0
            history: 1
            ttl: 72h
            maxBytes: 0
            # 0: File, 1: Memory
            storage: 0
            replicas: 3
          procBucket:
            maxValueSize: 0
            history: 1
            ttl: 72h
            maxBytes: 0
            # 0: File, 1: Memory
            storage: 0
            replicas: 3
        versions:
        - version: latest
          natsImage: nats:2.8.3
          metricsExporterImage: natsio/prometheus-nats-exporter:0.9.1
          configReloaderImage: natsio/nats-server-config-reloader:0.7.0
          startCommand: /nats-server
        - version: 2.8.1
          natsImage: nats:2.8.1
          metricsExporterImage: natsio/prometheus-nats-exporter:0.9.1
          configReloaderImage: natsio/nats-server-config-reloader:0.7.0
          startCommand: /nats-server
        - version: 2.8.1-alpine
          natsImage: nats:2.8.1-alpine
          metricsExporterImage: natsio/prometheus-nats-exporter:0.9.1
          configReloaderImage: natsio/nats-server-config-reloader:0.7.0
          startCommand: nats-server
        - version: 2.8.3
          natsImage: nats:2.8.3
          metricsExporterImage: natsio/prometheus-nats-exporter:0.9.1
          configReloaderImage: natsio/nats-server-config-reloader:0.7.0
          startCommand: /nats-server
        - version: 2.8.3-alpine
          natsImage: nats:2.8.3-alpine
          metricsExporterImage: natsio/prometheus-nats-exporter:0.9.1
          configReloaderImage: natsio/nats-server-config-reloader:0.7.0
          startCommand: nats-server
        - version: 2.9.1
          natsImage: nats:2.9.1
          metricsExporterImage: natsio/prometheus-nats-exporter:0.9.1
          configReloaderImage: natsio/nats-server-config-reloader:0.7.0
          startCommand: /nats-server
