Uploaded image for project: 'AMQ Streams'
  1. AMQ Streams
  2. ENTMQST-5371

KafkaTopic is not create if the "spec:" is missing.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Undefined Undefined
    • None
    • 2.5.0.GA
    • topic-operator
    • None
    • False
    • None
    • False
    • Low
    • Workaround Exists
    • Hide

      Align the "spec:" section properly

      kafka-topic-empty.yaml 
      apiVersion: kafka.strimzi.io/v1beta2
      kind: KafkaTopic
      metadata:
        name: my-topic-empty
        labels:
          strimzi.io/cluster: my-cluster
      spec: {}
      Show
      Align the "spec:" section properly kafka-topic-empty.yaml  apiVersion: kafka.strimzi.io/v1beta2 kind: KafkaTopic metadata:   name: my-topic-empty   labels:     strimzi.io/cluster: my-cluster spec: {}

       

      apiVersion: kafka.strimzi.io/v1beta2
      kind: KafkaTopic
      metadata:
        name: my-topic-empty
        labels:
          strimzi.io/cluster: my-cluster
        spec:
          partitions: 1
          replicas: 1
          config:
            retention.ms: 7200000
            segment.bytes: 1073741824
       

      Notice the "spec:" section is within the "metadata:" section, notice the kafka topic is not being created (Ready: , Partitions, Replication Factor are all empty)

      $ oc get kt
      NAME                          CLUSTER      PARTITIONS   REPLICATION FACTOR   READY
      my-topic-empty                my-cluster                                     

      This is no status indicate the topic is not created properly

      $ oc get kt my-topic-empty -oyaml 
      apiVersion: kafka.strimzi.io/v1beta2
      kind: KafkaTopic
      metadata:
        creationTimestamp: "2023-10-16T02:11:04Z"
        generation: 1
        labels:
          strimzi.io/cluster: my-cluster
        name: my-topic-empty
        namespace: xxxxx
        resourceVersion: "83321720"
        uid: 22e2b158-6f89-4c7d-8293-588348082a2e

      The expectation is either

      1. Create the topic with "kafka cluster" default setting, that is the same behavior as "spec: {}"
      2. Provide better error message the "spec:" is missing. 

       

              Unassigned Unassigned
              rhn-support-whui Roger Hui
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: