argoproj / argo-events

Event-driven Automation Framework for Kubernetes
https://argoproj.github.io/argo-events/
Apache License 2.0
2.38k stars 743 forks source link

Only supported versions for jetstreamer "2.8.1" has outdated reloader that doesn't work for ARM #2769

Closed atropos112 closed 1 year ago

atropos112 commented 1 year ago

Describe the bug Previously one had ability to run eventbuses on ARM now they can no longer do this because of the limitation imposed on what version is allowed, namely the limitation now is

failed to get jetstream version, err: unsupported version "latest", supported versions: "2.8.1"

Its not actually the jetstreamer at 2.8.1 that doesn't support ARM but the config-reloader that is running outnatsio/nats-server-config-reloader:0.6.3 instead of say natsio/nats-server-config-reloader:0.12.0 which does support ARM.

To Reproduce Steps to reproduce the behavior: Install argo-events with jetstream as eventbus on arm machine.

Expected behavior It to keep on working on ARM.

Screenshots If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

Additional context I was a bit perplexed if this is a bug or a new feature, but given that something worked and now it doesn't suggests to me that its a bug so I went with that.

There is a "container template" in docs https://github.com/argoproj/argo-events/blob/master/api/event-bus.md#containertemplate where I can change some settings for reloader, image tag is not at my disposal sadly.


Message from the maintainers:

If you wish to see this enhancement implemented please add a 👍 reaction to this issue! We often sort issues this way to know what to prioritize.

whynowy commented 1 year ago

@atropos112 - you are able to update the images in the configuration - https://github.com/argoproj/argo-events/blob/master/manifests/base/controller-manager/controller-config.yaml.

atropos112 commented 1 year ago

Oh so there is a workaround!

So my controller-config looks like this

apiVersion: v1
data:
  controller-config.yaml: |
    eventBus:
      nats:
        versions:
        - version: 0.22.1
          natsStreamingImage: nats-streaming:0.22.1
          metricsExporterImage: natsio/prometheus-nats-exporter:0.9.3
      jetstream:
        # Default JetStream settings, could be overridden by EventBus JetStream specs
        settings: |
          # 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.
          max_memory_store: -1
          max_file_store: -1
        # The default properties of the streams to be created in this JetStream service
        streamConfig: |
          maxMsgs: 1e+06
          maxAge: 72h
          maxBytes: 1GB
          replicas: 3
          duplicates: 300s
        versions:
        - version: 2.8.1
          natsImage: nats:2.8.1
          metricsExporterImage: natsio/prometheus-nats-exporter:0.9.1
          configReloaderImage: natsio/nats-server-config-reloader:0.6.3
          startCommand: /nats-server
kind: ConfigMap
metadata:
  annotations:
    kubectl.kubernetes.io/last-applied-configuration: >
      {"apiVersion":"v1","data":{"controller-config.yaml":"eventBus:\n 
      nats:\n    versions:\n    - version: 0.22.1\n      natsStreamingImage:
      nats-streaming:0.22.1\n      metricsExporterImage:
      natsio/prometheus-nats-exporter:0.9.3\n  jetstream:\n    # Default
      JetStream settings, could be overridden by EventBus JetStream specs\n   
      settings: |\n      #
      https://docs.nats.io/running-a-nats-service/configuration#jetstream\n     
      # Only configure \"max_memory_store\" or \"max_file_store\", do not set
      \"store_dir\" as it has been hardcoded.\n      max_memory_store: -1\n     
      max_file_store: -1\n    # The default properties of the streams to be
      created in this JetStream service\n    streamConfig: |\n      maxMsgs:
      1e+06\n      maxAge: 72h\n      maxBytes: 1GB\n      replicas: 3\n     
      duplicates: 300s\n    versions:\n    - version: 2.8.1\n      natsImage:
      nats:2.8.1\n      metricsExporterImage:
      natsio/prometheus-nats-exporter:0.9.1\n      configReloaderImage:
      natsio/nats-server-config-reloader:0.6.3\n      startCommand:
      /nats-server\n"},"kind":"ConfigMap","metadata":{"annotations":{},"labels":{"app.kubernetes.io/instance":"argo-events","app.kubernetes.io/managed-by":"Helm","app.kubernetes.io/name":"argo-events-controller-manager","app.kubernetes.io/part-of":"argo-events","argocd.argoproj.io/instance":"argo-events","helm.sh/chart":"argo-events-2.4.0"},"name":"argo-events-controller-manager","namespace":"platform"}}
  creationTimestamp: '2023-08-09T20:30:13Z'
  labels:
    app.kubernetes.io/instance: argo-events
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: argo-events-controller-manager
    app.kubernetes.io/part-of: argo-events
    argocd.argoproj.io/instance: argo-events
    helm.sh/chart: argo-events-2.4.0
  name: argo-events-controller-manager
  namespace: platform
  resourceVersion: '749255443'
  uid: f4ed3cbf-2ba5-4b42-88b8-f08d0d338cc2

i am using a helm chart from here https://github.com/argoproj/argo-helm/tree/main/charts/argo-events

which turns out has a setting to adjust that config here https://github.com/argoproj/argo-helm/blob/main/charts/argo-events/templates/argo-events-controller/config.yaml so I can work around this. There the defaults for the versions are

    versions:
      - version: "latest"
        natsImage: nats:latest
        metricsExporterImage: natsio/prometheus-nats-exporter:latest
        configReloaderImage: natsio/nats-server-config-reloader:latest
        startCommand: /nats-server

but it seems "latest" version is not allowed so i have no idea where my 0.6.3 comes from

atropos112 commented 1 year ago

I have an idea now, they come from me, i am entirely at fault here... I apologise for wasting your time.