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

Binding using annotation with elementType=sliceOfStrings fails with `unsupported type` error

XMLWordPrintable

    • Sprint 192

      Given a CRD is annotated with the service binding annotation using the `sliceOfStrings` element type such as:

      ...
      metadata:
         annotations:
            service.binding/tags: path={.spec.tags},elementType=sliceOfStrings
      

      and the CR's spec contains the following data:

      ...
      kind: Backend
      ...
      spec:
         tags:
            - knowledge
            - is
            - power
      

      when a service binding is created to bind the service CR to an application I'd expect that the application would be enriched with the following env variables by the binding:

      BACKEND_TAGS_0=knowledge
      BACKEND_TAGS_1=is
      BACKEND_TAGS_2=power
      

      However the following error is being thrown instead:

      2020-10-14T13:28:35.086+0200	ERROR	controller-runtime.controller	Reconciler error	{"controller": "servicebinding-controller", "request": "service-binding-demo/binding-request", "error": "unsupported type"}
      github.com/go-logr/zapr.(*zapLogger).Error
      	/home/pmacik/.go/src/github.com/redhat-developer/service-binding-operator/vendor/github.com/go-logr/zapr/zapr.go:128
      sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler
      	/home/pmacik/.go/src/github.com/redhat-developer/service-binding-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:258
      sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem
      	/home/pmacik/.go/src/github.com/redhat-developer/service-binding-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:232
      sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).worker
      	/home/pmacik/.go/src/github.com/redhat-developer/service-binding-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:211
      k8s.io/apimachinery/pkg/util/wait.JitterUntil.func1
      	/home/pmacik/.go/src/github.com/redhat-developer/service-binding-operator/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:152
      k8s.io/apimachinery/pkg/util/wait.JitterUntil
      	/home/pmacik/.go/src/github.com/redhat-developer/service-binding-operator/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:153
      k8s.io/apimachinery/pkg/util/wait.Until
      	/home/pmacik/.go/src/github.com/redhat-developer/service-binding-operator/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:88
      

            pmacik@redhat.com Pavel Macik
            pmacik@redhat.com Pavel Macik
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: