Uploaded image for project: 'Service Binding'
  1. Service Binding
  2. APPSVC-529

Parse binding annotations/descriptors of elementType=sliceOfMaps

XMLWordPrintable

      A Sample CR : The Kubernetes resource that the application would bind to

          apiVersion: apps.kube.io/v1beta1
          kind: Database
          metadata:
          name: my-cluster
          spec:
          ...
          status:
              bootstrap:   
                  - type: plain   
          	      url: myhost2.example.com
                    name: hostGroup1
                  - type: tls
          	      url: myhost1.example.com:9092,myhost2.example.com:9092
                    name: hostGroup2
              data:
                  dbConfiguration: database-config  # configmap 
                  dbCredentials: database-cred-Secret # Secret
                  url: db.stage.ibm.com
      

      Use specific elements from the CR’s “status.bootstrap” to produce key/value pairs in the binding Secret
      Requirement:

      Annotation

      “servicebinding.dev/endpoints”:
      "path={.status.bootstrap},elementType=sliceOfMaps,sourceKey=type,sourceValue=url" 
      

      Descriptor

      • path: bootstrap
        x-descriptors:
      • servicebinding:endpoints:elementType=sliceOfMaps:sourceKey=type:sourceValue=url

      Acceptance Criteria

      • Extract a “slice of maps” from the Kubernetes resource and generate multiple fields in the binding Secret.

              Unassigned Unassigned
              shbose Shoubhik Bose
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: