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

Document Karaf's ConfigAdmin property injection from ConfigMap

    XMLWordPrintable

Details

    • % %

    Description

      We need to note in the documentation that to use ConfigMap as source of properties, the OSE's service account needs to have at least view role added.

      Example command

      oc policy add-role-to-user view system:serviceaccount:<namespace>:default
      

      In addition ConfigMap has to be labeled with "fabric8.pid", where this values corresponds with value of "persistent-id" in propertyPlaceholder element

      sample ConfigMap

              {
                  "kind": "ConfigMap",
                  "apiVersion": "v1",
                  "metadata": {
                      "name": "camel-servlet-cm",
                      "namespace": "dsimansk",
                      "selfLink": "/api/v1/namespaces/dsimansk/configmaps/camel-servlet-cm",
                      "uid": "307cbee3-7b3e-11e6-984f-fa163ed7c622",
                      "resourceVersion": "636784",
                      "creationTimestamp": "2016-09-15T12:16:11Z",
                      "labels": {
                          "fabric8.pid": "com.redhat.xpaas.camel.servlet.config"
                      }
                  },
                  "data": {
                      "alias": "services"
                  }
              }
      

      Sample from blueprint.xml

      	<cm:property-placeholder persistent-id="com.redhat.xpaas.camel.servlet.config" id="props" update-strategy="reload">
      		<cm:default-properties>
      			<cm:property name="alias" value=""/>
      		</cm:default-properties>
      	</cm:property-placeholder>
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              dsimansk@redhat.com David Simansky
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: