argoproj / argo-events

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

Eventbus Jetstream not running when version specified #2692

Closed johnhenga closed 1 year ago

johnhenga commented 1 year ago

Problem eventbus not showing up when specifying like this, no pod shows up

This conifiguration is not working apiVersion: argoproj.io/v1alpha1 kind: EventBus metadata: name: default namespace: pmp-lab-1 spec: jetstream: version: "2.8.1" # not working

This configuration is working apiVersion: argoproj.io/v1alpha1 kind: EventBus metadata: name: default namespace: pmp-lab-1 spec: jetstream: version: latest

To Reproduce apply the configuration with kubectl

Expected behavior 3 pods running

Environment (please complete the following information):

whynowy commented 1 year ago

Can you check:

  1. the EventBus object status with kubectl get eb default -o yaml?
  2. the log of the controller?
muffl0n commented 1 year ago

Having the same issue. Tbh, I have no idea where to find versions that are supported. Documentation just states

Do NOT use "latest" but a specific version in your real deployment

But gives no clue, what is supported.

% kubectl get eventbus default -o yaml
apiVersion: argoproj.io/v1alpha1
kind: EventBus
metadata:
  annotations:
    meta.helm.sh/release-name: kanister-argo
    meta.helm.sh/release-namespace: kanister
  creationTimestamp: "2023-07-11T11:08:12Z"
  finalizers:
  - eventbus-controller
  generation: 6
  labels:
    app.kubernetes.io/managed-by: Helm
  name: default
  namespace: kanister
  resourceVersion: "73023842"
  uid: 9a208944-ef62-41f4-aaed-a42084193de1
spec:
  jetstream:
    version: 2.8.1
status:
  conditions:
  - lastTransitionTime: "2023-07-11T11:11:14Z"
    status: "True"
    type: Configured
  - lastTransitionTime: "2023-07-11T11:11:14Z"
    message: 'failed to get jetstream version, err: unsupported version "2.8.1", supported
      versions: "latest"'
    reason: JetStreamStatefulSetFailed
    status: "False"
    type: Deployed
  config: {}
muffl0n commented 1 year ago

Seems like one has to configure the available versions in configmap argo-events-controller-manager:

-> % k get cm argo-events-controller-manager -n argo -oyaml
apiVersion: v1
data:
  controller-config.yaml: |
    eventBus:
      nats:
        versions:
        - version: latest
          natsStreamingImage: nats-streaming:latest
          metricsExporterImage: natsio/prometheus-nats-exporter:latest
        - version: 0.22.1
          natsStreamingImage: nats-streaming:0.22.1
          metricsExporterImage: natsio/prometheus-nats-exporter:0.8.0
      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: latest
          natsImage: nats:latest
          metricsExporterImage: natsio/prometheus-nats-exporter:latest
          configReloaderImage: natsio/nats-server-config-reloader:latest
          startCommand: /nats-server
kind: ConfigMap
metadata:
  annotations:
    meta.helm.sh/release-name: argo-events
    meta.helm.sh/release-namespace: argo
  creationTimestamp: "2023-07-06T09:09:53Z"
  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
    helm.sh/chart: argo-events-2.3.3
  name: argo-events-controller-manager
  namespace: argo
  resourceVersion: "66746986"
  uid: c666559d-3d02-41fa-8a5a-ee3d3c207b6c

See

whynowy commented 1 year ago

Seems like one has to configure the available versions in configmap argo-events-controller-manager:

-> % k get cm argo-events-controller-manager -n argo -oyaml
apiVersion: v1
data:
  controller-config.yaml: |
    eventBus:
      nats:
        versions:
        - version: latest
          natsStreamingImage: nats-streaming:latest
          metricsExporterImage: natsio/prometheus-nats-exporter:latest
        - version: 0.22.1
          natsStreamingImage: nats-streaming:0.22.1
          metricsExporterImage: natsio/prometheus-nats-exporter:0.8.0
      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: latest
          natsImage: nats:latest
          metricsExporterImage: natsio/prometheus-nats-exporter:latest
          configReloaderImage: natsio/nats-server-config-reloader:latest
          startCommand: /nats-server
kind: ConfigMap
metadata:
  annotations:
    meta.helm.sh/release-name: argo-events
    meta.helm.sh/release-namespace: argo
  creationTimestamp: "2023-07-06T09:09:53Z"
  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
    helm.sh/chart: argo-events-2.3.3
  name: argo-events-controller-manager
  namespace: argo
  resourceVersion: "66746986"
  uid: c666559d-3d02-41fa-8a5a-ee3d3c207b6c

See

This is right. We can not track all the available versions from upstream, but you can update it for your deployment.

whynowy commented 1 year ago

I believe this can be closed, please reopen if necessary.

muffl0n commented 1 year ago

I was hoping to find the time to write some documentation for this part. Or is there already some I'm missing?

whynowy commented 1 year ago

I was hoping to find the time to write some documentation for this part. Or is there already some I'm missing?

Good point, I think the doc is missing, could you please send a PR for it? Appreciate!

atticus-rippling commented 3 months ago

Good point, I think the doc is missing, could you please send a PR for it? Appreciate!

Updating the doc, as I just ran into this: https://github.com/argoproj/argo-events/pull/3170