Repository: redhat-developer/service-binding-operator
Pull request #802 (2020-12-14 10:20:23)

Rename customEnvVar to mappings
Also rename envVarPrefix fields as well to namePrefix

Ref. https://issues.redhat.com/browse/APPSVC-538


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 **baijum** after the PR has been reviewed.
You can assign the PR to them by writing `/assign @baijum` 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":["baijum"]} -->
sbose78: Please do let CodeEngine folks know :) 
openshift-merge-robot: @baijum: The following test **failed**, say `/retest` to rerun all failed tests:

Test name | Commit | Details | Rerun command
--- | --- | --- | ---
ci/prow/4.6-unit | a88b3930c05479fd41a265a870f58a8a90c3760b | [link](https://prow.ci.openshift.org/view/gs/origin-ci-test/pr-logs/pull/redhat-developer_service-binding-operator/802/pull-ci-redhat-developer-service-binding-operator-master-4.6-unit/1338750725986979840) | `/test 4.6-unit`

[Full PR test history](https://prow.ci.openshift.org/pr-history?org=redhat-developer&repo=service-binding-operator&pr=802). [Your PR dashboard](https://prow.ci.openshift.org/pr?query=is:pr+state:open+author:baijum).

<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-merge-robot: @baijum: The following tests **failed**, say `/retest` to rerun all failed tests:

Test name | Commit | Details | Rerun command
--- | --- | --- | ---
ci/prow/4.6-unit | a88b3930c05479fd41a265a870f58a8a90c3760b | [link](https://prow.ci.openshift.org/view/gs/origin-ci-test/pr-logs/pull/redhat-developer_service-binding-operator/802/pull-ci-redhat-developer-service-binding-operator-master-4.6-unit/1338750725986979840) | `/test 4.6-unit`
ci/prow/4.6-lint | a88b3930c05479fd41a265a870f58a8a90c3760b | [link](https://prow.ci.openshift.org/view/gs/origin-ci-test/pr-logs/pull/redhat-developer_service-binding-operator/802/pull-ci-redhat-developer-service-binding-operator-master-4.6-lint/1338750725953425408) | `/test 4.6-lint`

[Full PR test history](https://prow.ci.openshift.org/pr-history?org=redhat-developer&repo=service-binding-operator&pr=802). [Your PR dashboard](https://prow.ci.openshift.org/pr?query=is:pr+state:open+author:baijum).

<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-merge-robot: @baijum: The following tests **failed**, say `/retest` to rerun all failed tests:

Test name | Commit | Details | Rerun command
--- | --- | --- | ---
ci/prow/4.6-unit | a88b3930c05479fd41a265a870f58a8a90c3760b | [link](https://prow.ci.openshift.org/view/gs/origin-ci-test/pr-logs/pull/redhat-developer_service-binding-operator/802/pull-ci-redhat-developer-service-binding-operator-master-4.6-unit/1338750725986979840) | `/test 4.6-unit`
ci/prow/4.6-lint | a88b3930c05479fd41a265a870f58a8a90c3760b | [link](https://prow.ci.openshift.org/view/gs/origin-ci-test/pr-logs/pull/redhat-developer_service-binding-operator/802/pull-ci-redhat-developer-service-binding-operator-master-4.6-lint/1338750725953425408) | `/test 4.6-lint`
ci/prow/4.6-acceptance | a88b3930c05479fd41a265a870f58a8a90c3760b | [link](https://prow.ci.openshift.org/view/gs/origin-ci-test/pr-logs/pull/redhat-developer_service-binding-operator/802/pull-ci-redhat-developer-service-binding-operator-master-4.6-acceptance/1338750725903093760) | `/test 4.6-acceptance`

[Full PR test history](https://prow.ci.openshift.org/pr-history?org=redhat-developer&repo=service-binding-operator&pr=802). [Your PR dashboard](https://prow.ci.openshift.org/pr?query=is:pr+state:open+author:baijum).

<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-merge-robot: @baijum: The following test **failed**, say `/retest` to rerun all failed tests:

Test name | Commit | Details | Rerun command
--- | --- | --- | ---
ci/prow/4.6-acceptance | 59b133f58b2bc2672cb72a70f40bf5f060d00f12 | [link](https://prow.ci.openshift.org/view/gs/origin-ci-test/pr-logs/pull/redhat-developer_service-binding-operator/802/pull-ci-redhat-developer-service-binding-operator-master-4.6-acceptance/1338817849698816000) | `/test 4.6-acceptance`

[Full PR test history](https://prow.ci.openshift.org/pr-history?org=redhat-developer&repo=service-binding-operator&pr=802). [Your PR dashboard](https://prow.ci.openshift.org/pr?query=is:pr+state:open+author:baijum).

<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 -->
baijum: /test 4.6-acceptance
openshift-merge-robot: @baijum: The following test **failed**, say `/retest` to rerun all failed tests:

Test name | Commit | Details | Rerun command
--- | --- | --- | ---
ci/prow/4.6-acceptance | 59b133f58b2bc2672cb72a70f40bf5f060d00f12 | [link](https://prow.ci.openshift.org/view/gs/origin-ci-test/pr-logs/pull/redhat-developer_service-binding-operator/802/pull-ci-redhat-developer-service-binding-operator-master-4.6-acceptance/1338823417645764608) | `/test 4.6-acceptance`

[Full PR test history](https://prow.ci.openshift.org/pr-history?org=redhat-developer&repo=service-binding-operator&pr=802). [Your PR dashboard](https://prow.ci.openshift.org/pr?query=is:pr+state:open+author:baijum).

<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 -->
baijum: /test 4.6-acceptance
openshift-merge-robot: @baijum: The following test **failed**, say `/retest` to rerun all failed tests:

Test name | Commit | Details | Rerun command
--- | --- | --- | ---
ci/prow/4.6-acceptance | 59b133f58b2bc2672cb72a70f40bf5f060d00f12 | [link](https://prow.ci.openshift.org/view/gs/origin-ci-test/pr-logs/pull/redhat-developer_service-binding-operator/802/pull-ci-redhat-developer-service-binding-operator-master-4.6-acceptance/1338828676791275520) | `/test 4.6-acceptance`

[Full PR test history](https://prow.ci.openshift.org/pr-history?org=redhat-developer&repo=service-binding-operator&pr=802). [Your PR dashboard](https://prow.ci.openshift.org/pr?query=is:pr+state:open+author:baijum).

<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 -->
pedjak: /retest
openshift-merge-robot: @baijum: The following test **failed**, say `/retest` to rerun all failed tests:

Test name | Commit | Details | Rerun command
--- | --- | --- | ---
ci/prow/4.6-acceptance | 59b133f58b2bc2672cb72a70f40bf5f060d00f12 | [link](https://prow.ci.openshift.org/view/gs/origin-ci-test/pr-logs/pull/redhat-developer_service-binding-operator/802/pull-ci-redhat-developer-service-binding-operator-master-4.6-acceptance/1338830731022962688) | `/test 4.6-acceptance`

[Full PR test history](https://prow.ci.openshift.org/pr-history?org=redhat-developer&repo=service-binding-operator&pr=802). [Your PR dashboard](https://prow.ci.openshift.org/pr?query=is:pr+state:open+author:baijum).

<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 -->
baijum: /test 4.6-acceptance
Avni-Sharma: /lgtm
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 **avni-sharma** after the PR has been reviewed.
You can assign the PR to them by writing `/assign @avni-sharma` 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":["avni-sharma"]} -->
pedjak: /lgtm

Patch:
diff --git a/.travis.yml b/.travis.yml
index f9194ec2..1ef1845e 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -52,7 +52,6 @@ jobs:
         - EXTRA_BEHAVE_ARGS="--tags=~@knative --tags=~@openshift"
         - TEST_ACCEPTANCE_CLI="kubectl"
         - TEST_ACCEPTANCE_START_SBO="remote"
-        - SBO_NAMESPACE=operators
       install:
         # Download Operator SDK
         - curl -Lo operator-sdk https://github.com/operator-framework/operator-sdk/releases/download/v${SDK_VERSION}/operator-sdk-v${SDK_VERSION}-x86_64-linux-gnu
@@ -80,7 +79,4 @@ jobs:
         - kubectl cluster-info
         - docker info
       script:
-        - OPERATOR_REPO_REF=$(minikube ip):5000/sbo make release-operator -o registry-login
-        - OPERATOR_INDEX_IMAGE=$(minikube ip):5000/sbo:index SKIP_REGISTRY_LOGIN=true ./install.sh
-        - travis_wait 60 make test-acceptance
-
+        - travis_wait 60 make OPERATOR_REPO_REF=$(minikube ip):5000/sbo SKIP_REGISTRY_LOGIN=true release-operator -o registry-login test-acceptance-with-bundle
diff --git a/Makefile b/Makefile
index d83ebf42..911660db 100644
--- a/Makefile
+++ b/Makefile
@@ -136,6 +136,7 @@ BUNDLE_VERSION ?= $(BASE_BUNDLE_VERSION)-$(GIT_COMMIT_ID)
 OPERATOR_BUNDLE_IMAGE_REF ?= $(OPERATOR_REPO_REF):bundle-$(BUNDLE_VERSION)
 OPERATOR_INDEX_IMAGE_REF ?= $(OPERATOR_REPO_REF):index
 OPERATOR_IMAGE_REF ?= $(OPERATOR_REPO_REF):$(GIT_COMMIT_ID)
+OPERATOR_CHANNEL ?= beta
 CSV_PACKAGE_NAME ?= $(GO_PACKAGE_REPO_NAME)
 CSV_CREATION_TIMESTAMP ?= $(shell TZ=GMT date '+%FT%TZ')
 
@@ -144,7 +145,6 @@ REGISTRY_USERNAME ?= $(QUAY_USERNAME)
 QUAY_TOKEN ?= ""
 REGISTRY_PASSWORD ?= $(QUAY_TOKEN)
 
-
 MANIFESTS_DIR ?= $(shell echo ${PWD})/tmp/manifests/$(BASE_BUNDLE_VERSION)
 MANIFESTS_BUNDLE_DIR ?= $(MANIFESTS_DIR)/$(GIT_COMMIT_ID)
 HACK_DIR ?= $(shell echo ${PWD})/hack
@@ -271,10 +271,9 @@ test-acceptance-setup: setup-venv
 ifeq ($(TEST_ACCEPTANCE_START_SBO), local)
 test-acceptance-setup: stop-local build test-cleanup create-test-namespace deploy-test-3rd-party-crds deploy-rbac deploy-crds
 	$(Q)echo "Starting local SBO instance"
-	$(eval TEST_ACCEPTANCE_SBO_STARTED := $(shell OPERATOR_NAMESPACE="$(TEST_NAMESPACE)" ZAP_FLAGS="$(ZAP_FLAGS)" OUTPUT="$(TEST_ACCEPTANCE_OUTPUT_DIR)" RUN_IN_BACKGROUND=true ./hack/deploy-sbo-local.sh))
+	$(eval TEST_ACCEPTANCE_SBO_STARTED := $(shell ZAP_FLAGS="$(ZAP_FLAGS)" OUTPUT="$(TEST_ACCEPTANCE_OUTPUT_DIR)" RUN_IN_BACKGROUND=true ./hack/deploy-sbo-local.sh))
 else ifeq ($(TEST_ACCEPTANCE_START_SBO), remote)
 test-acceptance-setup: test-cleanup create-test-namespace
-	$(Q)echo "Using remote SBO instance running in '$(SBO_NAMESPACE)' namespace"
 else ifeq ($(TEST_ACCEPTANCE_START_SBO), operator-hub)
 test-acceptance-setup:
 	$(eval TEST_ACCEPTANCE_SBO_STARTED := $(shell ./hack/deploy-sbo-operator-hub.sh))
@@ -288,7 +287,6 @@ test-acceptance: test-acceptance-setup
 	$(Q)TEST_ACCEPTANCE_START_SBO=$(TEST_ACCEPTANCE_START_SBO) \
 		TEST_ACCEPTANCE_SBO_STARTED=$(TEST_ACCEPTANCE_SBO_STARTED) \
 		TEST_NAMESPACE=$(TEST_NAMESPACE) \
-		SBO_NAMESPACE=$(SBO_NAMESPACE) \
 		$(PYTHON_VENV_DIR)/bin/behave --junit --junit-directory $(TEST_ACCEPTANCE_OUTPUT_DIR) $(V_FLAG) --no-capture --no-capture-stderr $(TEST_ACCEPTANCE_TAGS_ARG) $(EXTRA_BEHAVE_ARGS) test/acceptance/features
 ifeq ($(TEST_ACCEPTANCE_START_SBO), local)
 	$(Q)kill $(TEST_ACCEPTANCE_SBO_STARTED)
@@ -480,19 +478,22 @@ push-index-image: build-index-image registry-login
 ## Build and release operator, bundle and index images
 release-operator: push-operator-image push-bundle-image push-index-image
 
-.PHONY: dev-release
-## validating the operator by installing new quay releases
-dev-release:
-	BUNDLE_VERSION=$(BUNDLE_VERSION) ./hack/dev-release.sh
-
-.PHONY: validate-release
-## validate the operator by installing the releases
-validate-release: setup-venv
-	$(Q)$(PYTHON_VENV_DIR)/bin/pip install yq==2.10.0
-	BUNDLE_VERSION=$(BASE_BUNDLE_VERSION) CHANNEL="beta" ./hack/validate-release.sh
-
 .PHONY: prepare-operatorhub-pr
 ## prepare files for OperatorHub PR
 ## use this target when the operator needs to be released as upstream operator
 prepare-operatorhub-pr:
-	./hack/prepare-operatorhub-pr.sh $(OPERATOR_VERSION) $(OPERATOR_BUNDLE_IMAGE_REF)
\ No newline at end of file
+	./hack/prepare-operatorhub-pr.sh $(OPERATOR_VERSION) $(OPERATOR_BUNDLE_IMAGE_REF)
+
+.PHONY: deploy-from-index-image
+## deploy SBO via Catalog Source from a given index image
+deploy-from-index-image:
+	$(info "Installing SBO using a Catalog Source from '$(OPERATOR_INDEX_IMAGE_REF)' index image")
+	$(Q)OPERATOR_INDEX_IMAGE=$(OPERATOR_INDEX_IMAGE_REF) \
+		OPERATOR_CHANNEL=$(OPERATOR_CHANNEL) \
+		SKIP_REGISTRY_LOGIN=true \
+		./install.sh
+
+.PHONY: test-acceptance-with-bundle
+## Run acceptance tests with the operator installed from a given index image and channel
+test-acceptance-with-bundle: deploy-from-index-image
+	$(Q)TEST_ACCEPTANCE_START_SBO=remote $(MAKE) test-acceptance
\ No newline at end of file
diff --git a/deploy/crds/operators.coreos.com_servicebindings_crd.yaml b/deploy/crds/operators.coreos.com_servicebindings_crd.yaml
index f6b80c78..e16f3edd 100644
--- a/deploy/crds/operators.coreos.com_servicebindings_crd.yaml
+++ b/deploy/crds/operators.coreos.com_servicebindings_crd.yaml
@@ -123,113 +123,32 @@ spec:
               - version
               type: object
             bindAsFiles:
-              description: BindAsFiles flag enable binding values as files.
+              description: BindAsFiles makes available the binding values as files
+                in the application's container See MountPath attribute description
+                for more details.
               type: boolean
-            customEnvVar:
-              description: Custom env variables
+            detectBindingResources:
+              description: DetectBindingResources is flag used to bind all non-bindable
+                variables from different subresources owned by backing operator CR.
+              type: boolean
+            mappings:
+              description: Custom mappings
               items:
-                description: EnvVar represents an environment variable present in
-                  a Container.
+                description: ServiceBindingMapping defines a new binding from set
+                  of existing bindings
                 properties:
                   name:
-                    description: Name of the environment variable. Must be a C_IDENTIFIER.
+                    description: Name is the name of new binding
                     type: string
                   value:
-                    description: 'Variable references $(VAR_NAME) are expanded using
-                      the previous defined environment variables in the container
-                      and any service environment variables. If a variable cannot
-                      be resolved, the reference in the input string will be unchanged.
-                      The $(VAR_NAME) syntax can be escaped with a double $$, ie:
-                      $$(VAR_NAME). Escaped references will never be expanded, regardless
-                      of whether the variable exists or not. Defaults to "".'
+                    description: Value is a template which will be rendered and ibjected
+                      into the application
                     type: string
-                  valueFrom:
-                    description: Source for the environment variable's value. Cannot
-                      be used if value is not empty.
-                    properties:
-                      configMapKeyRef:
-                        description: Selects a key of a ConfigMap.
-                        properties:
-                          key:
-                            description: The key to select.
-                            type: string
-                          name:
-                            description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
-                              TODO: Add other useful fields. apiVersion, kind, uid?'
-                            type: string
-                          optional:
-                            description: Specify whether the ConfigMap or its key
-                              must be defined
-                            type: boolean
-                        required:
-                        - key
-                        type: object
-                      fieldRef:
-                        description: 'Selects a field of the pod: supports metadata.name,
-                          metadata.namespace, metadata.labels, metadata.annotations,
-                          spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP.'
-                        properties:
-                          apiVersion:
-                            description: Version of the schema the FieldPath is written
-                              in terms of, defaults to "v1".
-                            type: string
-                          fieldPath:
-                            description: Path of the field to select in the specified
-                              API version.
-                            type: string
-                        required:
-                        - fieldPath
-                        type: object
-                      resourceFieldRef:
-                        description: 'Selects a resource of the container: only resources
-                          limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage,
-                          requests.cpu, requests.memory and requests.ephemeral-storage)
-                          are currently supported.'
-                        properties:
-                          containerName:
-                            description: 'Container name: required for volumes, optional
-                              for env vars'
-                            type: string
-                          divisor:
-                            description: Specifies the output format of the exposed
-                              resources, defaults to "1"
-                            type: string
-                          resource:
-                            description: 'Required: resource to select'
-                            type: string
-                        required:
-                        - resource
-                        type: object
-                      secretKeyRef:
-                        description: Selects a key of a secret in the pod's namespace
-                        properties:
-                          key:
-                            description: The key of the secret to select from.  Must
-                              be a valid secret key.
-                            type: string
-                          name:
-                            description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
-                              TODO: Add other useful fields. apiVersion, kind, uid?'
-                            type: string
-                          optional:
-                            description: Specify whether the Secret or its key must
-                              be defined
-                            type: boolean
-                        required:
-                        - key
-                        type: object
-                    type: object
                 required:
                 - name
+                - value
                 type: object
               type: array
-            detectBindingResources:
-              description: DetectBindingResources is flag used to bind all non-bindable
-                variables from different subresources owned by backing operator CR.
-              type: boolean
-            envVarPrefix:
-              description: EnvVarPrefix is the prefix for environment variables
-              type: string
             mountPath:
               description: MountPath is the path inside app container where bindings
                 will be mounted If `SERVICE_BINDING_ROOT` env var is present, mountPath
@@ -239,14 +158,16 @@ spec:
                 `/bindings` When mountPath is used, the file will be mounted directly
                 under that directory Otherwise it will be under `SERVICE_BINDING_ROOT`/<SERVICE-BINDING-NAME>
               type: string
+            namePrefix:
+              description: NamePrefix is the prefix for environment variables or file
+                name
+              type: string
             services:
               description: Services is used to identify multiple backing services.
               items:
                 description: Service defines the selector based on resource name,
                   version, and resource kind
                 properties:
-                  envVarPrefix:
-                    type: string
                   group:
                     type: string
                   id:
@@ -257,6 +178,8 @@ spec:
                     description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
                       TODO: Add other useful fields. apiVersion, kind, uid?'
                     type: string
+                  namePrefix:
+                    type: string
                   namespace:
                     type: string
                   version:
diff --git a/docs/application-author.md b/docs/application-author.md
index da4b56ef..735c88be 100644
--- a/docs/application-author.md
+++ b/docs/application-author.md
@@ -152,7 +152,7 @@ spec:
     name: mytranslator-binding <--- Translation service
     id: translationService
 
-  customEnvVar:
+  mappings:
     ## From the database service
     - name: JDBC_URL
       value: 'jdbc:postgresql://{{ .postgresDB.status.dbConnectionIP }}:{{ .postgresDB.status.dbConnectionPort }}/{{ .postgresDB.status.dbName }}'
diff --git a/docs/binding-path.md b/docs/binding-path.md
index 09743ea1..58cd2d8c 100644
--- a/docs/binding-path.md
+++ b/docs/binding-path.md
@@ -29,7 +29,7 @@ kind: ServiceBindingRequest
 metadata:
     name: binding-request
 spec:
-    envVarPrefix: qiye111
+    namePrefix: qiye111
     applicationSelector:
         name: example-appconfig
         group: stable.example.com
@@ -43,7 +43,7 @@ spec:
         kind: Database
         name: example-db
         id: zzz
-        envVarPrefix: qiye
+        namePrefix: qiye
 ```
 
 After reconciliation, the `spec.containers` is going to be updated with
@@ -95,7 +95,7 @@ kind: ServiceBindingRequest
 metadata:
     name: binding-request
 spec:
-    envVarPrefix: qiye111
+    namePrefix: qiye111
     applicationSelector:
         name: example-appconfig
         group: stable.example.com
@@ -109,7 +109,7 @@ spec:
         kind: Database
         name: example-db
         id: zzz
-        envVarPrefix: qiye
+        namePrefix: qiye
 ```
 
 After reconciliation, the `spec.secret` is going to be updated with
diff --git a/examples/java_postgresql_customvar/README.md b/examples/java_postgresql_customvar/README.md
index ec8e7054..f3f1bba4 100644
--- a/examples/java_postgresql_customvar/README.md
+++ b/examples/java_postgresql_customvar/README.md
@@ -200,7 +200,7 @@ spec:
     kind: Database
     name: db-demo
     id: postgresDB
-  customEnvVar:
+  mappings:
   - name: JDBC_URL
     value: 'jdbc:postgresql://{{ .postgresDB.status.dbConnectionIP }}:{{ .postgresDB.status.dbConnectionPort }}/{{ .postgresDB.status.dbName }}'
   - name: DB_USER
@@ -214,7 +214,7 @@ There are 2 parts in the request:
 
 * `application` - used to search for the application based on the name that we set earlier and the `group`, `version` and `resource` of the application to be a `Deployment` named `java-app`.
 * `services` - used to find the backing service - our operator-backed DB instance called `db-demo`.
-* `customEnvVar` - used to create custom environment variables constructed using a templating engine from out-of-the-box bound information.
+* `mappings` - used to create custom environment variables constructed using a templating engine from out-of-the-box bound information.
 
 That causes the application to be re-deployed.
 Once the new version is up, go to the application's route to check the UI. Now, it works!
@@ -331,4 +331,4 @@ DATABASE_USERLABELS_ARCHIVE=false
 DATABASE_USERLABELS_ENVIRONMENT=demo
 ```
 
-Notice, distinct environment variables are produced for sibling properties of the `tags`, `secretName` and `userLabels` in the variable name.
\ No newline at end of file
+Notice, distinct environment variables are produced for sibling properties of the `tags`, `secretName` and `userLabels` in the variable name.
diff --git a/examples/knative_postgresql_customvar/README.md b/examples/knative_postgresql_customvar/README.md
index 5d511c5d..380c3786 100644
--- a/examples/knative_postgresql_customvar/README.md
+++ b/examples/knative_postgresql_customvar/README.md
@@ -169,7 +169,7 @@ spec:
     kind: Database
     name: db-demo
     id: knav
-  customEnvVar:
+  mappings:
     - name: JDBC_URL
       value: jdbc:postgresql://{{ .knav.status.dbConnectionIP }}:{{ .knav.status.dbConnectionPort }}/{{ .knav.status.dbName }}
     - name: DB_USER
@@ -183,7 +183,7 @@ There are 3 parts in the request:
 
 * `application` - used to search for the application based on the name that we set earlier and the `group`, `version` and `resource` of the application to be a knative `Service`.
 * `services` - used to find the backing service - our operator-backed DB instance called `db-demo`.
-* `customEnvVar` - used to create custom environment variables constructed using a templating engine from out-of-the-box bound information.
+* `mappings` - used to create custom environment variables and files constructed using a templating engine from out-of-the-box bound information.
 
 That causes the application to be re-deployed.
 
diff --git a/examples/nodejs_awsrds_varprefix/README.md b/examples/nodejs_awsrds_varprefix/README.md
index 4686f734..02d24cc8 100644
--- a/examples/nodejs_awsrds_varprefix/README.md
+++ b/examples/nodejs_awsrds_varprefix/README.md
@@ -2,7 +2,7 @@
 
 ## Introduction
 
-This scenario illustrates binding an application to an off-cluster operated managed AWS RDS Database. The scenario also shows how to bind the backing service to two different independent applications and use of the `envVarPrefix` feature of the Service Binding Operator to specify a prefix for the names of the injected environment variables.
+This scenario illustrates binding an application to an off-cluster operated managed AWS RDS Database. The scenario also shows how to bind the backing service to two different independent applications and use of the `namePrefix` feature of the Service Binding Operator to specify a prefix for the names of the injected environment variables.
 
 ## Actions to Perform by Users in 2 Roles
 
@@ -290,7 +290,7 @@ metadata:
   name: mydb.to.shell-app
   namespace: service-binding-demo
 spec:
-  envVarPrefix: "MYDB"
+  namePrefix: "MYDB"
   services:
   - group: aws.pmacik.dev
     version: v1alpha1
@@ -306,7 +306,7 @@ EOD
 
 There are 3 interesting parts in the request:
 
-* `envVarPrefix` - specifies the prefix for all the environment variables injected to the bound application
+* `namePrefix` - specifies the prefix for all the environment variables injected to the bound application
 * `services` - used to find the backing service - our operator-backed DB instance called `mydb`
 * `application` - used to search for the application based on the name and the `resourceKind` of the application to be a `DeploymentConfig`
 
diff --git a/examples/nodejs_ibmcloud_operator/README.md b/examples/nodejs_ibmcloud_operator/README.md
index 8712a89a..0fba906d 100644
--- a/examples/nodejs_ibmcloud_operator/README.md
+++ b/examples/nodejs_ibmcloud_operator/README.md
@@ -2,7 +2,7 @@
 
 ## Introduction
 
-This scenario illustrates binding an imported application to an off-cluster operator-managed IBM Cloud Service. The scenario also shows the use of the `customEnvVar` feature of the Service Binding Operator to specify a mapping for the injected environment variables.
+This scenario illustrates binding an imported application to an off-cluster operator-managed IBM Cloud Service. The scenario also shows the use of the `mappings` feature of the Service Binding Operator to specify a mapping for the injected environment variables.
 
 ## Actions to Perform by Users in 2 Roles
 
@@ -184,7 +184,7 @@ environment variables required by the sample node.js app.
 More specifically, the node.js app requires two environment variables: `LANGUAGE_TRANSLATOR_URL`
 and `LANGUAGE_TRANSLATOR_IAM_APIKEY`. These keys are available in the backing service secret as
 `url` and `apikey` respectively, and they can be mapped to the variables required by the app using
-the `customEnvVar` feature of the service binding operator.
+the `mappings` feature of the service binding operator.
 
 All we need to do is to create the following `ServiceBinding`:
 
@@ -208,7 +208,7 @@ spec:
     group: apps
     version: v1
     resource: deployments
-  customEnvVar:
+  mappings:
      - name: LANGUAGE_TRANSLATOR_URL
        value: '{{ .tr.status.secretName.url }}'
      - name: LANGUAGE_TRANSLATOR_IAM_APIKEY
@@ -220,7 +220,7 @@ There are 3 interesting parts in the request:
 
 * `services` - used to find the backing service - the operator-backed language translator instance with name `mytranslator-binding`.
 * `application` - used to search for the application based on the name and the `resourceKind` of the application to be a `DeploymentConfig`, matched by the label `app=language-translator-nodejs`.
-* `customEnvVar` - specifies the mapping for the environment variables injected into the bound application.
+* `mappings` - specifies the mapping for the environment variables injected into the bound application.
 
 That causes the node.js deployment to restart the pod with the new mapping.
 
diff --git a/examples/pod_spec_path/README.md b/examples/pod_spec_path/README.md
index 67df7b06..9403a3e4 100644
--- a/examples/pod_spec_path/README.md
+++ b/examples/pod_spec_path/README.md
@@ -95,7 +95,7 @@ kind: ServiceBinding
 metadata:
     name: binding-request-sample
 spec:
-    envVarPrefix: qiye111
+    namePrefix: qiye111
     application:
         name: demo-appconfig
         group: stable.example.com
@@ -109,7 +109,7 @@ spec:
         kind: Database
         name: db-demo
         id: zzz
-        envVarPrefix: qiye
+        namePrefix: qiye
 EOD
 ```
 
diff --git a/hack/check-operatorsource-pods.sh b/hack/check-operatorsource-pods.sh
deleted file mode 100755
index 99417772..00000000
--- a/hack/check-operatorsource-pods.sh
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/bin/bash
-
-function check_pod () {
-    for i in  {1..120} ; do
-        local running_status=`kubectl get pods -n openshift-marketplace | grep "example-operators" | awk '{print $3}'`
-        if [[ ${running_status} == "Running" ]] ; then
-            return 0
-        fi
-
-        sleep 3
-    done
-
-    return 1
-}
-
-
-echo "# Searching for operator source pod."
-
-if ! check_pod ; then
-    echo "Operator source pod is not running"
-    exit 1
-fi
-
-RUNNING_STATUS=`kubectl get pods -n openshift-marketplace | grep "example-operators" | awk '{print $3}'`
-
-echo "Operator source pod found with status: ${RUNNING_STATUS}"
diff --git a/hack/deploy-sbo-local.sh b/hack/deploy-sbo-local.sh
index 8a9299ce..87a18eb7 100755
--- a/hack/deploy-sbo-local.sh
+++ b/hack/deploy-sbo-local.sh
@@ -1,6 +1,5 @@
 #!/bin/bash -x
 
-OPERATOR_NAMESPACE=${OPERATOR_NAMESPACE:-}
 ZAP_FLAGS=${ZAP_FLAGS:-}
 
 OUTPUT="${OUTPUT:-out/acceptance-tests}"
diff --git a/hack/dev-release.sh b/hack/dev-release.sh
deleted file mode 100755
index b2fe83dd..00000000
--- a/hack/dev-release.sh
+++ /dev/null
@@ -1,46 +0,0 @@
-#!/bin/bash
-
-set -e
-set -u
-
-OPERATOR_SOURCE="./test/operator-hub/operator_source.yaml"
-SUBSCRIPTION="./test/operator-hub/subscription.yaml"
-INSTALL_PLAN_PRIOR=service-binding-operator.v${BUNDLE_VERSION}
-
-sed -i -e "s,REPLACE_CSV_VERSION,service-binding-operator.v${BUNDLE_VERSION},g" ${SUBSCRIPTION}
-
-kubectl apply -f ${OPERATOR_SOURCE}
-./hack/check-operatorsource-pods.sh
-RUNNING_STATUS=`kubectl get pods -n openshift-marketplace | grep "example-operators" | awk '{print $3}'`
-if [ ${RUNNING_STATUS} != "Running" ] ; then
-	echo "Operator marketplace pod is not running"
-fi
-# Subscribing to the operator
-kubectl apply -f ${SUBSCRIPTION}
-./hack/check-installplan.sh
-INSTALL_PLAN=`kubectl get subscriptions service-binding-operator -n openshift-operators -o jsonpath='{.status.installPlanRef.name}'`
-kubectl patch installplan ${INSTALL_PLAN} -n openshift-operators --type merge --patch '{"spec": {"approved": true}}'
-
-./hack/check-crds.sh
-./hack/check-csvs.sh
-INSTALL_PLAN_PRIOR=service-binding-operator.v${BUNDLE_VERSION}
-VERSION_NUMBER=`kubectl get csvs  -n=default -o jsonpath='{.items[*].spec.version}'`
-if [ "${VERSION_NUMBER}" = "${BUNDLE_VERSION}" ] ; then
-    echo -e "OLM Bundle Version validation succeeded \n ";
-	kubectl get csvs -n=default -o jsonpath='{.items[*].metadata.annotations.alm-examples}' | cut -d "[" -f 2 | cut -d "]" -f 1 > output.json;
-	kubectl apply -n=default -f ./output.json;
-	if [ $? = 0 ] ; then
-		echo "CSV alm example validation succeeded"
-	fi
-	if [ `kubectl get installplans -n=openshift-operators -o jsonpath='{.items[*].status.phase}'` = "Complete" ] ; then
-		INSTALL_PLAN=`kubectl get installplans -n=openshift-operators -o jsonpath='{.items[*].spec.clusterServiceVersionNames[0]}'`
-		if [ "${INSTALL_PLAN_PRIOR}" = "${INSTALL_PLAN}" ] ; then
-			echo "Install Plan validation succeeded. OLM Bundle Validation succeeded"
-		fi
-	fi
-	exit 0
-else
-	echo -e "OLM Bundle validation failed \n"
-	echo "Version number: ${VERSION_NUMBER} \nBuild version: ${BUNDLE_VERSION}"
-	exit 1
-fi
diff --git a/hack/validate-release.sh b/hack/validate-release.sh
deleted file mode 100755
index f058a66a..00000000
--- a/hack/validate-release.sh
+++ /dev/null
@@ -1,40 +0,0 @@
-#!/bin/bash
-
-set -e
-set -u
-
-SUBSCRIPTION="./test/operator-hub/subscription2.yaml"
-BUNDLE_VERSION=`curl -s https://raw.githubusercontent.com/operator-framework/community-operators/master/community-operators/service-binding-operator/service-binding-operator.package.yaml | ./out/venv3/bin/yq -r '.channels[] | select (.name == '\"$CHANNEL\"') | .currentCSV | sub("service-binding-operator.v"; "") '`
-INSTALL_PLAN_PRIOR=service-binding-operator.v${BUNDLE_VERSION}
-
-# Subscribing to the operator
-kubectl apply -f ${SUBSCRIPTION}
-RUNNING_STATUS=`kubectl get pods -n openshift-marketplace | grep "community-operators" | awk '{print $3}'`
-if [[ ${RUNNING_STATUS} = "Running" ]] ; then
-	echo "Operator marketplace pod is running"
-fi
-./hack/check-crds.sh
-./hack/check-csvs.sh
-VERSION_NUMBER=`kubectl get csvs service-binding-operator.v${BUNDLE_VERSION} -n=default -o jsonpath='{.spec.version}'`
-if [ "${VERSION_NUMBER}" = "${BUNDLE_VERSION}" ] ; then
-    echo -e "OLM Bundle Version validation succeeded \n ";
-	rm -f ./output.json;
-	kubectl get csvs service-binding-operator.v${BUNDLE_VERSION} -n=default -o jsonpath='{.metadata.annotations.alm-examples}' | cut -d "[" -f 2 | cut -d "]" -f 1 > output.json;
-	kubectl apply -n=default -f ./output.json;
-	rm -f ./output.json;
-	if [ $? = 0 ] ; then
-		echo "CSV alm example validation succeeded"
-	fi
-    install_plan_name=`kubectl get subscriptions service-binding-operator -n openshift-operators -o jsonpath='{.status.installPlanRef.name}'`
-	if [ `kubectl get installplans ${install_plan_name} -n=openshift-operators -o jsonpath='{.status.phase}'` == "Complete" ] ; then
-		INSTALL_PLAN=`kubectl get installplans ${install_plan_name} -n=openshift-operators -o jsonpath='{.spec.clusterServiceVersionNames[0]}'`
-		if [ "${INSTALL_PLAN_PRIOR}" = "${INSTALL_PLAN}" ] ; then
-			echo "Install Plan validation succeeded. OLM Bundle Validation succeeded"
-		fi
-	fi
-	exit 0
-else
-	echo -e "OLM Bundle validation failed \n"
-	echo "Version number: ${VERSION_NUMBER} \nBuild version: ${BUNDLE_VERSION}"
-	exit 1
-fi
diff --git a/install.sh b/install.sh
index 49ebd50a..47158e94 100755
--- a/install.sh
+++ b/install.sh
@@ -1,47 +1,49 @@
 #!/bin/bash -e
 
 OLM_VERSION=0.17.0
-OPERATOR_INDEX_IMAGE=${OPERATOR_INDEX_IMAGE:-registry.redhat.io/redhat/community-operator-index:latest}
-OPERATOR_REGISTRY_REF=$(echo $OPERATOR_INDEX_IMAGE | cut -f 1 -d '/')
 OPERATOR_CHANNEL=${OPERATOR_CHANNEL:-beta}
 DOCKER_CFG=${DOCKER_CFG:-$HOME/.docker/config.json}
 CONTAINER_RUNTIME=${CONTAINER_RUNTIME:-docker}
 
-#The SBO can also be installed in a vanilla kubernetes cluster. A prerequisite for this would be to add credentials for the registry.redhat.io in the cluster. Steps to be followed to achieve the same are listed below:
-#1) Follow [Red Hat Container Registry Authentication Steps](https://access.redhat.com/RegistryAuthentication)
-#2) Verify that your credentials are correct using docker login -u <your_username> -p <your_passwd> registry.redhat.io
-
-if [ -z "$SKIP_REGISTRY_LOGIN" ]; then
-  if [ -z "$OPERATOR_REGISTRY_USERNAME" ]; then
-    ${CONTAINER_RUNTIME} login $OPERATOR_REGISTRY_REF
-  else
-    ${CONTAINER_RUNTIME} login -u "$OPERATOR_REGISTRY_USERNAME" --pasword-stdin $OPERATOR_REGISTRY_REF <<<$OPERATOR_REGISTRY_PASSWORD
-  fi
+if [ "$(kubectl get crd clusterserviceversions.operators.coreos.com &>1 || echo false)" == "false" ]; then
+  curl -sL https://github.com/operator-framework/operator-lifecycle-manager/releases/download/v${OLM_VERSION}/install.sh | bash -s v${OLM_VERSION}
 fi
 
-#3) Start a kubernetes cluster. Any Kubernetes cluster can be used as well. The script assumes that a Kubernetes is up and running and the user has logged into it.
+CATSRC_NAMESPACE="${CATSRC_NAMESPACE:-$(kubectl get catalogsources.operators.coreos.com --all-namespaces -o jsonpath='{.items[0].metadata.namespace}' --ignore-not-found=true)}"
 
-#4) Enable [OLM](https://github.com/operator-framework/operator-lifecycle-manager) in the cluster by running the following command
-curl -sL https://github.com/operator-framework/operator-lifecycle-manager/releases/download/v${OLM_VERSION}/install.sh | bash -s v${OLM_VERSION}
-#On minikube you can alternatively install OLM by running `minikube addons enable olm`
+OPNS="$(kubectl get namespaces -o name | grep -E '.*/(.+-)?operators$' || test $? = 1)"
+OPERATOR_NAMESPACE=${OPNS#"namespace/"}
 
-#5) Create a new image pull secret out of your local .docker/config.json file
-if [ -r "$DOCKER_CFG" ]; then
-  kubectl create secret generic sbo-operators-secrets -n olm --from-file=.dockerconfigjson=$DOCKER_CFG --type=kubernetes.io/dockerconfigjson
+if [ -n "$OPERATOR_INDEX_IMAGE" ]; then
+  if [ -r "$DOCKER_CFG" ]; then
+    kubectl create secret generic sbo-operators-secrets -n $CATSRC_NAMESPACE --from-file=.dockerconfigjson=$DOCKER_CFG --type=kubernetes.io/dockerconfigjson --dry-run=client -o json | kubectl apply -f -
+    kubectl patch serviceaccount default -p '{"imagePullSecrets": [{"name": "sbo-operators-secrets"}]}' -n=$CATSRC_NAMESPACE
+  fi
 
-  #6) Add that pull secret to the default account in olm namespace
-  kubectl patch serviceaccount default -p '{"imagePullSecrets": [{"name": "sbo-operators-secrets"}]}' -n=olm
-fi
+  OPERATOR_REGISTRY_REF=$(echo $OPERATOR_INDEX_IMAGE | cut -f 1 -d '/')
+
+  if [ -z "$SKIP_REGISTRY_LOGIN" ]; then
+    if [ -z "$OPERATOR_REGISTRY_USERNAME" ]; then
+      ${CONTAINER_RUNTIME} login $OPERATOR_REGISTRY_REF
+    else
+      ${CONTAINER_RUNTIME} login -u "$OPERATOR_REGISTRY_USERNAME" --pasword-stdin $OPERATOR_REGISTRY_REF <<<$OPERATOR_REGISTRY_PASSWORD
+    fi
+  fi
 
-#7) Install the operator by running the following commands
-#Apply CatalogSource for obtaining catalog of SBO operators
-kubectl apply -f - << EOD
+  CATSRC_ALREADY_FOUND=$(kubectl get catsrc -n $CATSRC_NAMESPACE -o json | jq -rc '.items[] | select(.spec.image=="'$OPERATOR_INDEX_IMAGE'").metadata.name')
+  if [ -n "$CATSRC_ALREADY_FOUND" ]; then
+    echo "Catalog source with a given index image already found in namespace '$CATSRC_NAMESPACE': '$CATSRC_ALREADY_FOUND', using it for subscription."
+    CATSRC_NAME=$CATSRC_ALREADY_FOUND
+  else
+    CATSRC_NAME=${CATSRC_NAME:-catsrc-$(echo -n "$OPERATOR_INDEX_IMAGE" | sed -e 's,[/:\.],-,g')}
+    #Apply CatalogSource for obtaining catalog of SBO operators
+    kubectl apply -f - << EOD
 ---
 apiVersion: operators.coreos.com/v1alpha1
 kind: CatalogSource
 metadata:
-  name: sbo-operators
-  namespace: olm
+  name: $CATSRC_NAME
+  namespace: $CATSRC_NAMESPACE
 spec:
   displayName: SBO Operators
   image: $OPERATOR_INDEX_IMAGE
@@ -51,28 +53,48 @@ spec:
     registryPoll:
       interval: 10m0s
 EOD
+  fi
+else
+  CATSRC_CANDIDATES=(
+    operatorhubio-catalog
+    redhat-operators
+  )
+  for i in ${CATSRC_CANDIDATES[@]} ; do
+    if [ "$(kubectl get catsrc $i -n $CATSRC_NAMESPACE -o name --ignore-not-found | wc -l)" -gt 0 ]; then
+      CATSRC_NAME=${CATSRC_NAME:-$i}
+      break
+    fi
+  done
+fi
+
 #Apply subscription for subscribing to the requested channel of the service binding operator
-kubectl apply -f - << EOD
+SUB_ALREADY_FOUND=$(kubectl get sub -n $OPERATOR_NAMESPACE -o json --ignore-not-found | jq -rc '.items[] | select(.spec.source == "'$CATSRC_NAME'" and .spec.sourceNamespace == "'$CATSRC_NAMESPACE'" and .spec.channel == "'$OPERATOR_CHANNEL'").metadata.name')
+if [ -n "$SUB_ALREADY_FOUND" ]; then
+  echo "Subscription to the given channel '$OPERATOR_CHANNEL' of the given Catalog Source '$CATSRC_NAMESPACE/$CATSRC_NAME)' already found: '$SUB_ALREADY_FOUND'."
+  echo "Skipping creation of the subscription to avoid duplicities."
+else
+  kubectl apply -f - << EOD
 ---
 apiVersion: operators.coreos.com/v1alpha1
 kind: Subscription
 metadata:
   name: service-binding-operator
-  namespace: operators
+  namespace: $OPERATOR_NAMESPACE
 spec:
   channel: $OPERATOR_CHANNEL
   installPlanApproval: Automatic
   name: service-binding-operator
-  source: sbo-operators
-  sourceNamespace: olm
+  source: $CATSRC_NAME
+  sourceNamespace: $CATSRC_NAMESPACE
 EOD
-#This Operator will be installed in the "operators" namespace and will be usable from all namespaces in the cluster.
+fi
 
+#Wait for the operator to get up and running
 retries=50
 until [[ $retries == 0 ]]; do
-  kubectl get deployment/service-binding-operator -n operators >/dev/null 2>&1 && break
-  echo "Waiting for service-binding-operator to be created"
+  kubectl get deployment/service-binding-operator -n $OPERATOR_NAMESPACE >/dev/null 2>&1 && break
+  echo "Waiting for service-binding-operator to be created in $OPERATOR_NAMESPACE namespace"
   sleep 5
   retries=$(($retries - 1))
 done
-kubectl rollout status -w deployment/service-binding-operator -n operators
\ No newline at end of file
+kubectl rollout status -w deployment/service-binding-operator -n $OPERATOR_NAMESPACE
\ No newline at end of file
diff --git a/pkg/apis/operators/v1alpha1/servicebinding_types.go b/pkg/apis/operators/v1alpha1/servicebinding_types.go
index 189e8ec2..b2796a3c 100644
--- a/pkg/apis/operators/v1alpha1/servicebinding_types.go
+++ b/pkg/apis/operators/v1alpha1/servicebinding_types.go
@@ -19,13 +19,13 @@ type ServiceBindingSpec struct {
 	// +optional
 	MountPath string `json:"mountPath,omitempty"`
 
-	// EnvVarPrefix is the prefix for environment variables
+	// NamePrefix is the prefix for environment variables or file name
 	// +optional
-	EnvVarPrefix string `json:"envVarPrefix,omitempty"`
+	NamePrefix string `json:"namePrefix,omitempty"`
 
-	// Custom env variables
+	// Custom mappings
 	// +optional
-	CustomEnvVar []corev1.EnvVar `json:"customEnvVar,omitempty"`
+	Mappings []Mapping `json:"mappings,omitempty"`
 
 	// Services is used to identify multiple backing services.
 	// +kubebuilder:validation:MinItems:=1
@@ -47,6 +47,14 @@ type ServiceBindingSpec struct {
 	BindAsFiles bool `json:"bindAsFiles,omitempty"`
 }
 
+// ServiceBindingMapping defines a new binding from set of existing bindings
+type Mapping struct {
+	// Name is the name of new binding
+	Name string `json:"name"`
+	// Value is a template which will be rendered and ibjected into the application
+	Value string `json:"value"`
+}
+
 // ServiceBindingStatus defines the observed state of ServiceBinding
 // +k8s:openapi-gen=true
 type ServiceBindingStatus struct {
@@ -67,9 +75,9 @@ type Service struct {
 	corev1.LocalObjectReference `json:",inline"`
 
 	// +optional
-	Namespace    *string `json:"namespace,omitempty"`
-	EnvVarPrefix *string `json:"envVarPrefix,omitempty"`
-	Id           *string `json:"id,omitempty"`
+	Namespace  *string `json:"namespace,omitempty"`
+	NamePrefix *string `json:"namePrefix,omitempty"`
+	Id         *string `json:"id,omitempty"`
 }
 
 // BoundApplication defines the application workloads to which the binding secret has
diff --git a/pkg/apis/operators/v1alpha1/zz_generated.deepcopy.go b/pkg/apis/operators/v1alpha1/zz_generated.deepcopy.go
index 62871307..374b371e 100644
--- a/pkg/apis/operators/v1alpha1/zz_generated.deepcopy.go
+++ b/pkg/apis/operators/v1alpha1/zz_generated.deepcopy.go
@@ -22,7 +22,6 @@ package v1alpha1
 
 import (
 	conditionsv1 "github.com/openshift/custom-resource-status/conditions/v1"
-	corev1 "k8s.io/api/core/v1"
 	v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
 	runtime "k8s.io/apimachinery/pkg/runtime"
 )
@@ -89,6 +88,22 @@ func (in *BoundApplication) DeepCopy() *BoundApplication {
 	return out
 }
 
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *Mapping) DeepCopyInto(out *Mapping) {
+	*out = *in
+	return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Mapping.
+func (in *Mapping) DeepCopy() *Mapping {
+	if in == nil {
+		return nil
+	}
+	out := new(Mapping)
+	in.DeepCopyInto(out)
+	return out
+}
+
 // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
 func (in *Service) DeepCopyInto(out *Service) {
 	*out = *in
@@ -99,8 +114,8 @@ func (in *Service) DeepCopyInto(out *Service) {
 		*out = new(string)
 		**out = **in
 	}
-	if in.EnvVarPrefix != nil {
-		in, out := &in.EnvVarPrefix, &out.EnvVarPrefix
+	if in.NamePrefix != nil {
+		in, out := &in.NamePrefix, &out.NamePrefix
 		*out = new(string)
 		**out = **in
 	}
@@ -186,12 +201,10 @@ func (in *ServiceBindingList) DeepCopyObject() runtime.Object {
 // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
 func (in *ServiceBindingSpec) DeepCopyInto(out *ServiceBindingSpec) {
 	*out = *in
-	if in.CustomEnvVar != nil {
-		in, out := &in.CustomEnvVar, &out.CustomEnvVar
-		*out = make([]corev1.EnvVar, len(*in))
-		for i := range *in {
-			(*in)[i].DeepCopyInto(&(*out)[i])
-		}
+	if in.Mappings != nil {
+		in, out := &in.Mappings, &out.Mappings
+		*out = make([]Mapping, len(*in))
+		copy(*out, *in)
 	}
 	if in.Services != nil {
 		in, out := &in.Services, &out.Services
diff --git a/pkg/controller/servicebinding/custom_env_parser.go b/pkg/controller/servicebinding/custom_env_parser.go
index 5c671e4e..8dece7d2 100644
--- a/pkg/controller/servicebinding/custom_env_parser.go
+++ b/pkg/controller/servicebinding/custom_env_parser.go
@@ -5,25 +5,25 @@ import (
 	"encoding/json"
 	"text/template"
 
-	corev1 "k8s.io/api/core/v1"
+	"github.com/redhat-developer/service-binding-operator/pkg/apis/operators/v1alpha1"
 )
 
-// customEnvParser is responsible to interpolate a given EnvVar containing templates.
-type customEnvParser struct {
-	EnvMap []corev1.EnvVar
+// mappingsParser is responsible to interpolate a given EnvVar containing templates.
+type mappingsParser struct {
+	EnvMap []v1alpha1.Mapping
 	Cache  map[string]interface{}
 }
 
-// newCustomEnvParser returns a new CustomEnvParser.
-func newCustomEnvParser(envMap []corev1.EnvVar, cache map[string]interface{}) *customEnvParser {
-	return &customEnvParser{
+// newCustomEnvParser returns a new mappingsParser.
+func newMappingsParser(envMap []v1alpha1.Mapping, cache map[string]interface{}) *mappingsParser {
+	return &mappingsParser{
 		EnvMap: envMap,
 		Cache:  cache,
 	}
 }
 
 // Parse interpolates and caches the templates in EnvMap.
-func (c *customEnvParser) Parse() (map[string]interface{}, error) {
+func (c *mappingsParser) Parse() (map[string]interface{}, error) {
 	data := make(map[string]interface{})
 	for _, v := range c.EnvMap {
 		tmpl, err := template.New("set").Funcs(template.FuncMap{"json": marshalToJSON}).Parse(v.Value)
diff --git a/pkg/controller/servicebinding/reconciler.go b/pkg/controller/servicebinding/reconciler.go
index 66400b81..e04cf9db 100644
--- a/pkg/controller/servicebinding/reconciler.go
+++ b/pkg/controller/servicebinding/reconciler.go
@@ -191,9 +191,9 @@ func (r *reconciler) Reconcile(request reconcile.Request) (reconcile.Result, err
 	}
 	binding, err := buildBinding(
 		r.dynClient,
-		sbr.Spec.CustomEnvVar,
+		sbr.Spec.Mappings,
 		serviceCtxs,
-		sbr.Spec.EnvVarPrefix,
+		sbr.Spec.NamePrefix,
 	)
 	if err != nil {
 		return requeueError(err)
diff --git a/pkg/controller/servicebinding/retriever.go b/pkg/controller/servicebinding/retriever.go
index 341ac8bc..3c76a6d4 100644
--- a/pkg/controller/servicebinding/retriever.go
+++ b/pkg/controller/servicebinding/retriever.go
@@ -3,11 +3,11 @@ package servicebinding
 import (
 	"strings"
 
-	corev1 "k8s.io/api/core/v1"
 	"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
 	"k8s.io/apimachinery/pkg/runtime/schema"
 	"k8s.io/client-go/dynamic"
 
+	"github.com/redhat-developer/service-binding-operator/pkg/apis/operators/v1alpha1"
 	"github.com/redhat-developer/service-binding-operator/pkg/controller/servicebinding/envvars"
 	"github.com/redhat-developer/service-binding-operator/pkg/log"
 )
@@ -32,15 +32,15 @@ func createServiceIndexPath(name string, gvk schema.GroupVersionKind) []string {
 
 }
 
-func buildServiceEnvVars(svcCtx *serviceContext, globalEnvVarPrefix string) (map[string]string, error) {
+func buildServiceEnvVars(svcCtx *serviceContext, globalNamePrefix string) (map[string]string, error) {
 	prefixes := []string{}
-	if len(globalEnvVarPrefix) > 0 {
-		prefixes = append(prefixes, globalEnvVarPrefix)
+	if len(globalNamePrefix) > 0 {
+		prefixes = append(prefixes, globalNamePrefix)
 	}
-	if svcCtx.envVarPrefix != nil && len(*svcCtx.envVarPrefix) > 0 {
-		prefixes = append(prefixes, *svcCtx.envVarPrefix)
+	if svcCtx.namePrefix != nil && len(*svcCtx.namePrefix) > 0 {
+		prefixes = append(prefixes, *svcCtx.namePrefix)
 	}
-	if svcCtx.envVarPrefix == nil {
+	if svcCtx.namePrefix == nil {
 		prefixes = append(prefixes, svcCtx.service.GroupVersionKind().Kind)
 	}
 
@@ -49,10 +49,10 @@ func buildServiceEnvVars(svcCtx *serviceContext, globalEnvVarPrefix string) (map
 
 func (r *retriever) processServiceContext(
 	svcCtx *serviceContext,
-	customEnvVarCtx map[string]interface{},
-	globalEnvVarPrefix string,
+	mappingsCtx map[string]interface{},
+	globalNamePrefix string,
 ) (map[string][]byte, error) {
-	svcEnvVars, err := buildServiceEnvVars(svcCtx, globalEnvVarPrefix)
+	svcEnvVars, err := buildServiceEnvVars(svcCtx, globalNamePrefix)
 	if err != nil {
 		return nil, err
 	}
@@ -65,7 +65,7 @@ func (r *retriever) processServiceContext(
 	//
 	// `{{ index "v1alpha1" "postgresql.baiju.dev" "Database", "db-testing", "status", "connectionUrl" }}`
 	err = unstructured.SetNestedField(
-		customEnvVarCtx, svcCtx.service.Object, gvk.Version, gvk.Group, gvk.Kind,
+		mappingsCtx, svcCtx.service.Object, gvk.Version, gvk.Group, gvk.Kind,
 		svcCtx.service.GetName())
 	if err != nil {
 		return nil, err
@@ -77,7 +77,7 @@ func (r *retriever) processServiceContext(
 	//
 	// `{{ .v1alpha1.postgresql_baiju_dev.Database.db_testing.status.connectionUrl }}`
 	err = unstructured.SetNestedField(
-		customEnvVarCtx,
+		mappingsCtx,
 		svcCtx.service.Object,
 		createServiceIndexPath(svcCtx.service.GetName(), svcCtx.service.GroupVersionKind())...,
 	)
@@ -90,7 +90,7 @@ func (r *retriever) processServiceContext(
 	// `{{ .db_testing.status.connectionUrl }}`
 	if svcCtx.id != nil {
 		err = unstructured.SetNestedField(
-			customEnvVarCtx,
+			mappingsCtx,
 			svcCtx.service.Object,
 			*svcCtx.id,
 		)
@@ -109,15 +109,15 @@ func (r *retriever) processServiceContext(
 
 // ProcessServiceContexts returns environment variables and volume keys from a ServiceContext slice.
 func (r *retriever) ProcessServiceContexts(
-	globalEnvVarPrefix string,
+	globalNamePrefix string,
 	svcCtxs serviceContextList,
-	envVarTemplates []corev1.EnvVar,
+	envVarTemplates []v1alpha1.Mapping,
 ) (map[string][]byte, error) {
-	customEnvVarCtx := make(map[string]interface{})
+	mappingsCtx := make(map[string]interface{})
 	envVars := make(map[string][]byte)
 
 	for _, svcCtx := range svcCtxs {
-		s, err := r.processServiceContext(svcCtx, customEnvVarCtx, globalEnvVarPrefix)
+		s, err := r.processServiceContext(svcCtx, mappingsCtx, globalNamePrefix)
 		if err != nil {
 			return nil, err
 		}
@@ -126,15 +126,15 @@ func (r *retriever) ProcessServiceContexts(
 		}
 	}
 
-	envParser := newCustomEnvParser(envVarTemplates, customEnvVarCtx)
-	customEnvVars, err := envParser.Parse()
+	envParser := newMappingsParser(envVarTemplates, mappingsCtx)
+	mappingsList, err := envParser.Parse()
 	if err != nil {
 		r.logger.Error(
-			err, "Creating envVars", "Templates", envVarTemplates, "TemplateContext", customEnvVarCtx)
+			err, "Creating envVars", "Templates", envVarTemplates, "TemplateContext", mappingsCtx)
 		return nil, err
 	}
 
-	for k, v := range customEnvVars {
+	for k, v := range mappingsList {
 		envVars[k] = []byte(v.(string))
 	}
 
diff --git a/pkg/controller/servicebinding/service.go b/pkg/controller/servicebinding/service.go
index 244733da..bba7ccb7 100644
--- a/pkg/controller/servicebinding/service.go
+++ b/pkg/controller/servicebinding/service.go
@@ -15,8 +15,8 @@ import (
 	"k8s.io/client-go/dynamic"
 
 	olmv1alpha1 "github.com/operator-framework/operator-lifecycle-manager/pkg/api/apis/operators/v1alpha1"
-	"github.com/redhat-developer/service-binding-operator/pkg/controller/servicebinding/nested"
 	"github.com/redhat-developer/service-binding-operator/pkg/controller/servicebinding/binding"
+	"github.com/redhat-developer/service-binding-operator/pkg/controller/servicebinding/nested"
 	"github.com/redhat-developer/service-binding-operator/pkg/log"
 )
 
@@ -212,7 +212,7 @@ func getOwnedResources(
 func buildOwnedResourceContext(
 	client dynamic.Interface,
 	obj *unstructured.Unstructured,
-	ownerEnvVarPrefix *string,
+	ownerNamePrefix *string,
 	restMapper meta.RESTMapper,
 	inputPath string,
 	outputPath string,
@@ -223,7 +223,7 @@ func buildOwnedResourceContext(
 		obj.GetNamespace(),
 		obj.GetObjectKind().GroupVersionKind(),
 		obj.GetName(),
-		ownerEnvVarPrefix,
+		ownerNamePrefix,
 		restMapper,
 		nil,
 	)
@@ -237,7 +237,7 @@ func buildOwnedResourceContext(
 func buildOwnedResourceContexts(
 	client dynamic.Interface,
 	objs []*unstructured.Unstructured,
-	ownerEnvVarPrefix *string,
+	ownerNamePrefix *string,
 	restMapper meta.RESTMapper,
 ) ([]*serviceContext, error) {
 	ctxs := make(serviceContextList, 0)
@@ -250,7 +250,7 @@ func buildOwnedResourceContexts(
 			svcCtx, err := buildOwnedResourceContext(
 				client,
 				obj,
-				ownerEnvVarPrefix,
+				ownerNamePrefix,
 				restMapper,
 				br.inputPath,
 				br.outputPath,
diff --git a/pkg/controller/servicebinding/servicebinder.go b/pkg/controller/servicebinding/servicebinder.go
index 2344e3b3..7e0855b2 100644
--- a/pkg/controller/servicebinding/servicebinder.go
+++ b/pkg/controller/servicebinding/servicebinder.go
@@ -460,12 +460,12 @@ type internalBinding struct {
 
 func buildBinding(
 	client dynamic.Interface,
-	customEnvVar []corev1.EnvVar,
+	mappings []v1alpha1.Mapping,
 	svcCtxs serviceContextList,
-	globalEnvVarPrefix string,
+	globalNamePrefix string,
 ) (*internalBinding, error) {
 	envVars, err := NewRetriever(client).
-		ProcessServiceContexts(globalEnvVarPrefix, svcCtxs, customEnvVar)
+		ProcessServiceContexts(globalNamePrefix, svcCtxs, mappings)
 	if err != nil {
 		return nil, err
 	}
diff --git a/pkg/controller/servicebinding/servicecontext.go b/pkg/controller/servicebinding/servicecontext.go
index adbe8324..23249eca 100644
--- a/pkg/controller/servicebinding/servicecontext.go
+++ b/pkg/controller/servicebinding/servicecontext.go
@@ -22,8 +22,8 @@ type serviceContext struct {
 	service *unstructured.Unstructured
 	// envVars contains the service's contributed environment variables.
 	envVars map[string]interface{}
-	// envVarPrefix indicates the prefix to use in environment variables.
-	envVarPrefix *string
+	// namePrefix indicates the prefix to use in environment variables.
+	namePrefix *string
 	// Id indicates a name the service can be referred in custom environment variables.
 	id *string
 }
@@ -64,7 +64,7 @@ SELECTORS:
 		ns := stringValueOrDefault(s.Namespace, defaultNs)
 		gvk := schema.GroupVersionKind{Kind: s.Kind, Version: s.Version, Group: s.Group}
 		svcCtx, err := buildServiceContext(logger.WithName("buildServiceContexts"), client, ns, gvk,
-			s.Name, s.EnvVarPrefix, restMapper, s.Id)
+			s.Name, s.NamePrefix, restMapper, s.Id)
 
 		if err != nil {
 			// best effort approach; should not break in common cases such as a unknown annotation
@@ -80,9 +80,9 @@ SELECTORS:
 
 		if includeServiceOwnedResources != nil && *includeServiceOwnedResources {
 			// use the selector's kind as owned resources environment variable prefix
-			svcEnvVarPrefix := svcCtx.envVarPrefix
-			if svcEnvVarPrefix == nil {
-				svcEnvVarPrefix = &s.Kind
+			svcNamePrefix := svcCtx.namePrefix
+			if svcNamePrefix == nil {
+				svcNamePrefix = &s.Kind
 			}
 			ownedResourcesCtxs, err := findOwnedResourcesCtxs(
 				logger,
@@ -91,7 +91,7 @@ SELECTORS:
 				svcCtx.service.GetName(),
 				svcCtx.service.GetUID(),
 				gvk,
-				svcEnvVarPrefix,
+				svcNamePrefix,
 				restMapper,
 			)
 			if err != nil {
@@ -111,7 +111,7 @@ func findOwnedResourcesCtxs(
 	name string,
 	uid types.UID,
 	gvk schema.GroupVersionKind,
-	envVarPrefix *string,
+	namePrefix *string,
 	restMapper meta.RESTMapper,
 ) (serviceContextList, error) {
 	ownedResources, err := getOwnedResources(
@@ -129,7 +129,7 @@ func findOwnedResourcesCtxs(
 	return buildOwnedResourceContexts(
 		client,
 		ownedResources,
-		envVarPrefix,
+		namePrefix,
 		restMapper,
 	)
 }
@@ -191,7 +191,7 @@ func buildServiceContext(
 	ns string,
 	gvk schema.GroupVersionKind,
 	name string,
-	envVarPrefix *string,
+	namePrefix *string,
 	restMapper meta.RESTMapper,
 	id *string,
 ) (*serviceContext, error) {
@@ -254,10 +254,10 @@ func buildServiceContext(
 	}
 
 	serviceCtx := &serviceContext{
-		service:      outputObj,
-		envVars:      envVars,
-		envVarPrefix: envVarPrefix,
-		id:           id,
+		service:    outputObj,
+		envVars:    envVars,
+		namePrefix: namePrefix,
+		id:         id,
 	}
 
 	return serviceCtx, nil


Test patch:
diff --git a/pkg/controller/servicebinding/custom_env_parser_test.go b/pkg/controller/servicebinding/custom_env_parser_test.go
index c80ec0de..28621cfe 100644
--- a/pkg/controller/servicebinding/custom_env_parser_test.go
+++ b/pkg/controller/servicebinding/custom_env_parser_test.go
@@ -4,8 +4,8 @@ import (
 	"errors"
 	"testing"
 
+	"github.com/redhat-developer/service-binding-operator/pkg/apis/operators/v1alpha1"
 	"github.com/stretchr/testify/require"
-	corev1 "k8s.io/api/core/v1"
 )
 
 func TestCustomEnvParser(t *testing.T) {
@@ -18,12 +18,12 @@ func TestCustomEnvParser(t *testing.T) {
 	type args struct {
 		in           map[string]interface{}
 		wanted       []wantedVar
-		varTemplates []corev1.EnvVar
+		varTemplates []v1alpha1.Mapping
 	}
 
 	testCase := func(args args) func(t *testing.T) {
 		return func(t *testing.T) {
-			parser := newCustomEnvParser(args.varTemplates, args.in)
+			parser := newMappingsParser(args.varTemplates, args.in)
 			values, err := parser.Parse()
 			require.NoError(t, err)
 
@@ -49,12 +49,12 @@ func TestCustomEnvParser(t *testing.T) {
 			{name: "JDBC_CONNECTION_STRING", value: "database-name:database-user@database-pass"},
 			{name: "ANOTHER_STRING", value: "database-name_database-user"},
 		},
-		varTemplates: []corev1.EnvVar{
-			corev1.EnvVar{
+		varTemplates: []v1alpha1.Mapping{
+			{
 				Name:  "JDBC_CONNECTION_STRING",
 				Value: `{{ .spec.dbName }}:{{ .status.creds.user }}@{{ .status.creds.pass }}`,
 			},
-			corev1.EnvVar{
+			{
 				Name:  "ANOTHER_STRING",
 				Value: `{{ .spec.dbName }}_{{ .status.creds.user }}`,
 			},
@@ -65,14 +65,14 @@ func TestCustomEnvParser(t *testing.T) {
 func TestCustomEnvPath_Parse(t *testing.T) {
 	type args struct {
 		envVarCtx map[string]interface{}
-		templates []corev1.EnvVar
+		templates []v1alpha1.Mapping
 		expected  map[string]interface{}
 		wantErr   error
 	}
 
 	assertParse := func(args args) func(*testing.T) {
 		return func(t *testing.T) {
-			customEnvParser := newCustomEnvParser(args.templates, args.envVarCtx)
+			customEnvParser := newMappingsParser(args.templates, args.envVarCtx)
 			actual, err := customEnvParser.Parse()
 			if args.wantErr != nil {
 				require.Error(t, args.wantErr)
@@ -98,7 +98,7 @@ func TestCustomEnvPath_Parse(t *testing.T) {
 
 	t.Run("JDBC connection string template", assertParse(args{
 		envVarCtx: envVarCtx,
-		templates: []corev1.EnvVar{
+		templates: []v1alpha1.Mapping{
 			{
 				Name:  "JDBC_CONNECTION_STRING",
 				Value: `{{ .spec.dbName }}:{{ .status.creds.user }}@{{ .status.creds.pass }}`,
@@ -111,7 +111,7 @@ func TestCustomEnvPath_Parse(t *testing.T) {
 
 	t.Run("incomplete template", assertParse(args{
 		envVarCtx: envVarCtx,
-		templates: []corev1.EnvVar{
+		templates: []v1alpha1.Mapping{
 			{
 				Name:  "INCOMPLETE_TEMPLATE",
 				Value: `{{ .spec.dbName `,
@@ -131,18 +131,18 @@ func TestCustomEnvPath_Parse_exampleCase(t *testing.T) {
 		},
 	}
 
-	envMap := []corev1.EnvVar{
-		corev1.EnvVar{
+	envMap := []v1alpha1.Mapping{
+		{
 			Name:  "JDBC_USERNAME",
 			Value: `{{ index .status.dbConfigMap "db.user" }}`,
 		},
-		corev1.EnvVar{
+		{
 			Name:  "JDBC_PASSWORD",
 			Value: `{{ index .status.dbConfigMap "db.password" }}`,
 		},
 	}
 
-	customEnvPath := newCustomEnvParser(envMap, cache)
+	customEnvPath := newMappingsParser(envMap, cache)
 	values, err := customEnvPath.Parse()
 	if err != nil {
 		t.Error(err)
@@ -167,33 +167,33 @@ func TestCustomEnvPath_Parse_ToJson(t *testing.T) {
 		},
 	}
 
-	envMap := []corev1.EnvVar{
-		corev1.EnvVar{
+	envMap := []v1alpha1.Mapping{
+		{
 			Name:  "root",
 			Value: `{{ json . }}`,
 		},
-		corev1.EnvVar{
+		{
 			Name:  "spec",
 			Value: `{{ json .spec }}`,
 		},
-		corev1.EnvVar{
+		{
 			Name:  "status",
 			Value: `{{ json .status }}`,
 		},
-		corev1.EnvVar{
+		{
 			Name:  "creds",
 			Value: `{{ json .status.creds }}`,
 		},
-		corev1.EnvVar{
+		{
 			Name:  "dbName",
 			Value: `{{ json .spec.dbName }}`,
 		},
-		corev1.EnvVar{
+		{
 			Name:  "notExist",
 			Value: `{{ json .notExist }}`,
 		},
 	}
-	customEnvPath := newCustomEnvParser(envMap, cache)
+	customEnvPath := newMappingsParser(envMap, cache)
 	values, err := customEnvPath.Parse()
 	if err != nil {
 		t.Error(err)
diff --git a/pkg/controller/servicebinding/retriever_test.go b/pkg/controller/servicebinding/retriever_test.go
index 3065a4bf..dbdd019a 100644
--- a/pkg/controller/servicebinding/retriever_test.go
+++ b/pkg/controller/servicebinding/retriever_test.go
@@ -6,10 +6,10 @@ import (
 	"testing"
 
 	"github.com/stretchr/testify/require"
-	corev1 "k8s.io/api/core/v1"
 	"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
 	logf "sigs.k8s.io/controller-runtime/pkg/runtime/log"
 
+	"github.com/redhat-developer/service-binding-operator/pkg/apis/operators/v1alpha1"
 	"github.com/redhat-developer/service-binding-operator/test/mocks"
 )
 
@@ -45,21 +45,21 @@ func TestRetrieverProcessServiceContexts(t *testing.T) {
 	fakeDynClient := f.FakeDynClient()
 
 	type testCase struct {
-		dataMapping  []corev1.EnvVar
-		envVarPrefix string
-		expected     map[string][]byte
-		name         string
-		svcCtxs      serviceContextList
+		dataMapping []v1alpha1.Mapping
+		namePrefix  string
+		expected    map[string][]byte
+		name        string
+		svcCtxs     serviceContextList
 	}
 
 	testCases := []testCase{
 		{
-			name:         "access with index should return correct value",
-			envVarPrefix: "SERVICE_BINDING",
+			name:       "access with index should return correct value",
+			namePrefix: "SERVICE_BINDING",
 			svcCtxs: serviceContextList{
 				{service: cr},
 			},
-			dataMapping: []corev1.EnvVar{
+			dataMapping: []v1alpha1.Mapping{
 				{Name: "SAME_NAMESPACE", Value: toIndexTemplate(cr, "metadata.name")},
 			},
 			expected: map[string][]byte{
@@ -67,12 +67,12 @@ func TestRetrieverProcessServiceContexts(t *testing.T) {
 			},
 		},
 		{
-			name:         "direct access with apiVersion and kind should return correct value",
-			envVarPrefix: "SERVICE_BINDING",
+			name:       "direct access with apiVersion and kind should return correct value",
+			namePrefix: "SERVICE_BINDING",
 			svcCtxs: serviceContextList{
 				{service: cr},
 			},
-			dataMapping: []corev1.EnvVar{
+			dataMapping: []v1alpha1.Mapping{
 				{
 					Name:  "DIRECT_ACCESS",
 					Value: `{{ .v1alpha1.postgresql_baiju_dev.Database.db_testing.metadata.name }}`,
@@ -83,15 +83,15 @@ func TestRetrieverProcessServiceContexts(t *testing.T) {
 			},
 		},
 		{
-			name:         "direct access with declared id should return correct value",
-			envVarPrefix: "SERVICE_BINDING",
+			name:       "direct access with declared id should return correct value",
+			namePrefix: "SERVICE_BINDING",
 			svcCtxs: serviceContextList{
 				{
 					service: cr,
 					id:      &crId,
 				},
 			},
-			dataMapping: []corev1.EnvVar{
+			dataMapping: []v1alpha1.Mapping{
 				{
 					Name:  "ID_ACCESS",
 					Value: `{{ .db_testing.metadata.name }}`,
@@ -102,14 +102,14 @@ func TestRetrieverProcessServiceContexts(t *testing.T) {
 			},
 		},
 		{
-			name:         "direct access without declared id should return <no value>",
-			envVarPrefix: "SERVICE_BINDING",
+			name:       "direct access without declared id should return <no value>",
+			namePrefix: "SERVICE_BINDING",
 			svcCtxs: serviceContextList{
 				{
 					service: cr,
 				},
 			},
-			dataMapping: []corev1.EnvVar{
+			dataMapping: []v1alpha1.Mapping{
 				{
 					Name:  "ID_ACCESS",
 					Value: `{{ .db_testing.metadata.name }}`,
@@ -124,7 +124,7 @@ func TestRetrieverProcessServiceContexts(t *testing.T) {
 	for _, tc := range testCases {
 		t.Run(tc.name, func(t *testing.T) {
 			got, err := NewRetriever(fakeDynClient).ProcessServiceContexts(
-				tc.envVarPrefix, tc.svcCtxs, tc.dataMapping)
+				tc.namePrefix, tc.svcCtxs, tc.dataMapping)
 			require.NoError(t, err)
 			require.Equal(t, tc.expected, got)
 		})
@@ -134,22 +134,22 @@ func TestRetrieverProcessServiceContexts(t *testing.T) {
 func TestBuildServiceEnvVars(t *testing.T) {
 
 	type testCase struct {
-		ctx                *serviceContext
-		globalEnvVarPrefix string
-		expected           map[string]string
+		ctx              *serviceContext
+		globalNamePrefix string
+		expected         map[string]string
 	}
 
 	cr, err := mocks.UnstructuredDatabaseCRMock("namespace", "name")
 	require.NoError(t, err)
 
-	serviceEnvVarPrefix := "serviceprefix"
+	serviceNamePrefix := "serviceprefix"
 	emptyString := ""
 
 	testCases := []testCase{
 		{
-			globalEnvVarPrefix: "",
+			globalNamePrefix: "",
 			ctx: &serviceContext{
-				envVarPrefix: &emptyString,
+				namePrefix: &emptyString,
 				envVars: map[string]interface{}{
 					"apiKey": "my-secret-key",
 				},
@@ -159,9 +159,9 @@ func TestBuildServiceEnvVars(t *testing.T) {
 			},
 		},
 		{
-			globalEnvVarPrefix: "globalprefix",
+			globalNamePrefix: "globalprefix",
 			ctx: &serviceContext{
-				envVarPrefix: &emptyString,
+				namePrefix: &emptyString,
 				envVars: map[string]interface{}{
 					"apiKey": "my-secret-key",
 				},
@@ -171,9 +171,9 @@ func TestBuildServiceEnvVars(t *testing.T) {
 			},
 		},
 		{
-			globalEnvVarPrefix: "globalprefix",
+			globalNamePrefix: "globalprefix",
 			ctx: &serviceContext{
-				envVarPrefix: &serviceEnvVarPrefix,
+				namePrefix: &serviceNamePrefix,
 				envVars: map[string]interface{}{
 					"apiKey": "my-secret-key",
 				},
@@ -183,10 +183,10 @@ func TestBuildServiceEnvVars(t *testing.T) {
 			},
 		},
 		{
-			globalEnvVarPrefix: "",
+			globalNamePrefix: "",
 			ctx: &serviceContext{
-				service:      cr,
-				envVarPrefix: nil,
+				service:    cr,
+				namePrefix: nil,
 				envVars: map[string]interface{}{
 					"apiKey": "my-secret-key",
 				},
@@ -196,9 +196,9 @@ func TestBuildServiceEnvVars(t *testing.T) {
 			},
 		},
 		{
-			globalEnvVarPrefix: "",
+			globalNamePrefix: "",
 			ctx: &serviceContext{
-				envVarPrefix: &serviceEnvVarPrefix,
+				namePrefix: &serviceNamePrefix,
 				envVars: map[string]interface{}{
 					"apiKey": "my-secret-key",
 				},
@@ -210,7 +210,7 @@ func TestBuildServiceEnvVars(t *testing.T) {
 	}
 
 	for _, tc := range testCases {
-		actual, err := buildServiceEnvVars(tc.ctx, tc.globalEnvVarPrefix)
+		actual, err := buildServiceEnvVars(tc.ctx, tc.globalNamePrefix)
 		require.NoError(t, err)
 		require.Equal(t, tc.expected, actual)
 	}
diff --git a/pkg/controller/servicebinding/service_test.go b/pkg/controller/servicebinding/service_test.go
index 66f96423..48c6c483 100644
--- a/pkg/controller/servicebinding/service_test.go
+++ b/pkg/controller/servicebinding/service_test.go
@@ -98,26 +98,26 @@ func TestFindServiceCRD(t *testing.T) {
 
 func TestGetObjectType(t *testing.T) {
 	type testCase struct {
-		name       string
+		name        string
 		descriptors []string
-		expected   string
+		expected    string
 	}
 
 	testCases := []testCase{
 		{
-			name:       "should build proper annotation",
+			name:        "should build proper annotation",
 			descriptors: []string{"urn:alm:descriptor:io.kubernetes:ConfigMap"},
-			expected: "ConfigMap",
+			expected:    "ConfigMap",
 		},
 		{
-			name:       "should build proper annotation",
+			name:        "should build proper annotation",
 			descriptors: []string{"urn:alm:descriptor:io.kubernetes:Secret"},
-			expected: "Secret",
+			expected:    "Secret",
 		},
 		{
-			name:       "should build proper annotation",
+			name:        "should build proper annotation",
 			descriptors: []string{"incorrect.annotation:Secret"},
-			expected: "",
+			expected:    "",
 		},
 	}
 
@@ -129,61 +129,60 @@ func TestGetObjectType(t *testing.T) {
 	}
 }
 
-
 func TestLoadDescriptor(t *testing.T) {
 	type testCase struct {
-		name       string
-		path       string
+		name        string
+		path        string
 		descriptors []string
-		root       string
-		expected   map[string]string
+		root        string
+		expected    map[string]string
 	}
 
 	testCases := []testCase{
 		{
-			name:       "should build proper annotation",
+			name: "should build proper annotation",
 			descriptors: []string{
 				"urn:alm:descriptor:io.kubernetes:ConfigMap",
 				"service.binding:user:sourceKey=user",
 			},
-			root:       "status",
-			path:       "user",
+			root: "status",
+			path: "user",
 			expected: map[string]string{
 				"service.binding/user": "path={.status.user},sourceKey=user,objectType=ConfigMap",
 			},
 		},
 		{
-			name:       "should build proper annotation when object type is not specified",
+			name: "should build proper annotation when object type is not specified",
 			descriptors: []string{
 				"service.binding",
 			},
-			root:       "status",
-			path:       "user",
+			root: "status",
+			path: "user",
 			expected: map[string]string{
 				"service.binding/user": "path={.status.user}",
 			},
 		},
 		{
-			name:       "should build proper annotation",
+			name: "should build proper annotation",
 			descriptors: []string{
 				"urn:alm:descriptor:io.kubernetes:Secret",
 				"service.binding:user:sourceKey=user",
 				"service.binding:password:sourceValue=password",
 			},
-			root:       "status",
-			path:       "dbCredentials",
+			root: "status",
+			path: "dbCredentials",
 			expected: map[string]string{
-				"service.binding/user": "path={.status.dbCredentials},sourceKey=user,objectType=Secret",
+				"service.binding/user":     "path={.status.dbCredentials},sourceKey=user,objectType=Secret",
 				"service.binding/password": "path={.status.dbCredentials},sourceValue=password,objectType=Secret",
 			},
 		},
 		{
-			name:       "should build proper annotation",
+			name: "should build proper annotation",
 			descriptors: []string{
 				"service.binding:urls:elementType=sliceOfMaps,sourceKey=type,sourceValue=url",
 			},
-			root:       "status",
-			path:       "bootstrap",
+			root: "status",
+			path: "bootstrap",
 			expected: map[string]string{
 				"service.binding/urls": "path={.status.bootstrap},elementType=sliceOfMaps,sourceKey=type,sourceValue=url",
 			},
@@ -209,16 +208,16 @@ func TestBuildOwnerResourceContext(t *testing.T) {
 	obj := f.AddMockedUnstructuredSecret("secret")
 
 	type testCase struct {
-		inputPath         string
-		outputPath        string
-		ownerEnvVarPrefix *string
+		inputPath       string
+		outputPath      string
+		ownerNamePrefix *string
 	}
 
 	testCases := []testCase{
 		{
-			inputPath:         "data.user",
-			outputPath:        "user",
-			ownerEnvVarPrefix: nil,
+			inputPath:       "data.user",
+			outputPath:      "user",
+			ownerNamePrefix: nil,
 		},
 	}
 
@@ -226,7 +225,7 @@ func TestBuildOwnerResourceContext(t *testing.T) {
 		got, err := buildOwnedResourceContext(
 			f.FakeDynClient(),
 			obj,
-			tc.ownerEnvVarPrefix,
+			tc.ownerNamePrefix,
 			testutils.BuildTestRESTMapper(),
 			tc.inputPath,
 			tc.outputPath,
diff --git a/pkg/controller/servicebinding/servicebinder_test.go b/pkg/controller/servicebinding/servicebinder_test.go
index e5ed617a..911d8505 100644
--- a/pkg/controller/servicebinding/servicebinder_test.go
+++ b/pkg/controller/servicebinding/servicebinder_test.go
@@ -235,7 +235,7 @@ func TestServiceBinder_Bind(t *testing.T) {
 	}
 	f.AddMockResource(sbrSingleService)
 
-	sbrSingleServiceWithCustomEnvVar := &v1alpha1.ServiceBinding{
+	sbrSingleServiceWithMappings := &v1alpha1.ServiceBinding{
 		TypeMeta: metav1.TypeMeta{
 			APIVersion: "operators.coreos.com/v1alpha1",
 			Kind:       "ServiceBinding",
@@ -265,7 +265,7 @@ func TestServiceBinder_Bind(t *testing.T) {
 					LocalObjectReference: corev1.LocalObjectReference{Name: d.GetName()},
 				},
 			},
-			CustomEnvVar: []corev1.EnvVar{
+			Mappings: []v1alpha1.Mapping{
 				{
 					Name:  "MY_DB_NAME",
 					Value: `{{ index . "v1alpha1" "postgresql.baiju.dev" "Database" "db1" "status" "dbName" }}`,
@@ -278,7 +278,7 @@ func TestServiceBinder_Bind(t *testing.T) {
 		},
 		Status: v1alpha1.ServiceBindingStatus{},
 	}
-	f.AddMockResource(sbrSingleServiceWithCustomEnvVar)
+	f.AddMockResource(sbrSingleServiceWithMappings)
 
 	// create the ServiceBinding
 	sbrMultipleServices := &v1alpha1.ServiceBinding{
@@ -463,7 +463,7 @@ func TestServiceBinder_Bind(t *testing.T) {
 			logger:                 logger,
 			dynClient:              f.FakeDynClient(),
 			detectBindingResources: false,
-			sbr:                    sbrSingleServiceWithCustomEnvVar,
+			sbr:                    sbrSingleServiceWithMappings,
 			binding: &internalBinding{
 				envVars: map[string][]byte{
 					"MY_DB_NAME": []byte("db1"),
@@ -489,12 +489,12 @@ func TestServiceBinder_Bind(t *testing.T) {
 			{
 				resource: "servicebindings",
 				verb:     "update",
-				name:     sbrSingleServiceWithCustomEnvVar.GetName(),
+				name:     sbrSingleServiceWithMappings.GetName(),
 			},
 			{
 				resource: "secrets",
 				verb:     "update",
-				name:     sbrSingleServiceWithCustomEnvVar.GetName(),
+				name:     sbrSingleServiceWithMappings.GetName(),
 				objAssertions: []objAssertionFunc{
 					base64StringEqual("db1", "data", "MY_DB_NAME"),
 				},
diff --git a/test/acceptance/features/bindAppToService.feature b/test/acceptance/features/bindAppToService.feature
index ce6ffd4e..21350fd4 100644
--- a/test/acceptance/features/bindAppToService.feature
+++ b/test/acceptance/features/bindAppToService.feature
@@ -243,7 +243,7 @@ Feature: Bind an application to a service
                     kind: Backend
                     name: backend-demo
                     id: SBR
-                customEnvVar:
+                mappings:
                   - name: CustomReady
                     value: '{{ .SBR.status.ready }}'
                   - name: CustomHost
@@ -319,7 +319,7 @@ Feature: Bind an application to a service
             metadata:
                 name: binding-request-a-d-c
             spec:
-                envVarPrefix: REDHAT
+                namePrefix: REDHAT
                 application:
                     name: nodejs-rest-http-crud-a-d-c
                     group: apps
@@ -331,8 +331,8 @@ Feature: Bind an application to a service
                     kind: Database
                     name: db-demo-a-d-c
                     id: postgresDB
-                    envVarPrefix: DEVTOOLS
-                customEnvVar:
+                    namePrefix: DEVTOOLS
+                mappings:
                     - name: SOME_KEY
                       value: 'SOME_VALUE:{{ .postgresDB.status.dbConnectionPort }}:{{ .postgresDB.status.dbName }}'
             """
diff --git a/test/acceptance/features/bindKnativeService.feature b/test/acceptance/features/bindKnativeService.feature
index ebc619b5..a813f9e6 100644
--- a/test/acceptance/features/bindKnativeService.feature
+++ b/test/acceptance/features/bindKnativeService.feature
@@ -33,7 +33,7 @@ Feature: Bind knative service to a service
                 kind: Database
                 name: db-demo-knative
                 id: knav
-              customEnvVar:
+              mappings:
                 - name: JDBC_URL
                   value: jdbc:postgresql://{{ .knav.status.dbConnectionIP }}:{{ .knav.status.dbConnectionPort }}/{{ .knav.status.dbName }}
                 - name: DB_USER
diff --git a/test/acceptance/features/customEnvVar.feature b/test/acceptance/features/customEnvVar.feature
index 95393dfb..3a671633 100644
--- a/test/acceptance/features/customEnvVar.feature
+++ b/test/acceptance/features/customEnvVar.feature
@@ -41,7 +41,7 @@ Feature: Inject custom env variable into application
                     kind: Backend
                     name: backend-with-tag-sequence
                     id: backend
-                customEnvVar:
+                mappings:
                    - name: TAGS
                      value: '{{ .backend.spec.tags }}'
             """
@@ -81,7 +81,7 @@ Feature: Inject custom env variable into application
                     kind: Backend
                     name: backend-with-user-labels-map
                     id: backend
-                customEnvVar:
+                mappings:
                    - name: USER_LABELS
                      value: '{{ .backend.spec.userLabels }}'
             """
@@ -121,7 +121,7 @@ Feature: Inject custom env variable into application
                     kind: Backend
                     name: backend-with-user-labels-archive
                     id: backend
-                customEnvVar:
+                mappings:
                    - name: USER_LABELS_ARCHIVE
                      value: '{{ .backend.spec.userLabels.archive }}'
             """
diff --git a/test/acceptance/features/environment.py b/test/acceptance/features/environment.py
index 205b1b9a..a0c46911 100644
--- a/test/acceptance/features/environment.py
+++ b/test/acceptance/features/environment.py
@@ -39,9 +39,13 @@ def before_all(_context):
     if start_sbo == "local":
         assert not os.getenv("TEST_ACCEPTANCE_SBO_STARTED").startswith("FAILED"), "TEST_ACCEPTANCE_SBO_STARTED shoud not be FAILED."
     elif start_sbo == "remote":
-        sbo_namespace = os.getenv("SBO_NAMESPACE")
-        assert (sbo_namespace is not None) and (sbo_namespace != ""), f"SBO_NAMESPACE is required but it is not set or it is empty: {sbo_namespace}"
-        _context.sbo_namespace = sbo_namespace
+        output, code = cmd.run(
+            f"{ctx.cli} get deployment --all-namespaces -o json"
+            + " | jq -rc '.items[] | select(.metadata.name == \"service-binding-operator\").metadata.namespace'")
+        assert code == 0, f"Non-zero return code while trying to detect namespace for SBO: {output}"
+        output = str(output).strip()
+        assert output != "", "Unable to find SBO's deployment in any namespace."
+        _context.sbo_namespace = output
     else:
         assert False, f"TEST_ACCEPTANCE_START_SBO={start_sbo} is currently unsupported."
 
diff --git a/test/acceptance/features/injectBindingsAsFiles.feature b/test/acceptance/features/injectBindingsAsFiles.feature
index 7782fd48..f1a6b854 100644
--- a/test/acceptance/features/injectBindingsAsFiles.feature
+++ b/test/acceptance/features/injectBindingsAsFiles.feature
@@ -39,7 +39,7 @@ Feature: Bindings get injected as files in application
                     name: backend-demo-01
                     id: bk
 
-                customEnvVar:
+                mappings:
                   - name: MYHOST
                     value: '{{ .bk.spec.host }}'
 
@@ -198,7 +198,7 @@ Feature: Bindings get injected as files in application
                     name: backend-demo-04
                     id: bk
 
-                customEnvVar:
+                mappings:
                   - name: MYHOST
                     value: '{{ .bk.spec.host }}'
 
@@ -255,7 +255,7 @@ Feature: Bindings get injected as files in application
                     version: v1
                     kind: Backend
                     name: backend-demo-05
-                    envVarPrefix: ""
+                    namePrefix: ""
 
                 application:
                     name: generic-app-a-d-u-5
diff --git a/test/acceptance/features/injectSecretAtCustomSchemaPath.feature b/test/acceptance/features/injectSecretAtCustomSchemaPath.feature
index 79e455e5..e1ceeb16 100644
--- a/test/acceptance/features/injectSecretAtCustomSchemaPath.feature
+++ b/test/acceptance/features/injectSecretAtCustomSchemaPath.feature
@@ -59,7 +59,7 @@ Feature: Insert service binding to a custom location in application resource
             metadata:
                 name: binding-request-csp
             spec:
-                envVarPrefix: qiye111
+                namePrefix: qiye111
                 application:
                     name: demo-appconfig-csp
                     group: stable.example.com
@@ -73,7 +73,7 @@ Feature: Insert service binding to a custom location in application resource
                     kind: Database
                     name: db-demo-csp
                     id: zzz
-                    envVarPrefix: qiye
+                    namePrefix: qiye
             """
         Then Service Binding "binding-request-csp" is ready
         And Secret "binding-request-csp" has been injected in to CR "demo-appconfig-csp" of kind "AppConfig" at path "{.spec.spec.containers[0].envFrom[0].secretRef.name}"
@@ -97,7 +97,7 @@ Feature: Insert service binding to a custom location in application resource
             metadata:
                 name: binding-request-ssp
             spec:
-                envVarPrefix: qiye111
+                namePrefix: qiye111
                 application:
                     name: demo-appconfig-ssp
                     group: stable.example.com
@@ -111,7 +111,7 @@ Feature: Insert service binding to a custom location in application resource
                     kind: Database
                     name: db-demo-ssp
                     id: zzz
-                    envVarPrefix: qiye
+                    namePrefix: qiye
             """
         Then Service Binding "binding-request-ssp" is ready
         And Secret "binding-request-ssp" has been injected in to CR "demo-appconfig-ssp" of kind "AppConfig" at path "{.spec.spec.secret}"
diff --git a/test/acceptance/features/steps/openshift.py b/test/acceptance/features/steps/openshift.py
index 5d325345..06f0662f 100644
--- a/test/acceptance/features/steps/openshift.py
+++ b/test/acceptance/features/steps/openshift.py
@@ -397,6 +397,17 @@ spec:
         print('Resource list is empty under namespace - {}'.format(namespace))
         return None
 
+    def lookup_namespace_for_resource(self, resource_plural, name):
+        output, code = self.cmd.run(
+            f"{ctx.cli} get {resource_plural} --all-namespaces -o json"
+            + f" | jq -rc '.items[] | select(.metadata.name == \"{name}\").metadata.namespace'")
+        assert code == 0, f"Non-zero return code while trying to detect namespace for {resource_plural} '{name}': {output}"
+        output = str(output).strip()
+        if output != "":
+            return output
+        else:
+            return None
+
     def apply_yaml_file(self, yaml, namespace=None):
         if namespace is not None:
             ns_arg = f"-n {namespace}"
diff --git a/test/acceptance/features/steps/servicebindingoperator.py b/test/acceptance/features/steps/servicebindingoperator.py
index 5ddfa16b..260d0494 100644
--- a/test/acceptance/features/steps/servicebindingoperator.py
+++ b/test/acceptance/features/steps/servicebindingoperator.py
@@ -14,23 +14,15 @@ class Servicebindingoperator():
         self.namespace = namespace
         self.name = name
 
-    def check_resources(self):
+    def check_crd(self):
         crd_name = "servicebinding"
         assert self.openshift.is_resource_in(crd_name), f"CRD '{crd_name}' does not exist"
-
-        name_pattern = self.get_name_pattern()
-
-        output = self.openshift.search_resource_in_namespace("rolebindings", name_pattern, self.namespace)
-        assert output is not None, f"Unable to find role binding with name that maches '{name_pattern}' in namespace '{self.namespace}': {output}"
-
-        output = self.openshift.search_resource_in_namespace("roles", name_pattern, self.namespace)
-        assert output is not None, f"Unable to find role with name that maches '{name_pattern}' in namespace '{self.namespace}': {output}"
-
-        output = self.openshift.search_resource_in_namespace("serviceaccounts", name_pattern, self.namespace)
-        assert output is not None,  f"Unable to find service account with name that maches '{name_pattern}' in namespace '{self.namespace}': {output}"
-
         return True
 
+    def check_deployment(self):
+        sbo_namespace = self.openshift.lookup_namespace_for_resource("deployments", "service-binding-operator")
+        return sbo_namespace is not None
+
     def is_running(self):
         start_sbo = os.getenv("TEST_ACCEPTANCE_START_SBO")
         assert start_sbo is not None, "TEST_ACCEPTANCE_START_SBO is not set. It should be one of local, remote or operator-hub"
@@ -38,10 +30,11 @@ class Servicebindingoperator():
 
         if start_sbo == "local":
             assert not os.getenv("TEST_ACCEPTANCE_SBO_STARTED").startswith("FAILED"), "TEST_ACCEPTANCE_SBO_STARTED shoud not be FAILED."
+            return self.check_crd()
+        elif start_sbo == "remote":
+            return self.check_crd() and self.check_deployment()
         elif start_sbo == "operator-hub":
             return False
 
-        return self.check_resources()
-
     def get_name_pattern(self):
         return self.name_pattern.format(name=self.name)
diff --git a/test/mocks/mocks.go b/test/mocks/mocks.go
index 72b016ad..1a19218a 100644
--- a/test/mocks/mocks.go
+++ b/test/mocks/mocks.go
@@ -433,7 +433,7 @@ func MultiNamespaceServiceBindingMock(
 			Name:      name,
 		},
 		Spec: v1alpha1.ServiceBindingSpec{
-			CustomEnvVar: []corev1.EnvVar{},
+			Mappings: []v1alpha1.Mapping{},
 			Application: &v1alpha1.Application{
 				GroupVersionResource: metav1.GroupVersionResource{Group: applicationGVR.Group, Version: applicationGVR.Version, Resource: applicationGVR.Resource},
 				LocalObjectReference: corev1.LocalObjectReference{Name: applicationResourceRef},
@@ -484,7 +484,7 @@ func ServiceBindingMock(
 			APIVersion: "operators.coreos.com/v1alpha1",
 		},
 		Spec: v1alpha1.ServiceBindingSpec{
-			CustomEnvVar: []corev1.EnvVar{},
+			Mappings: []v1alpha1.Mapping{},
 			Application: &v1alpha1.Application{
 				GroupVersionResource: metav1.GroupVersionResource{Group: applicationGVR.Group, Version: applicationGVR.Version, Resource: applicationGVR.Resource},
 				LocalObjectReference: corev1.LocalObjectReference{Name: applicationResourceRef},
diff --git a/test/operator-hub/operator_source.yaml b/test/operator-hub/operator_source.yaml
deleted file mode 100644
index 4e10c4c3..00000000
--- a/test/operator-hub/operator_source.yaml
+++ /dev/null
@@ -1,9 +0,0 @@
-apiVersion: operators.coreos.com/v1
-kind: OperatorSource
-metadata:
-  name: example-operators
-  namespace: openshift-marketplace
-spec:
-  type: appregistry
-  endpoint: https://quay.io/cnr
-  registryNamespace: redhat-developer