nats-io / nack

NATS Controllers for Kubernetes (NACK)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Jetstream Stream CRD requires mirror, sources and placement

drewcorlin1 opened this issue · comments

When these changes were added to the Stream CRD, mirror, sources and placement became required fields. These changes mean previously working streams as well as the ones suggested by the docs now fail to be created.

NACK logs these errors when previously existing streams are attempted to be created:

E1026 22:30:10.276732       1 controller.go:339] failed to process stream: failed to set "<name>" stream finalizers: Stream.jetstream.nats.io "ingestion-monitoring-attempts-queue" is invalid: [spec.sources: Invalid value: "null": spec.sources in body must be of type array: "null", spec.placement: Invalid value: "null": spec.placement in body must be of type object: "null", spec.mirror: Invalid value: "null": spec.mirror in body must be of type object: "null"]

If possible, I could try to clear out the existing CRDs in your cluster.

kubectl delete crd consumers.jetstream.nats.io
kubectl delete crd streams.jetstream.nats.io
kubectl delete crd streamtemplates.jetstream.nats.io

Then reinstall nack as you did before.

Or without reinstalling, you could apply the latest CRDs from this repo.

kubectl apply -f deploy/crds.yml

We're wondering if this has something to do with the way Helm handles CRDs. We're working towards a better solution.

We will start bumping the versions of the CRDs to avoid this type of incompatibilities, now is at v1beta2.