lsst-sqre / strimzi-registry-operator

A Kubernetes Operator for running the Confluent Schema Registry with a Strimzi-based Kafka cluster
MIT License
82 stars 17 forks source link

Require the SchemaSchemaRegistry to include the strimzi.io/cluster annotation (and user?) #85

Open jonathansick opened 1 year ago

jonathansick commented 1 year ago

Via https://github.com/lsst-sqre/strimzi-registry-operator/issues/77#issuecomment-1333324699 its clear it'd be useful for the StrimziSchemaRegistry resource to be more explicit about the Kafka cluster it was related to. Right now the cluster name is gleaned from the StrimziUser's annotation. It would be less magical, and therefore easier to debug, if this configuration was more explicit on the StrimziSchemaRegistry itself. For example:

apiVersion: roundtable.lsst.codes/v1beta1
kind: StrimziSchemaRegistry
metadata:
  name: confluent-schema-registry
  labels:
    strimzi.io/cluster: events
spec:
  listener: tls

Potentially the KafkaUser should even be configured explicitly too, rather than being the same name as the StrimziSchemaRegistry resource. I'm not aware of an annotation for this; potentially it could be a configuration (in the spec) instead.