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

    • Bug
    • Resolution: Done
    • Major
    • fuse-7.0
    • FIS 2.0
    • FIS-Fabric8
    • None
    • Compatibility/Configuration, User Experience
    • % %
    • 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.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              rhn-support-rkieley Roderick Kieley
              Lukas Lowinger Lukas Lowinger
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: