kafka-ops / julie

A solution to help you build automation and gitops in your Apache Kafka deployments. The Kafka gitops!
MIT License
421 stars 114 forks source link

Supporting different free-text attributes in different descriptor files when building for Optimised ACLs #461

Open grampurohitp opened 2 years ago

grampurohitp commented 2 years ago

Is your feature request related to a problem? Please describe. We are trying to use different free-text attributes when using multiple descriptor files, but looks like the Optimised ACLs are not what we expect.

This is an issue only when using multiple descriptor files and the ACLs are optimised, but not when creating Literal ACLs.

Steps to reproduce the behaviour:

  1. Create 2 descriptor files: julie.yaml
    context: "com"
    manager: "julie"
    projects:
    - name: "car"
    consumers:
      - principal: "User:123456"
    topics:
      - name: "topicA"
        schemas:
          value.schema.file: "/tmp/julieops/schemas/foo-value.avsc"
        config:
          replication.factor: "3"
          num.partitions: "1"

internal.yaml

context: "com"
manager: "internal"
projects:
  - name: "bus"
    consumers:
      - principal: "User:123456"
    topics:
      - name: "topicB"
        schemas:
          value.schema.file: "/tmp/julieops/schemas/foo-value.avsc"
        config:
          replication.factor: "3"
          num.partitions: "1"
  1. Make sure to set the property topology.acls.optimized=true in the config file
  2. Run Julie by specifying the directory that holds the above descriptors as input to --topology parameter
  3. Verify the bindings created

Expected behavior: Prefixed ACLs should be created for: com.julie.car and com.internal.bus, but the Prefixed ACLs are created for com.internal.bus and com.internal.car

Describe the solution you'd like The ACLs are created as expected when the configuration is set as topology.acls.optimized=true

Describe alternatives you've considered N/A

Additional context N/A