Skip to content
This repository has been archived by the owner on Apr 4, 2024. It is now read-only.

Commit

Permalink
disable olm descriptor support (redhat-developer#1251)
Browse files Browse the repository at this point in the history
This was causing performance issues under OCP 4.11.

Signed-off-by: Andy Sadler <[email protected]>
  • Loading branch information
sadlerap authored and pmacik committed Oct 7, 2022
1 parent a3ca007 commit c23a4ae
Show file tree
Hide file tree
Showing 16 changed files with 7 additions and 1,169 deletions.
10 changes: 4 additions & 6 deletions docs/userguide/modules/ROOT/pages/intro.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,18 @@ With {servicebinding-title}, you can:
*Exposal of binding data from services*

* Based on annotations present in CRD, custom resources (CRs), or resources.
* Based on descriptors present in Operator Lifecycle Manager (OLM) descriptors.
* Project secrets and services following the Provisioned Service standard.
*Workload projection*

* Projection of binding data as files, with a volume mounts.
* Projection of binding data as files, with a volume mount.
* Projection of binding data as environment variables.
*Service Binding Options*

* Bind backing services in a namespace that is different from the workload namespace.
* Project binding data into the specific container workloads.
* Auto-detection of the binding data from resources owned by the backing service CR.
* Auto-detection of the binding data from resources owned by the backing service CR.
* Change the binding names before projecting them into workload.
* Compose custom binding data from the exposed binding data.
* Support for non-`PodSpec` compliant workload resources.
Expand All @@ -71,7 +71,7 @@ By using the {servicebinding-title}, as an application developer, you need to de
The CRD of the {servicebinding-title} supports the following APIs:

* *Service Binding* with the `binding.operators.coreos.com` API group.
+
+
This API is compliant with the Service Binding specification. It is fully supported and considered as the mature API. Use this API in production environments.
* *Service Binding (Spec API Tech Preview)* with the `servicebinding.io` API group.
Expand Down Expand Up @@ -100,5 +100,3 @@ vars
[#referenced-specification]
== Referenced specification
Service Binding Operator supports the https://github.com/k8s-service-bindings/spec[Service Binding Specification for Kubernetes].


Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ While using naming strategies, depending on the expectations or requirements of
* `title`: Converts the character strings where the first letter of each word is capitalized except for certain minor words.
.Predefined naming strategies
Binding names declared through annotations or Operator Lifecycle Manager (OLM) descriptors are processed for their name change before their projection into the workload according to the following predefined naming strategies:
Binding names declared through annotations are processed for their name change before their projection into the workload according to the following predefined naming strategies:

* `none`: When applied, there are no changes in the binding names.
+
Expand Down
1 change: 0 additions & 1 deletion docs/userguide/modules/exposing-binding-data/nav.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,5 @@
** xref:provisioned-service.adoc[]
** xref:direct-secret-reference.adoc[]
** xref:adding-annotation.adoc[]
** xref:olm-descriptors.adoc[]
** xref:detect-bindings.adoc[]
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ You must expose the binding data from the backing service. Depending on your wor
+
** xref:direct-secret-reference.adoc[Direct secret reference]
** xref:adding-annotation.adoc[Declaring binding data through custom resource definition (CRD) or CR annotations]
** xref:olm-descriptors.adoc[Declaring binding data through Operator Lifecycle Manager (OLM) descriptors]
** xref:detect-bindings.adoc[Detection of binding data through owned resources]
Expand All @@ -47,12 +46,9 @@ collection of objects
[#data-model]
== Data model

This section explains the data model used in the annotation and OLM
descriptors. The data model is same for CRD or CR annotations and OLM
descriptors, but the syntax is different, which is explained in the
respective sections.
This section explains the data model used in the annotations.

* `path`: JSONPath template is composed of JSONPath expressions enclosed by curly braces {}.The data model used in the annotations and OLM descriptors follow specific conventions.
* `path`: JSONPath template is composed of JSONPath expressions enclosed by curly braces {}. The data model used in the annotations follow specific conventions.
Service binding annotations must use the following convention:

Expand All @@ -66,8 +62,6 @@ where:
`<NAME>`:: Specifies the name under which the binding value is to be exposed. You can exclude it only when the `objectType` parameter is set to `Secret` or `ConfigMap`.
`<VALUE>`:: Specifies the constant value exposed when no `path` is set.

Although, the data model is the same for custom resource definitions (CRD), custom resource (CR) annotations, and Operator Lifecycle Manager (OLM) descriptors, the syntax for each one differs.

The data model provides the details on the allowed values and semantic for the `path`, `elementType`, `objectType`, `sourceKey`, and `sourceValue` parameters.

.Parameters and their descriptions
Expand Down

This file was deleted.

3 changes: 0 additions & 3 deletions pkg/reconcile/pipeline/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,6 @@ type CRD interface {
HasResource

Bindable

// optional Descriptor attached to ClusterServiceVersion resource
Descriptor() (*CRDDescription, error)
}

// Pipeline context passed to each handler
Expand Down
47 changes: 0 additions & 47 deletions pkg/reconcile/pipeline/context/service/crd_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,8 @@ import (
. "github.com/onsi/ginkgo/extensions/table"
. "github.com/onsi/gomega"
"github.com/redhat-developer/service-binding-operator/pkg/binding"
"github.com/redhat-developer/service-binding-operator/pkg/converter"
v1apiextensions "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/client-go/dynamic/fake"

"github.com/golang/mock/gomock"
Expand Down Expand Up @@ -73,48 +70,4 @@ var _ = Describe("CRD", func() {
crd := &customResourceDefinition{resource: u, client: client}
Expect(crd.IsBindable()).To(BeFalse())
})

It("should be bindable if there are service binding descriptors on CSV", func() {
res := &v1apiextensions.CustomResourceDefinition{}
res.Spec.Names.Kind = "Foo"
res.Name = "foo"
u, err := converter.ToUnstructured(res)
Expect(err).NotTo(HaveOccurred())

serviceGVR := schema.GroupVersionResource{Version: "v1"}

csv := &olmv1alpha1.ClusterServiceVersion{}
csv.Spec.CustomResourceDefinitions.Owned = []olmv1alpha1.CRDDescription{
{
Name: u.GetName(),
Version: serviceGVR.Version,
Kind: "Foo",
StatusDescriptors: []olmv1alpha1.StatusDescriptor{
{
Path: "foo",
XDescriptors: []string{"urn:alm:descriptor:io.kubernetes:Secret", "service.binding:username:sourceValue=username"},
},
{
Path: "bar",
XDescriptors: []string{"bar"},
},
{
Path: "foo2",
XDescriptors: []string{"urn:alm:descriptor:io.kubernetes:Secret", "service.binding:username2:sourceValue=username"},
},
},
},
}
ucsv, err := converter.ToUnstructured(csv)
Expect(err).NotTo(HaveOccurred())
ucsv.SetGroupVersionKind(olmv1alpha1.SchemeGroupVersion.WithKind("ClusterServiceVersion"))
ns := "ns1"
ucsv.SetName("foo")
ucsv.SetNamespace(ns)
client = fake.NewSimpleDynamicClient(runtime.NewScheme(), ucsv)

crd := &customResourceDefinition{resource: u, client: client, ns: ns, serviceGVR: &serviceGVR}

Expect(crd.IsBindable()).To(BeTrue())
})
})
Loading

0 comments on commit c23a4ae

Please sign in to comment.