nack icon indicating copy to clipboard operation
nack copied to clipboard

Resources are not marked as unhealthy when Nack fails to create them

Open Koalk opened this issue 8 months ago • 0 comments

What version were you using?

  • name: nats version: 1.3.4 repository: https://nats-io.github.io/k8s/helm/charts/
  • name: nack version: 0.28.0 repository: https://nats-io.github.io/k8s/helm/charts/

What environment was the server running in?

GKE cluster

Is this defect reproducible?

Create a stream with the following spec

apiVersion: jetstream.nats.io/v1beta2
kind: Stream
metadata:
  name: "test"
  namespace: default
spec:
  name: "test"
  subjects: ['test']
  maxAge: 1d

See that the nack pod throws an error in the logs that looks like: controller.go:682] "Unhandled Error" err="failed to process stream: failed to create stream \"test\": time: unknown unit \"d\" in duration \"1d\"" logger="UnhandledError"

Given the capability you are leveraging, describe your expectation?

If there is an error during the creation of the resources in the nats server, the resource itself should be marked as unhealthy/not ready.

Given the expectation, what is the defect you are observing?

The resource is left with the status of "Creating" as the last event instead of reporting the error. This means that applications like Argo or GKE controllers don't pickup on the problem unless you manually check on the logs of the Nack pod.

Koalk avatar May 08 '25 12:05 Koalk