Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-8779

Enhance fabric8-karaf-cm configadmin bridge filters to operate as OR as well as AND

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: FIS 2.0
    • Fix Version/s: fuse-7.0
    • Component/s: FIS-Fabric8
    • Labels:
      None
    • Sprint:
      Fuse 7.0 Sprint 24, Fuse 7.0 Sprint 26

      Description

      currently by using fabric8.pid.filters, i am able to filter config maps on certain labels. but it gets complicated when my project requires multiple karaf pids and i want to share config map that i would like to use on different karaf based microcontainers.

      ConfigMap-Datasource with labels: karaf.pid=datasource.cfg, database.name=my.oracle.datasource
      ConfigMap-App-A with labels: karaf.pid=app1.cfg, appName=A
      ConfigMap-App-B with labels: karaf.pid=app2.cfg, appName=B

      In the above case, if i want to use the shared config map in karaf, i will not be able to use -Dfabric8.pid.filters=appName=A,database.name=my.oracle.datasource. KubernetesConfigAdminBridge uses kubernatesClient.getConfigMaps.withLabels(filters), which acts like an 'AND' condition and returns no configMaps at all.

      I could add the label appName=A to ConfigMap-Datasource and use -Dfabric8.pid.filters=appName=A to overcome this challenge, but if App-B, App-C, and all other apps want to use the same configuration, adding multiple labels for each app to ConfigMap-Datasource is not a good option.

      Instead there should be some kind of a functionality that uses 'withLabelIn(key, value...)' method such as -Dfabric8.pid.filter.in=karaf.pid=app1.cfg,datasource.cfg. This way I can bind any number of ConfigMaps to any number of karaf instances by simply referencing with their karaf.pid.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  Unassigned
                  Reporter:
                  roddiekieley Roddie Kieley
                  Tester:
                  Lukas Lowinger
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  9 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: