Repository: redhat-developer/service-binding-operator
Pull request #123 (2019-08-14 20:43:08)

Use Group/Version/Kind for both ApplicationSelector & BackingServiceSelector
The modified API would look like:

```
---
apiVersion: apps.openshift.io/v1alpha1
kind: ServiceBindingRequest
metadata:
  name: example-servicebindingrequest
spec:
  mountPathPrefix: "/var/credentials"
  backingServiceSelector:
    resourceRef: pg-instance
    group: postgresql.example.dev
    kind: Database
    version: v1alpha1
  applicationSelector:
    matchLabels:
      connects-to: postgres
      environment: production
    group: apps
    kind: Deployment
    version: v1
```

**What and Why**

- Made the API consistent with the conventional use of the terms 'group', 'version' and 'kind'
- made `Group` optional for ease of use.
- Commented out the CR creation on `make local` as it is unnecessary.



fixes https://jira.coreos.com/browse/ODC-1497

openshift-ci-robot: [APPROVALNOTIFIER] This PR is **NOT APPROVED**

This pull-request has been approved by:
To complete the [pull request process](https://git.k8s.io/community/contributors/guide/owners.md#the-code-review-process), please assign **sbose78**
You can assign the PR to them by writing `/assign @sbose78` in a comment when ready.

The full list of commands accepted by this bot can be found [here](https://go.k8s.io/bot-commands?repo=redhat-developer%2Fservice-binding-operator).

<details open>
Needs approval from an approver in each of these files:

- **[OWNERS](https://github.com/redhat-developer/service-binding-operator/blob/master/OWNERS)**

Approvers can indicate their approval by writing `/approve` in a comment
Approvers can cancel approval by writing `/approve cancel` in a comment
</details>
<!-- META={"approvers":["sbose78"]} -->
openshift-ci-robot: @sbose78: The following test **failed**, say `/retest` to rerun them all:

Test name | Commit | Details | Rerun command
--- | --- | --- | ---
ci/prow/unit | 844ab751f95f56dace8e1240e0b2d3d529317f69 | [link](https://prow.svc.ci.openshift.org/view/gcs/origin-ci-test/pr-logs/pull/redhat-developer_service-binding-operator/123/pull-ci-redhat-developer-service-binding-operator-master-unit/307) | `/test unit`

[Full PR test history](https://prow.svc.ci.openshift.org/pr-history?org=redhat-developer&repo=service-binding-operator&pr=123). [Your PR dashboard](https://prow.svc.ci.openshift.org/pr?query=is:pr+state:open+author:sbose78). Please help us cut down on flakes by [linking to](https://github.com/kubernetes/community/blob/master/contributors/devel/flaky-tests.md#filing-issues-for-flaky-tests) an [open issue](https://github.com/redhat-developer/service-binding-operator/issues?q=is:issue+is:open) when you hit one in your PR.

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->
openshift-ci-robot: @sbose78: The following tests **failed**, say `/retest` to rerun them all:

Test name | Commit | Details | Rerun command
--- | --- | --- | ---
ci/prow/unit | 844ab751f95f56dace8e1240e0b2d3d529317f69 | [link](https://prow.svc.ci.openshift.org/view/gcs/origin-ci-test/pr-logs/pull/redhat-developer_service-binding-operator/123/pull-ci-redhat-developer-service-binding-operator-master-unit/307) | `/test unit`
ci/prow/lint | 844ab751f95f56dace8e1240e0b2d3d529317f69 | [link](https://prow.svc.ci.openshift.org/view/gcs/origin-ci-test/pr-logs/pull/redhat-developer_service-binding-operator/123/pull-ci-redhat-developer-service-binding-operator-master-lint/326) | `/test lint`

[Full PR test history](https://prow.svc.ci.openshift.org/pr-history?org=redhat-developer&repo=service-binding-operator&pr=123). [Your PR dashboard](https://prow.svc.ci.openshift.org/pr?query=is:pr+state:open+author:sbose78). Please help us cut down on flakes by [linking to](https://github.com/kubernetes/community/blob/master/contributors/devel/flaky-tests.md#filing-issues-for-flaky-tests) an [open issue](https://github.com/redhat-developer/service-binding-operator/issues?q=is:issue+is:open) when you hit one in your PR.

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->
codecov[bot]: # [Codecov](https://codecov.io/gh/redhat-developer/service-binding-operator/pull/123?src=pr&el=h1) Report
> Merging [#123](https://codecov.io/gh/redhat-developer/service-binding-operator/pull/123?src=pr&el=desc) into [master](https://codecov.io/gh/redhat-developer/service-binding-operator/commit/ef7841ca4200262719f7bac3876948d760e6b351?src=pr&el=desc) will **decrease** coverage by `0.3%`.
> The diff coverage is `80%`.

[![Impacted file tree graph](https://codecov.io/gh/redhat-developer/service-binding-operator/pull/123/graphs/tree.svg?width=650&token=CICBeVWlrC&height=150&src=pr)](https://codecov.io/gh/redhat-developer/service-binding-operator/pull/123?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master     #123      +/-   ##
==========================================
- Coverage   56.48%   56.17%   -0.31%     
==========================================
  Files           6        6              
  Lines         432      429       -3     
==========================================
- Hits          244      241       -3     
  Misses        157      157              
  Partials       31       31
```


| [Impacted Files](https://codecov.io/gh/redhat-developer/service-binding-operator/pull/123?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pkg/controller/servicebindingrequest/reconciler.go](https://codecov.io/gh/redhat-developer/service-binding-operator/pull/123/diff?src=pr&el=tree#diff-cGtnL2NvbnRyb2xsZXIvc2VydmljZWJpbmRpbmdyZXF1ZXN0L3JlY29uY2lsZXIuZ28=) | `39.7% <100%> (ø)` | :arrow_up: |
| [...ontroller/servicebindingrequest/planner/planner.go](https://codecov.io/gh/redhat-developer/service-binding-operator/pull/123/diff?src=pr&el=tree#diff-cGtnL2NvbnRyb2xsZXIvc2VydmljZWJpbmRpbmdyZXF1ZXN0L3BsYW5uZXIvcGxhbm5lci5nbw==) | `73.77% <75%> (-1.23%)` | :arrow_down: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/redhat-developer/service-binding-operator/pull/123?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/redhat-developer/service-binding-operator/pull/123?src=pr&el=footer). Last update [ef7841c...9802a9f](https://codecov.io/gh/redhat-developer/service-binding-operator/pull/123?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

sbose78: /test e2e
openshift-ci-robot: @sbose78: The following test **failed**, say `/retest` to rerun them all:

Test name | Commit | Details | Rerun command
--- | --- | --- | ---
ci/prow/e2e | 9802a9f5c53a070beb4ee86f326d07d4cf843dd8 | [link](https://prow.svc.ci.openshift.org/view/gcs/origin-ci-test/pr-logs/pull/redhat-developer_service-binding-operator/123/pull-ci-redhat-developer-service-binding-operator-master-e2e/337) | `/test e2e`

[Full PR test history](https://prow.svc.ci.openshift.org/pr-history?org=redhat-developer&repo=service-binding-operator&pr=123). [Your PR dashboard](https://prow.svc.ci.openshift.org/pr?query=is:pr+state:open+author:sbose78). Please help us cut down on flakes by [linking to](https://github.com/kubernetes/community/blob/master/contributors/devel/flaky-tests.md#filing-issues-for-flaky-tests) an [open issue](https://github.com/redhat-developer/service-binding-operator/issues?q=is:issue+is:open) when you hit one in your PR.

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->
sbose78: /test e2e
openshift-ci-robot: @sbose78: The following test **failed**, say `/retest` to rerun them all:

Test name | Commit | Details | Rerun command
--- | --- | --- | ---
ci/prow/e2e | 9802a9f5c53a070beb4ee86f326d07d4cf843dd8 | [link](https://prow.svc.ci.openshift.org/view/gcs/origin-ci-test/pr-logs/pull/redhat-developer_service-binding-operator/123/pull-ci-redhat-developer-service-binding-operator-master-e2e/338) | `/test e2e`

[Full PR test history](https://prow.svc.ci.openshift.org/pr-history?org=redhat-developer&repo=service-binding-operator&pr=123). [Your PR dashboard](https://prow.svc.ci.openshift.org/pr?query=is:pr+state:open+author:sbose78). Please help us cut down on flakes by [linking to](https://github.com/kubernetes/community/blob/master/contributors/devel/flaky-tests.md#filing-issues-for-flaky-tests) an [open issue](https://github.com/redhat-developer/service-binding-operator/issues?q=is:issue+is:open) when you hit one in your PR.

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->
sbose78: /test e2e

Patch:
diff --git a/Makefile b/Makefile
index 42f92a7e..22fd71b6 100644
--- a/Makefile
+++ b/Makefile
@@ -284,7 +284,7 @@ push-image: build-image
 
 .PHONY: local
 ## Local: Run operator locally
-local: deploy-clean deploy-rbac deploy-crds deploy-cr
+local: deploy-clean deploy-rbac deploy-crds
 	$(Q)operator-sdk up local
 
 .PHONY: deploy-rbac
@@ -299,11 +299,6 @@ deploy-rbac:
 deploy-crds:
 	$(Q)kubectl create -f deploy/crds/apps_v1alpha1_servicebindingrequest_crd.yaml
 
-.PHONY: deploy-cr
-## Deploy-CR: Deploy CRs
-deploy-cr:
-	$(Q)kubectl apply -f deploy/crds/apps_v1alpha1_servicebindingrequest_cr.yaml
-
 .PHONY: deploy-clean
 ## Deploy-Clean: Removing CRDs and CRs
 deploy-clean:
diff --git a/README.md b/README.md
index 926f84a3..90d4a5a8 100644
--- a/README.md
+++ b/README.md
@@ -119,7 +119,7 @@ spec:
 EOS
 ```
 
-Then navigate to the `Operators`->`OperatorHub` in the OpenShift console and in the `Other` category select the `Service Bidning Operator` operator
+Then navigate to the `Operators`->`OperatorHub` in the OpenShift console and in the `Other` category select the `Service Binding Operator` operator
 
 ![Service Binding Operator as shown in OperatorHub](assets/operator-hub-sbo-screenshot.png)
 
diff --git a/deploy/crds/apps_v1alpha1_servicebindingrequest_cr.yaml b/deploy/crds/apps_v1alpha1_servicebindingrequest_cr.yaml
index 0a869067..b5076f37 100644
--- a/deploy/crds/apps_v1alpha1_servicebindingrequest_cr.yaml
+++ b/deploy/crds/apps_v1alpha1_servicebindingrequest_cr.yaml
@@ -7,10 +7,13 @@ spec:
   mountPathPrefix: "/var/credentials"
   backingServiceSelector:
     resourceRef: pg-instance
-    resourceKind: databases.postgresql.example.dev
-    resourceVersion: v1alpha1
+    group: postgresql.example.dev
+    kind: Database
+    version: v1alpha1
   applicationSelector:
     matchLabels:
       connects-to: postgres
       environment: production
-    resourceKind: Deployment
+    group: apps
+    kind: Deployment
+    version: v1
diff --git a/deploy/crds/apps_v1alpha1_servicebindingrequest_crd.yaml b/deploy/crds/apps_v1alpha1_servicebindingrequest_crd.yaml
index 59308c6b..eb08e20a 100644
--- a/deploy/crds/apps_v1alpha1_servicebindingrequest_crd.yaml
+++ b/deploy/crds/apps_v1alpha1_servicebindingrequest_crd.yaml
@@ -36,15 +36,20 @@ spec:
                 \t\tresourceKind: Deployment Example 2: \tapplicationSelector: \t\tmatchLabels:
                 \t\t\tconnects-to: postgres \t\t\tenvironment: stage"
               properties:
+                group:
+                  type: string
+                kind:
+                  type: string
                 matchLabels:
                   additionalProperties:
                     type: string
                   type: object
-                resourceKind:
+                version:
                   type: string
               required:
               - matchLabels
-              - resourceKind
+              - version
+              - kind
               type: object
             backingServiceSelector:
               description: "BackingServiceSelector is used to identify the backing
@@ -58,15 +63,17 @@ spec:
                 Example 2: \tbackingServiceSelector: \t\tresourceKind: databases.example.org
                 \t\tresourceVersion: v1alpha1      resourceRef: mysql-database"
               properties:
-                resourceKind:
+                group:
+                  type: string
+                kind:
                   type: string
                 resourceRef:
                   type: string
-                resourceVersion:
+                version:
                   type: string
               required:
-              - resourceKind
-              - resourceVersion
+              - version
+              - kind
               - resourceRef
               type: object
             envVarPrefix:
@@ -80,6 +87,20 @@ spec:
           - applicationSelector
           type: object
         status:
+          properties:
+            applicationObjects:
+              description: ApplicationObjects contains all the application objects
+                filtered by label
+              items:
+                type: string
+              type: array
+            bindingStatus:
+              description: BindingStatus is the status of the service binding request.
+                Possible values are Success, Failure, InProgress.
+              type: string
+            secret:
+              description: Secret is the name of the intermediate secret
+              type: string
           type: object
   version: v1alpha1
   versions:
diff --git a/pkg/apis/apps/v1alpha1/servicebindingrequest_types.go b/pkg/apis/apps/v1alpha1/servicebindingrequest_types.go
index 966ac66b..24a9a5c3 100644
--- a/pkg/apis/apps/v1alpha1/servicebindingrequest_types.go
+++ b/pkg/apis/apps/v1alpha1/servicebindingrequest_types.go
@@ -14,11 +14,11 @@ type ServiceBindingRequestSpec struct {
 	// 	https://book.kubebuilder.io/beyond_basics/generating_crd.html
 
 	// MountPathPrefix is the prefix for volume mount
-	MountPathPrefix string `json:"mountPathPrefix"`
+	MountPathPrefix string `json:"mountPathPrefix,omitempty"`
 
 	// EnvVarPrefix is the prefix for environment variables
 	// +optional
-	EnvVarPrefix string `json:"envVarPrefix"`
+	EnvVarPrefix string `json:"envVarPrefix,omitempty"`
 
 	// BackingServiceSelector is used to identify the backing service operator.
 	//
@@ -59,16 +59,19 @@ type ServiceBindingRequestSpec struct {
 // BackingServiceSelector defines the selector based on resource name, version, and resource kind
 // +k8s:openapi-gen=true
 type BackingServiceSelector struct {
-	ResourceKind    string `json:"resourceKind"`
-	ResourceVersion string `json:"resourceVersion"`
-	ResourceRef     string `json:"resourceRef"`
+	Group       *string `json:"group,omitempty"`
+	Version     string  `json:"version"`
+	Kind        string  `json:"kind"`
+	ResourceRef string  `json:"resourceRef"`
 }
 
 // ApplicationSelector defines the selector based on labels and resource kind
 // +k8s:openapi-gen=true
 type ApplicationSelector struct {
-	MatchLabels  map[string]string `json:"matchLabels"`
-	ResourceKind string            `json:"resourceKind"`
+	MatchLabels map[string]string `json:"matchLabels"`
+	Group       *string           `json:"group,omitempty"`
+	Version     string            `json:"version"`
+	Kind        string            `json:"kind"`
 }
 
 type BindingStatus string
@@ -83,11 +86,11 @@ const (
 // +k8s:openapi-gen=true
 type ServiceBindingRequestStatus struct {
 	// BindingStatus is the status of the service binding request. Possible values are Success, Failure, InProgress.
-	BindingStatus BindingStatus `json:"BindingStatus"`
+	BindingStatus BindingStatus `json:"bindingStatus,omitempty"`
 	// Secret is the name of the intermediate secret
-	Secret string `json:"Secret"`
+	Secret string `json:"secret,omitempty"`
 	// ApplicationObjects contains all the application objects filtered by label
-	ApplicationObjects []string `json:"ApplicationObjects"`
+	ApplicationObjects []string `json:"applicationObjects,omitempty"`
 }
 
 // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
diff --git a/pkg/apis/apps/v1alpha1/zz_generated.deepcopy.go b/pkg/apis/apps/v1alpha1/zz_generated.deepcopy.go
index 25e682c7..eeb7eb4f 100644
--- a/pkg/apis/apps/v1alpha1/zz_generated.deepcopy.go
+++ b/pkg/apis/apps/v1alpha1/zz_generated.deepcopy.go
@@ -1,6 +1,6 @@
 // +build !ignore_autogenerated
 
-// Code generated by deepcopy-gen. DO NOT EDIT.
+// Code generated by operator-sdk. DO NOT EDIT.
 
 package v1alpha1
 
@@ -18,6 +18,11 @@ func (in *ApplicationSelector) DeepCopyInto(out *ApplicationSelector) {
 			(*out)[key] = val
 		}
 	}
+	if in.Group != nil {
+		in, out := &in.Group, &out.Group
+		*out = new(string)
+		**out = **in
+	}
 	return
 }
 
@@ -34,6 +39,11 @@ func (in *ApplicationSelector) DeepCopy() *ApplicationSelector {
 // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
 func (in *BackingServiceSelector) DeepCopyInto(out *BackingServiceSelector) {
 	*out = *in
+	if in.Group != nil {
+		in, out := &in.Group, &out.Group
+		*out = new(string)
+		**out = **in
+	}
 	return
 }
 
@@ -53,7 +63,7 @@ func (in *ServiceBindingRequest) DeepCopyInto(out *ServiceBindingRequest) {
 	out.TypeMeta = in.TypeMeta
 	in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
 	in.Spec.DeepCopyInto(&out.Spec)
-	out.Status = in.Status
+	in.Status.DeepCopyInto(&out.Status)
 	return
 }
 
@@ -111,7 +121,7 @@ func (in *ServiceBindingRequestList) DeepCopyObject() runtime.Object {
 // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
 func (in *ServiceBindingRequestSpec) DeepCopyInto(out *ServiceBindingRequestSpec) {
 	*out = *in
-	out.BackingServiceSelector = in.BackingServiceSelector
+	in.BackingServiceSelector.DeepCopyInto(&out.BackingServiceSelector)
 	in.ApplicationSelector.DeepCopyInto(&out.ApplicationSelector)
 	return
 }
@@ -129,6 +139,11 @@ func (in *ServiceBindingRequestSpec) DeepCopy() *ServiceBindingRequestSpec {
 // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
 func (in *ServiceBindingRequestStatus) DeepCopyInto(out *ServiceBindingRequestStatus) {
 	*out = *in
+	if in.ApplicationObjects != nil {
+		in, out := &in.ApplicationObjects, &out.ApplicationObjects
+		*out = make([]string, len(*in))
+		copy(*out, *in)
+	}
 	return
 }
 
diff --git a/pkg/apis/apps/v1alpha1/zz_generated.openapi.go b/pkg/apis/apps/v1alpha1/zz_generated.openapi.go
index ef906953..414b337d 100644
--- a/pkg/apis/apps/v1alpha1/zz_generated.openapi.go
+++ b/pkg/apis/apps/v1alpha1/zz_generated.openapi.go
@@ -1,7 +1,5 @@
 // +build !ignore_autogenerated
 
-// Code generated by openapi-gen. DO NOT EDIT.
-
 // This file was autogenerated by openapi-gen. Do not edit it manually!
 
 package v1alpha1
@@ -13,11 +11,11 @@ import (
 
 func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition {
 	return map[string]common.OpenAPIDefinition{
-		"github.com/redhat-developer/service-binding-operator/pkg/apis/apps/v1alpha1.ApplicationSelector":         schema_pkg_apis_apps_v1alpha1_ApplicationSelector(ref),
-		"github.com/redhat-developer/service-binding-operator/pkg/apis/apps/v1alpha1.BackingServiceSelector":      schema_pkg_apis_apps_v1alpha1_BackingServiceSelector(ref),
-		"github.com/redhat-developer/service-binding-operator/pkg/apis/apps/v1alpha1.ServiceBindingRequest":       schema_pkg_apis_apps_v1alpha1_ServiceBindingRequest(ref),
-		"github.com/redhat-developer/service-binding-operator/pkg/apis/apps/v1alpha1.ServiceBindingRequestSpec":   schema_pkg_apis_apps_v1alpha1_ServiceBindingRequestSpec(ref),
-		"github.com/redhat-developer/service-binding-operator/pkg/apis/apps/v1alpha1.ServiceBindingRequestStatus": schema_pkg_apis_apps_v1alpha1_ServiceBindingRequestStatus(ref),
+		"./pkg/apis/apps/v1alpha1.ApplicationSelector":         schema_pkg_apis_apps_v1alpha1_ApplicationSelector(ref),
+		"./pkg/apis/apps/v1alpha1.BackingServiceSelector":      schema_pkg_apis_apps_v1alpha1_BackingServiceSelector(ref),
+		"./pkg/apis/apps/v1alpha1.ServiceBindingRequest":       schema_pkg_apis_apps_v1alpha1_ServiceBindingRequest(ref),
+		"./pkg/apis/apps/v1alpha1.ServiceBindingRequestSpec":   schema_pkg_apis_apps_v1alpha1_ServiceBindingRequestSpec(ref),
+		"./pkg/apis/apps/v1alpha1.ServiceBindingRequestStatus": schema_pkg_apis_apps_v1alpha1_ServiceBindingRequestStatus(ref),
 	}
 }
 
@@ -40,14 +38,26 @@ func schema_pkg_apis_apps_v1alpha1_ApplicationSelector(ref common.ReferenceCallb
 							},
 						},
 					},
-					"resourceKind": {
+					"group": {
+						SchemaProps: spec.SchemaProps{
+							Type:   []string{"string"},
+							Format: "",
+						},
+					},
+					"version": {
+						SchemaProps: spec.SchemaProps{
+							Type:   []string{"string"},
+							Format: "",
+						},
+					},
+					"kind": {
 						SchemaProps: spec.SchemaProps{
 							Type:   []string{"string"},
 							Format: "",
 						},
 					},
 				},
-				Required: []string{"matchLabels", "resourceKind"},
+				Required: []string{"matchLabels", "version", "kind"},
 			},
 		},
 		Dependencies: []string{},
@@ -60,13 +70,19 @@ func schema_pkg_apis_apps_v1alpha1_BackingServiceSelector(ref common.ReferenceCa
 			SchemaProps: spec.SchemaProps{
 				Description: "BackingServiceSelector defines the selector based on resource name, version, and resource kind",
 				Properties: map[string]spec.Schema{
-					"resourceKind": {
+					"group": {
+						SchemaProps: spec.SchemaProps{
+							Type:   []string{"string"},
+							Format: "",
+						},
+					},
+					"version": {
 						SchemaProps: spec.SchemaProps{
 							Type:   []string{"string"},
 							Format: "",
 						},
 					},
-					"resourceVersion": {
+					"kind": {
 						SchemaProps: spec.SchemaProps{
 							Type:   []string{"string"},
 							Format: "",
@@ -79,7 +95,7 @@ func schema_pkg_apis_apps_v1alpha1_BackingServiceSelector(ref common.ReferenceCa
 						},
 					},
 				},
-				Required: []string{"resourceKind", "resourceVersion", "resourceRef"},
+				Required: []string{"version", "kind", "resourceRef"},
 			},
 		},
 		Dependencies: []string{},
@@ -113,19 +129,19 @@ func schema_pkg_apis_apps_v1alpha1_ServiceBindingRequest(ref common.ReferenceCal
 					},
 					"spec": {
 						SchemaProps: spec.SchemaProps{
-							Ref: ref("github.com/redhat-developer/service-binding-operator/pkg/apis/apps/v1alpha1.ServiceBindingRequestSpec"),
+							Ref: ref("./pkg/apis/apps/v1alpha1.ServiceBindingRequestSpec"),
 						},
 					},
 					"status": {
 						SchemaProps: spec.SchemaProps{
-							Ref: ref("github.com/redhat-developer/service-binding-operator/pkg/apis/apps/v1alpha1.ServiceBindingRequestStatus"),
+							Ref: ref("./pkg/apis/apps/v1alpha1.ServiceBindingRequestStatus"),
 						},
 					},
 				},
 			},
 		},
 		Dependencies: []string{
-			"github.com/redhat-developer/service-binding-operator/pkg/apis/apps/v1alpha1.ServiceBindingRequestSpec", "github.com/redhat-developer/service-binding-operator/pkg/apis/apps/v1alpha1.ServiceBindingRequestStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"},
+			"./pkg/apis/apps/v1alpha1.ServiceBindingRequestSpec", "./pkg/apis/apps/v1alpha1.ServiceBindingRequestStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"},
 	}
 }
 
@@ -152,21 +168,21 @@ func schema_pkg_apis_apps_v1alpha1_ServiceBindingRequestSpec(ref common.Referenc
 					"backingServiceSelector": {
 						SchemaProps: spec.SchemaProps{
 							Description: "BackingServiceSelector is used to identify the backing service operator.\n\nRefer: https://12factor.net/backing-services A backing service is any service the app consumes over the network as part of its normal operation. Examples include datastores (such as MySQL or CouchDB), messaging/queueing systems (such as RabbitMQ or Beanstalkd), SMTP services for outbound email (such as Postfix), and caching systems (such as Memcached).\n\nExample 1:\n\tbackingServiceSelector:\n\t\tresourceKind: databases.example.org\n     resourceRef: mysql-database\nExample 2:\n\tbackingServiceSelector:\n\t\tresourceKind: databases.example.org\n\t\tresourceVersion: v1alpha1\n     resourceRef: mysql-database",
-							Ref:         ref("github.com/redhat-developer/service-binding-operator/pkg/apis/apps/v1alpha1.BackingServiceSelector"),
+							Ref:         ref("./pkg/apis/apps/v1alpha1.BackingServiceSelector"),
 						},
 					},
 					"applicationSelector": {
 						SchemaProps: spec.SchemaProps{
 							Description: "ApplicationSelector is used to identify the application connecting to the backing service operator. Example 1:\n\tapplicationSelector:\n\t\tmatchLabels:\n\t\t\tconnects-to: postgres\n\t\t\tenvironment: stage\n\t\tresourceKind: Deployment\nExample 2:\n\tapplicationSelector:\n\t\tmatchLabels:\n\t\t\tconnects-to: postgres\n\t\t\tenvironment: stage",
-							Ref:         ref("github.com/redhat-developer/service-binding-operator/pkg/apis/apps/v1alpha1.ApplicationSelector"),
+							Ref:         ref("./pkg/apis/apps/v1alpha1.ApplicationSelector"),
 						},
 					},
 				},
-				Required: []string{"mountPathPrefix", "backingServiceSelector", "applicationSelector"},
+				Required: []string{"backingServiceSelector", "applicationSelector"},
 			},
 		},
 		Dependencies: []string{
-			"github.com/redhat-developer/service-binding-operator/pkg/apis/apps/v1alpha1.ApplicationSelector", "github.com/redhat-developer/service-binding-operator/pkg/apis/apps/v1alpha1.BackingServiceSelector"},
+			"./pkg/apis/apps/v1alpha1.ApplicationSelector", "./pkg/apis/apps/v1alpha1.BackingServiceSelector"},
 	}
 }
 
@@ -175,7 +191,36 @@ func schema_pkg_apis_apps_v1alpha1_ServiceBindingRequestStatus(ref common.Refere
 		Schema: spec.Schema{
 			SchemaProps: spec.SchemaProps{
 				Description: "ServiceBindingRequestStatus defines the observed state of ServiceBindingRequest",
-				Properties:  map[string]spec.Schema{},
+				Properties: map[string]spec.Schema{
+					"bindingStatus": {
+						SchemaProps: spec.SchemaProps{
+							Description: "BindingStatus is the status of the service binding request. Possible values are Success, Failure, InProgress.",
+							Type:        []string{"string"},
+							Format:      "",
+						},
+					},
+					"secret": {
+						SchemaProps: spec.SchemaProps{
+							Description: "Secret is the name of the intermediate secret",
+							Type:        []string{"string"},
+							Format:      "",
+						},
+					},
+					"applicationObjects": {
+						SchemaProps: spec.SchemaProps{
+							Description: "ApplicationObjects contains all the application objects filtered by label",
+							Type:        []string{"array"},
+							Items: &spec.SchemaOrArray{
+								Schema: &spec.Schema{
+									SchemaProps: spec.SchemaProps{
+										Type:   []string{"string"},
+										Format: "",
+									},
+								},
+							},
+						},
+					},
+				},
 			},
 		},
 		Dependencies: []string{},
diff --git a/pkg/controller/servicebindingrequest/planner/planner.go b/pkg/controller/servicebindingrequest/planner/planner.go
index 10d60d09..6e17938e 100644
--- a/pkg/controller/servicebindingrequest/planner/planner.go
+++ b/pkg/controller/servicebindingrequest/planner/planner.go
@@ -3,9 +3,10 @@ package planner
 import (
 	"context"
 	"fmt"
-	"github.com/redhat-developer/service-binding-operator/pkg/resourcepoll"
 	"strings"
 
+	"github.com/redhat-developer/service-binding-operator/pkg/resourcepoll"
+
 	"github.com/go-logr/logr"
 	olmv1alpha1 "github.com/operator-framework/operator-lifecycle-manager/pkg/api/apis/operators/v1alpha1"
 	extv1beta1 "k8s.io/api/extensions/v1beta1"
@@ -39,9 +40,8 @@ type Plan struct {
 // searchCRDDescription based on BackingServiceSelector instance, find a CustomResourceDefinitionDescription
 // to return, otherwise creating a not-found error.
 func (p *Planner) searchCRDDescription() (*olmv1alpha1.CRDDescription, error) {
-	var resourceKind = strings.ToLower(
-		fmt.Sprintf(".%s", p.sbr.Spec.BackingServiceSelector.ResourceKind))
-	var resourceVersion = strings.ToLower(p.sbr.Spec.BackingServiceSelector.ResourceVersion)
+	var resourceKind = strings.ToLower(p.sbr.Spec.BackingServiceSelector.Kind)
+	var resourceVersion = strings.ToLower(p.sbr.Spec.BackingServiceSelector.Version)
 	var err error
 
 	logger := p.logger.WithValues(
@@ -68,7 +68,7 @@ func (p *Planner) searchCRDDescription() (*olmv1alpha1.CRDDescription, error) {
 			logger.Info("Inspecting CustomResourceDefinitionDescription object...")
 
 			// checking for suffix since is expected to have object type as prefix
-			if !strings.HasSuffix(strings.ToLower(crd.Name), resourceKind) {
+			if !strings.EqualFold(strings.ToLower(crd.Kind), resourceKind) {
 				continue
 			}
 			if crd.Version != "" && resourceVersion != strings.ToLower(crd.Version) {
@@ -87,9 +87,7 @@ func (p *Planner) searchCRDDescription() (*olmv1alpha1.CRDDescription, error) {
 // searchCR based on a CustomResourceDefinitionDescription and name, search for the object.
 func (p *Planner) searchCR(kind string) (*ustrv1.Unstructured, error) {
 	var resourceRef = p.sbr.Spec.BackingServiceSelector.ResourceRef
-	var apiVersion = fmt.Sprintf("%s/%s",
-		p.sbr.Spec.BackingServiceSelector.ResourceKind,
-		p.sbr.Spec.BackingServiceSelector.ResourceVersion)
+	var apiVersion = fmt.Sprintf("%s/%s", *p.sbr.Spec.BackingServiceSelector.Group, p.sbr.Spec.BackingServiceSelector.Version)
 	var err error
 
 	p.logger.WithValues("CR.Name", resourceRef, "CR.Kind", kind, "CR.APIVersion", apiVersion).
diff --git a/pkg/controller/servicebindingrequest/reconciler.go b/pkg/controller/servicebindingrequest/reconciler.go
index 1265518c..765610f3 100644
--- a/pkg/controller/servicebindingrequest/reconciler.go
+++ b/pkg/controller/servicebindingrequest/reconciler.go
@@ -2,9 +2,10 @@ package servicebindingrequest
 
 import (
 	"context"
-	"github.com/redhat-developer/service-binding-operator/pkg/resourcepoll"
 	"strings"
 
+	"github.com/redhat-developer/service-binding-operator/pkg/resourcepoll"
+
 	osappsv1 "github.com/openshift/api/apps/v1"
 	corev1 "k8s.io/api/core/v1"
 	extv1beta1 "k8s.io/api/extensions/v1beta1"
@@ -155,7 +156,7 @@ func (r *Reconciler) Reconcile(request reconcile.Request) (reconcile.Result, err
 	logger = logger.WithValues("MatchLabels", instance.Spec.ApplicationSelector.MatchLabels)
 	logger.Info("Searching applications to receive intermediary secret bind...")
 
-	resourceKind := strings.ToLower(instance.Spec.ApplicationSelector.ResourceKind)
+	resourceKind := strings.ToLower(instance.Spec.ApplicationSelector.Kind)
 	searchByLabelsOpts := client.ListOptions{
 		Namespace:     request.Namespace,
 		LabelSelector: labels.SelectorFromSet(instance.Spec.ApplicationSelector.MatchLabels),


Test patch:
diff --git a/test/mocks/mocks.go b/test/mocks/mocks.go
index 56d14e8c..190e0c0c 100644
--- a/test/mocks/mocks.go
+++ b/test/mocks/mocks.go
@@ -17,13 +17,15 @@ import (
 
 // resource details employed in mocks
 const (
-	CRDName            = "postgresql.baiju.dev"
 	CRDVersion         = "v1alpha1"
 	CRDKind            = "Database"
 	OperatorKind       = "ServiceBindingRequest"
 	OperatorAPIVersion = "apps.openshift.io/v1alpha1"
 )
 
+// CRDGroup is the group of the sample CRD used in this test.
+var CRDGroup string = "postgresql.baiju.dev"
+
 // ClusterServiceVersionMock based on PostgreSQL operator.
 func ClusterServiceVersionMock(ns, name string) olmv1alpha1.ClusterServiceVersion {
 	strategy := olminstall.StrategyDetailsDeployment{
@@ -64,7 +66,7 @@ func ClusterServiceVersionListMock(ns, name string) olmv1alpha1.ClusterServiceVe
 // credentials entry with OLM descriptors.
 func CRDDescriptionMock() olmv1alpha1.CRDDescription {
 	return olmv1alpha1.CRDDescription{
-		Name:        fmt.Sprintf("%s.%s", CRDKind, CRDName),
+		Name:        fmt.Sprintf("%s.%s", CRDKind, CRDGroup),
 		DisplayName: CRDKind,
 		Description: "mock-crd-description",
 		Kind:        CRDKind,
@@ -91,7 +93,7 @@ func CRDDescriptionMock() olmv1alpha1.CRDDescription {
 // CRDDescriptionConfigMapMock ...
 func CRDDescriptionConfigMapMock() olmv1alpha1.CRDDescription {
 	return olmv1alpha1.CRDDescription{
-		Name:        fmt.Sprintf("%s.%s", CRDKind, CRDName),
+		Name:        fmt.Sprintf("%s.%s", CRDKind, CRDGroup),
 		DisplayName: CRDKind,
 		Description: "mock-crd-description",
 		Kind:        CRDKind,
@@ -148,7 +150,7 @@ func ClusterServiceVersionListVolumeMountMock(ns, name string) olmv1alpha1.Clust
 // CRDDescriptionVolumeMountMock ...
 func CRDDescriptionVolumeMountMock() olmv1alpha1.CRDDescription {
 	return olmv1alpha1.CRDDescription{
-		Name:        fmt.Sprintf("%s.%s", CRDKind, CRDName),
+		Name:        fmt.Sprintf("%s.%s", CRDKind, CRDGroup),
 		DisplayName: CRDKind,
 		Description: "mock-crd-description",
 		Kind:        CRDKind,
@@ -179,7 +181,7 @@ func DatabaseCRMock(ns, name string) pgv1alpha1.Database {
 		// it via *unstructured.Unstructured it could not find this CR without it.
 		TypeMeta: metav1.TypeMeta{
 			Kind:       CRDKind,
-			APIVersion: fmt.Sprintf("%s/%s", CRDName, CRDVersion),
+			APIVersion: fmt.Sprintf("%s/%s", CRDGroup, CRDVersion),
 		},
 		ObjectMeta: metav1.ObjectMeta{
 			Namespace: ns,
@@ -234,6 +236,7 @@ func ConfigMapMock(ns, name string) corev1.ConfigMap {
 func ServiceBindingRequestMock(
 	ns, name, resourceRef string, matchLabels map[string]string,
 ) v1alpha1.ServiceBindingRequest {
+
 	return v1alpha1.ServiceBindingRequest{
 		ObjectMeta: metav1.ObjectMeta{
 			Namespace: ns,
@@ -242,13 +245,14 @@ func ServiceBindingRequestMock(
 		Spec: v1alpha1.ServiceBindingRequestSpec{
 			MountPathPrefix: "/var/redhat",
 			BackingServiceSelector: v1alpha1.BackingServiceSelector{
-				ResourceKind:    CRDName,
-				ResourceVersion: CRDVersion,
-				ResourceRef:     resourceRef,
+				Group:       &CRDGroup,
+				Kind:        CRDKind,
+				Version:     CRDVersion,
+				ResourceRef: resourceRef,
 			},
 			ApplicationSelector: v1alpha1.ApplicationSelector{
-				ResourceKind: "Deployment",
-				MatchLabels:  matchLabels,
+				Kind:        "Deployment",
+				MatchLabels: matchLabels,
 			},
 		},
 	}
@@ -315,7 +319,7 @@ func NestedDatabaseCRMock(ns, name string) NestedDatabase {
 		// it via *unstructured.Unstructured it could not find this CR without it.
 		TypeMeta: metav1.TypeMeta{
 			Kind:       CRDKind,
-			APIVersion: fmt.Sprintf("%s/%s", CRDName, CRDVersion),
+			APIVersion: fmt.Sprintf("%s/%s", CRDGroup, CRDVersion),
 		},
 		ObjectMeta: metav1.ObjectMeta{
 			Namespace: ns,
@@ -350,7 +354,7 @@ func DatabaseConfigMapMock(ns, name string) ConfigMapDatabase {
 	return ConfigMapDatabase{
 		TypeMeta: metav1.TypeMeta{
 			Kind:       CRDKind,
-			APIVersion: fmt.Sprintf("%s/%s", CRDName, CRDVersion),
+			APIVersion: fmt.Sprintf("%s/%s", CRDGroup, CRDVersion),
 		},
 		ObjectMeta: metav1.ObjectMeta{
 			Namespace: ns,