Repository: redhat-developer/service-binding-operator
Pull request #1035 (2021-09-27 16:53:42)

Remove 'mountPath' support
### Motivation

Reportedly, mountPath hasn't seen a lot of use, and it doesn't make sense to support it for GA.  Therefore, unless we want to commit to it for GA, we should remove it now.

If we decide to reimplement support for this, we can always revert this change post-GA.

### Changes

- Removes support for `mountPath` in the operator.
- Removes references to `mountPath` in relevant documentation.

### Testing

openshift-ci[bot]: [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 ask for approval from **sadlerap** after the PR has been reviewed.

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":["sadlerap"]} -->
openshift-ci[bot]: @sadlerap: The following test **failed**, say `/retest` to rerun all failed tests or `/retest-required` to rerun all mandatory failed tests:

Test name | Commit | Details | Required | Rerun command
--- | --- | --- | --- | ---
ci/prow/4.9-acceptance | 04b35fe61b9dd37e3b55560e65ee45fc205c502c | [link](https://prow.ci.openshift.org/view/gs/origin-ci-test/pr-logs/pull/redhat-developer_service-binding-operator/1035/pull-ci-redhat-developer-service-binding-operator-master-4.9-acceptance/1442532919166898176) | true | `/test 4.9-acceptance`

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

<details>

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

Test name | Commit | Details | Required | Rerun command
--- | --- | --- | --- | ---
ci/prow/4.9-acceptance | 45c723557bd3506d42031df55523363f84bc1092 | [link](https://prow.ci.openshift.org/view/gs/origin-ci-test/pr-logs/pull/redhat-developer_service-binding-operator/1035/pull-ci-redhat-developer-service-binding-operator-master-4.9-acceptance/1442550241797607424) | true | `/test 4.9-acceptance`

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

<details>

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

Test name | Commit | Details | Required | Rerun command
--- | --- | --- | --- | ---
ci/prow/4.9-acceptance | 45c723557bd3506d42031df55523363f84bc1092 | [link](https://prow.ci.openshift.org/view/gs/origin-ci-test/pr-logs/pull/redhat-developer_service-binding-operator/1035/pull-ci-redhat-developer-service-binding-operator-master-4.9-acceptance/1442550241797607424) | true | `/test 4.9-acceptance`
ci/prow/4.8-acceptance | 45c723557bd3506d42031df55523363f84bc1092 | [link](https://prow.ci.openshift.org/view/gs/origin-ci-test/pr-logs/pull/redhat-developer_service-binding-operator/1035/pull-ci-redhat-developer-service-binding-operator-master-4.8-acceptance/1442550241747275776) | true | `/test 4.8-acceptance`

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

<details>

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

Test name | Commit | Details | Required | Rerun command
--- | --- | --- | --- | ---
ci/prow/4.9-acceptance | 45c723557bd3506d42031df55523363f84bc1092 | [link](https://prow.ci.openshift.org/view/gs/origin-ci-test/pr-logs/pull/redhat-developer_service-binding-operator/1035/pull-ci-redhat-developer-service-binding-operator-master-4.9-acceptance/1442550241797607424) | true | `/test 4.9-acceptance`
ci/prow/4.8-acceptance | 45c723557bd3506d42031df55523363f84bc1092 | [link](https://prow.ci.openshift.org/view/gs/origin-ci-test/pr-logs/pull/redhat-developer_service-binding-operator/1035/pull-ci-redhat-developer-service-binding-operator-master-4.8-acceptance/1442550241747275776) | true | `/test 4.8-acceptance`
ci/prow/4.6-acceptance | 45c723557bd3506d42031df55523363f84bc1092 | [link](https://prow.ci.openshift.org/view/gs/origin-ci-test/pr-logs/pull/redhat-developer_service-binding-operator/1035/pull-ci-redhat-developer-service-binding-operator-master-4.6-acceptance/1442550241655001088) | true | `/test 4.6-acceptance`

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

<details>

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

Test name | Commit | Details | Required | Rerun command
--- | --- | --- | --- | ---
ci/prow/4.9-acceptance | 45c723557bd3506d42031df55523363f84bc1092 | [link](https://prow.ci.openshift.org/view/gs/origin-ci-test/pr-logs/pull/redhat-developer_service-binding-operator/1035/pull-ci-redhat-developer-service-binding-operator-master-4.9-acceptance/1442550241797607424) | true | `/test 4.9-acceptance`
ci/prow/4.8-acceptance | 45c723557bd3506d42031df55523363f84bc1092 | [link](https://prow.ci.openshift.org/view/gs/origin-ci-test/pr-logs/pull/redhat-developer_service-binding-operator/1035/pull-ci-redhat-developer-service-binding-operator-master-4.8-acceptance/1442550241747275776) | true | `/test 4.8-acceptance`
ci/prow/4.6-acceptance | 45c723557bd3506d42031df55523363f84bc1092 | [link](https://prow.ci.openshift.org/view/gs/origin-ci-test/pr-logs/pull/redhat-developer_service-binding-operator/1035/pull-ci-redhat-developer-service-binding-operator-master-4.6-acceptance/1442550241655001088) | true | `/test 4.6-acceptance`
ci/prow/4.7-acceptance | 45c723557bd3506d42031df55523363f84bc1092 | [link](https://prow.ci.openshift.org/view/gs/origin-ci-test/pr-logs/pull/redhat-developer_service-binding-operator/1035/pull-ci-redhat-developer-service-binding-operator-master-4.7-acceptance/1442550241701138432) | true | `/test 4.7-acceptance`

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

<details>

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

Test name | Commit | Details | Required | Rerun command
--- | --- | --- | --- | ---
ci/prow/4.9-acceptance | 45c723557bd3506d42031df55523363f84bc1092 | [link](https://prow.ci.openshift.org/view/gs/origin-ci-test/pr-logs/pull/redhat-developer_service-binding-operator/1035/pull-ci-redhat-developer-service-binding-operator-master-4.9-acceptance/1442550241797607424) | true | `/test 4.9-acceptance`
ci/prow/4.8-acceptance | 45c723557bd3506d42031df55523363f84bc1092 | [link](https://prow.ci.openshift.org/view/gs/origin-ci-test/pr-logs/pull/redhat-developer_service-binding-operator/1035/pull-ci-redhat-developer-service-binding-operator-master-4.8-acceptance/1442550241747275776) | true | `/test 4.8-acceptance`
ci/prow/4.7-acceptance | 45c723557bd3506d42031df55523363f84bc1092 | [link](https://prow.ci.openshift.org/view/gs/origin-ci-test/pr-logs/pull/redhat-developer_service-binding-operator/1035/pull-ci-redhat-developer-service-binding-operator-master-4.7-acceptance/1442550241701138432) | true | `/test 4.7-acceptance`
ci/prow/4.6-acceptance | d981126f79d9d9225043460195526de159c6a5c9 | [link](https://prow.ci.openshift.org/view/gs/origin-ci-test/pr-logs/pull/redhat-developer_service-binding-operator/1035/pull-ci-redhat-developer-service-binding-operator-master-4.6-acceptance/1442887179897409536) | true | `/test 4.6-acceptance`

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

<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
pedjak: /lgtm
/approve
openshift-ci[bot]: [APPROVALNOTIFIER] This PR is **APPROVED**

This pull-request has been approved by: *<a href="https://github.com/redhat-developer/service-binding-operator/pull/1035#issuecomment-929497241" title="Approved">pedjak</a>*

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).

The pull request process is described [here](https://git.k8s.io/community/contributors/guide/owners.md#the-code-review-process)

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

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

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":[]} -->

Patch:
diff --git a/apis/binding/v1alpha1/servicebinding_types.go b/apis/binding/v1alpha1/servicebinding_types.go
index dddf1ca4..9df862b2 100644
--- a/apis/binding/v1alpha1/servicebinding_types.go
+++ b/apis/binding/v1alpha1/servicebinding_types.go
@@ -30,18 +30,6 @@ var templates = map[string]string{
 
 // ServiceBindingSpec defines the desired state of ServiceBinding.
 type ServiceBindingSpec struct {
-	// MountPath specifies the path inside the app container where bindings
-	// will be mounted.  The environment variable `SERVICE_BINDING_ROOT`
-	// has higher precedence than this option, and setting it within an
-	// application to be bound will cause MountPath to be ignored and will
-	// always mount resources as files.  If it isn't set, then it is
-	// automatically set to the value of MountPath.  If neither MountPath
-	// nor `SERVICE_BINDING_ROOT` are set, this field defaults to
-	// `/bindings`, and `SERVICE_BINDING_ROOT` is also set.  This results
-	// in the file being mounted under the directory specified.
-	// +optional
-	MountPath string `json:"mountPath,omitempty"`
-
 	// NamingStrategy defines custom string template for preparing binding
 	// names.  It can be set to pre-defined strategies: `none`,
 	// `lowercase`, or `uppercase`.  Otherwise, it is treated as a custom
@@ -70,8 +58,9 @@ type ServiceBindingSpec struct {
 	DetectBindingResources bool `json:"detectBindingResources,omitempty"`
 
 	// BindAsFiles makes the binding values available as files in the
-	// application's container.  See the MountPath attribute description
-	// for more details.
+	// application's container.  By default, values are mounted under the path
+	// "/bindings"; this can be changed by setting the SERVICE_BINDING_ROOT
+	// environment variable.
 	// +optional
 	// +kubebuilder:default:=true
 	BindAsFiles bool `json:"bindAsFiles"`
diff --git a/config/crd/bases/binding.operators.coreos.com_servicebindings.yaml b/config/crd/bases/binding.operators.coreos.com_servicebindings.yaml
index c0075be2..ac232eda 100644
--- a/config/crd/bases/binding.operators.coreos.com_servicebindings.yaml
+++ b/config/crd/bases/binding.operators.coreos.com_servicebindings.yaml
@@ -133,8 +133,9 @@ spec:
               bindAsFiles:
                 default: true
                 description: BindAsFiles makes the binding values available as files
-                  in the application's container.  See the MountPath attribute description
-                  for more details.
+                  in the application's container.  By default, values are mounted
+                  under the path "/bindings"; this can be changed by setting the SERVICE_BINDING_ROOT
+                  environment variable.
                 type: boolean
               detectBindingResources:
                 description: DetectBindingResources is a flag that, when set to true,
@@ -160,17 +161,6 @@ spec:
                   - value
                   type: object
                 type: array
-              mountPath:
-                description: MountPath specifies the path inside the app container
-                  where bindings will be mounted.  The environment variable `SERVICE_BINDING_ROOT`
-                  has higher precedence than this option, and setting it within an
-                  application to be bound will cause MountPath to be ignored and will
-                  always mount resources as files.  If it isn't set, then it is automatically
-                  set to the value of MountPath.  If neither MountPath nor `SERVICE_BINDING_ROOT`
-                  are set, this field defaults to `/bindings`, and `SERVICE_BINDING_ROOT`
-                  is also set.  This results in the file being mounted under the directory
-                  specified.
-                type: string
               namingStrategy:
                 description: 'NamingStrategy defines custom string template for preparing
                   binding names.  It can be set to pre-defined strategies: `none`,
diff --git a/docs/User_Guide.md b/docs/User_Guide.md
index baf40692..e2690e4d 100644
--- a/docs/User_Guide.md
+++ b/docs/User_Guide.md
@@ -283,51 +283,9 @@ bindings
 │   ├── COCKROACHDB_CONF_PORT
 ```
 
-Instead of `/bindings`, you can specify a custom binding root path by specifying the same in `spec.mountPath`, example,
+Setting `spec.bindAsFiles` to `false` (default: `true`) enables injecting gathered bindings as environment variables into the application/workload instead of injecting this data as files.
 
-``` yaml
-apiVersion: binding.operators.coreos.com/v1alpha1
-kind: ServiceBinding
-metadata:
-  name: binding-request
-  namespace: service-binding-demo
-spec:
-  bindAsFiles: true
-  application:
-    name: java-app
-    group: apps
-    version: v1
-    resource: deployments
-  services:
-  - group: charts.helm.k8s.io
-    version: v1alpha1
-    kind: Cockroachdb
-    name: db-demo
-    id: db_1
-  mounthPath: '/bindings/accounts-db' # User configurable binding root
-```
-
-Here's how the mount paths would look like, where applicable:
-
-```
-bindings
-├── accounts-db
-│   ├── COCKROACHDB_CLUSTERIP
-│   ├── COCKROACHDB_CONF_PORT
-```
-
-Setting `spec.bindAsFiles` to `false` (default: `true`) enables injecting gathered bindings as env variables into the application/workload.
-
-For determining the folder where bindings should be injected, we can specify the destination using `spec.mountPath` or we can use `SERVICE_BINDING_ROOT` environment variable. If both are set then the `SERVICE_BINDING_ROOT` environment variable takes the higher precedence.
-
-The following table summarizes how the final bind path is computed:
-
-| spec.mountPath  | SERVICE_BINDING_ROOT | Final Bind Path                      |
-| --------------- | ---------------------| -------------------------------------|
-| nil             | non-existent         | /bindings/ServiceBinding_Name        |
-| nil             | /some/path/root      | /some/path/root/ServiceBinding_Name  |
-| /home/foo       | non-existent         | /home/foo                            |
-| /home/foo       | /some/path/root      | /some/path/root/ServiceBinding_Name  |
+For determining the folder where bindings should be injected, we can use the `SERVICE_BINDING_ROOT` environment variable.  This provides a method for overriding the path that injected configuration data will be exposed.
 
 ## Custom naming strategy
 Binding names declared through annotations or CSV descriptors are processed before injected into the application according to the following strategy
diff --git a/pkg/reconcile/pipeline/api.go b/pkg/reconcile/pipeline/api.go
index 0675e9d7..ab64db15 100644
--- a/pkg/reconcile/pipeline/api.go
+++ b/pkg/reconcile/pipeline/api.go
@@ -110,9 +110,6 @@ type Context interface {
 	// Return true if bindings should be projected as files inside application containers
 	BindAsFiles() bool
 
-	// Path where bindings should be mounted inside application containers
-	MountPath() string
-
 	// Template that should be applied on collected binding names, prior projection
 	NamingTemplate() string
 
diff --git a/pkg/reconcile/pipeline/context/impl.go b/pkg/reconcile/pipeline/context/impl.go
index d6731adf..73843621 100644
--- a/pkg/reconcile/pipeline/context/impl.go
+++ b/pkg/reconcile/pipeline/context/impl.go
@@ -135,10 +135,6 @@ func (i *bindingImpl) EnvBindings() []*pipeline.EnvBinding {
 	return make([]*pipeline.EnvBinding, 0)
 }
 
-func (i *bindingImpl) MountPath() string {
-	return i.serviceBinding.Spec.MountPath
-}
-
 func (i *bindingImpl) Mappings() map[string]string {
 	result := make(map[string]string)
 	for _, m := range i.serviceBinding.Spec.Mappings {
diff --git a/pkg/reconcile/pipeline/context/spec_binding_impl.go b/pkg/reconcile/pipeline/context/spec_binding_impl.go
index 18f7807a..7856eb85 100644
--- a/pkg/reconcile/pipeline/context/spec_binding_impl.go
+++ b/pkg/reconcile/pipeline/context/spec_binding_impl.go
@@ -185,10 +185,6 @@ func (s *specImpl) BindAsFiles() bool {
 	return true
 }
 
-func (s *specImpl) MountPath() string {
-	return ""
-}
-
 func (s *specImpl) NamingTemplate() string {
 	return ""
 }
diff --git a/pkg/reconcile/pipeline/handler/project/impl.go b/pkg/reconcile/pipeline/handler/project/impl.go
index b25f3e52..76c30a79 100644
--- a/pkg/reconcile/pipeline/handler/project/impl.go
+++ b/pkg/reconcile/pipeline/handler/project/impl.go
@@ -374,13 +374,8 @@ func mountPath(container map[string]interface{}, ctx pipeline.Context) (string,
 		}
 	}
 
-	mp := ctx.MountPath()
-	if mp == "" {
-		bindingRoot = "/bindings"
-		mp = path.Join(bindingRoot, ctx.BindingName())
-	} else {
-		return mp, nil
-	}
+	bindingRoot = "/bindings"
+	mp := path.Join(bindingRoot, ctx.BindingName())
 
 	u, err := runtime.DefaultUnstructuredConverter.ToUnstructured(&corev1.EnvVar{
 		Name:  bindingRootEnvVar,
diff --git a/pkg/reconcile/pipeline/mocks/mocks_pipeline.go b/pkg/reconcile/pipeline/mocks/mocks_pipeline.go
index 76f0133e..a8f1068e 100644
--- a/pkg/reconcile/pipeline/mocks/mocks_pipeline.go
+++ b/pkg/reconcile/pipeline/mocks/mocks_pipeline.go
@@ -201,20 +201,6 @@ func (mr *MockContextMockRecorder) Mappings() *gomock.Call {
 	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Mappings", reflect.TypeOf((*MockContext)(nil).Mappings))
 }
 
-// MountPath mocks base method.
-func (m *MockContext) MountPath() string {
-	m.ctrl.T.Helper()
-	ret := m.ctrl.Call(m, "MountPath")
-	ret0, _ := ret[0].(string)
-	return ret0
-}
-
-// MountPath indicates an expected call of MountPath.
-func (mr *MockContextMockRecorder) MountPath() *gomock.Call {
-	mr.mock.ctrl.T.Helper()
-	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MountPath", reflect.TypeOf((*MockContext)(nil).MountPath))
-}
-
 // NamingTemplate mocks base method.
 func (m *MockContext) NamingTemplate() string {
 	m.ctrl.T.Helper()


Test patch:
diff --git a/pkg/reconcile/pipeline/handler/project/impl_test.go b/pkg/reconcile/pipeline/handler/project/impl_test.go
index 005c1624..16c2468b 100644
--- a/pkg/reconcile/pipeline/handler/project/impl_test.go
+++ b/pkg/reconcile/pipeline/handler/project/impl_test.go
@@ -474,7 +474,6 @@ var _ = Describe("Inject bindings as files", func() {
 			}
 
 			ctx.EXPECT().Applications().Return(apps, nil)
-			ctx.EXPECT().MountPath().Return("/bla").AnyTimes()
 			ctx.EXPECT().BindingName().Return(bindingName).AnyTimes()
 		})
 		It("should mount binding secret as volume", func() {
@@ -482,18 +481,24 @@ var _ = Describe("Inject bindings as files", func() {
 			for i, old := range deploymentsUnstructuredOld {
 				Expect(deploymentsUnstructured[i]).NotTo(Equal(old))
 			}
-			exoectedD1 := deployment("d1", []corev1.Container{
+			expectedD1 := deployment("d1", []corev1.Container{
 				{
 					Image: "foo",
+					Env: []corev1.EnvVar{
+						{
+							Name:  "SERVICE_BINDING_ROOT",
+							Value: "/bindings",
+						},
+					},
 					VolumeMounts: []corev1.VolumeMount{
 						{
 							Name:      bindingName,
-							MountPath: "/bla",
+							MountPath: "/bindings/sb1",
 						},
 					},
 				},
 			})
-			exoectedD1.Spec.Template.Spec.Volumes = []corev1.Volume{
+			expectedD1.Spec.Template.Spec.Volumes = []corev1.Volume{
 				{
 					Name: bindingName,
 					VolumeSource: corev1.VolumeSource{
@@ -565,10 +570,16 @@ var _ = Describe("Inject bindings as files", func() {
 			expectedD4 := deployment("d4", []corev1.Container{
 				{
 					Image: "foo",
+					Env: []corev1.EnvVar{
+						{
+							Name:  "SERVICE_BINDING_ROOT",
+							Value: "/bindings",
+						},
+					},
 					VolumeMounts: []corev1.VolumeMount{
 						{
 							Name:      bindingName,
-							MountPath: "/bla",
+							MountPath: "/bindings/sb1",
 						},
 					},
 				},
@@ -599,11 +610,15 @@ var _ = Describe("Inject bindings as files", func() {
 							Name:  "SOME_ENV",
 							Value: "val1",
 						},
+						{
+							Name:  "SERVICE_BINDING_ROOT",
+							Value: "/bindings",
+						},
 					},
 					VolumeMounts: []corev1.VolumeMount{
 						{
 							Name:      bindingName,
-							MountPath: "/bla",
+							MountPath: "/bindings/sb1",
 						},
 					},
 				},
@@ -621,10 +636,16 @@ var _ = Describe("Inject bindings as files", func() {
 			expectedD6 := deployment("d6", []corev1.Container{
 				{
 					Image: "foo",
+					Env: []corev1.EnvVar{
+						{
+							Name:  "SERVICE_BINDING_ROOT",
+							Value: "/bindings",
+						},
+					},
 					VolumeMounts: []corev1.VolumeMount{
 						{
 							Name:      bindingName,
-							MountPath: "/bla",
+							MountPath: "/bindings/sb1",
 						},
 					},
 				},
@@ -639,7 +660,7 @@ var _ = Describe("Inject bindings as files", func() {
 					},
 				},
 			}
-			for i, expectedDeployment := range []*appsv1.Deployment{exoectedD1, expectedD2, expectedD3, expectedD4, expectedD5, expectedD6, expectedD6, expectedD6, expectedD6} {
+			for i, expectedDeployment := range []*appsv1.Deployment{expectedD1, expectedD2, expectedD3, expectedD4, expectedD5, expectedD6, expectedD6, expectedD6, expectedD6} {
 				d := &appsv1.Deployment{}
 				err := runtime.DefaultUnstructuredConverter.FromUnstructured(deploymentsUnstructured[i].Object, d)
 				Expect(err).NotTo(HaveOccurred())
diff --git a/test/acceptance/features/bindWithCustomNamingStrategies.feature b/test/acceptance/features/bindWithCustomNamingStrategies.feature
index ecea69c3..89618848 100644
--- a/test/acceptance/features/bindWithCustomNamingStrategies.feature
+++ b/test/acceptance/features/bindWithCustomNamingStrategies.feature
@@ -175,7 +175,6 @@ Feature: Bind an application to a service using custom naming strategies
                 name: binding-request-custom-file-naming
             spec:
                 namingStrategy: "PREFIX_{{ .service.kind | upper }}_{{ .name | upper }}_SUFFIX"
-                mountPath: "/foo/bar"
                 bindAsFiles: true
                 application:
                     name: myapp-custom-file-naming
@@ -189,7 +188,7 @@ Feature: Bind an application to a service using custom naming strategies
                     name: backend-custom-file-naming
             """
         Then Service Binding "binding-request-custom-file-naming" is ready
-        And Content of file "/foo/bar/PREFIX_BACKEND_HOST_CROSS_NS_SERVICE_SUFFIX" in application pod is
+        And Content of file "/bindings/binding-request-custom-file-naming/PREFIX_BACKEND_HOST_CROSS_NS_SERVICE_SUFFIX" in application pod is
             """
             cross.ns.service.stable.example.com
             """
diff --git a/test/acceptance/features/injectBindingsAsFiles.feature b/test/acceptance/features/injectBindingsAsFiles.feature
index 1c4cd1f2..e4b2d1ed 100644
--- a/test/acceptance/features/injectBindingsAsFiles.feature
+++ b/test/acceptance/features/injectBindingsAsFiles.feature
@@ -117,165 +117,6 @@ Feature: Bindings get injected as files in application
             """
         And The container declared in application resource contains env "SERVICE_BINDING_ROOT" set only once
 
-    Scenario: Binding is injected as file into application at the location specified through mountPath
-        Given Generic test application "generic-app-a-d-u-3" is running
-        * The Custom Resource is present
-            """
-            apiVersion: "stable.example.com/v1"
-            kind: Backend
-            metadata:
-                name: backend-demo-03
-                annotations:
-                    "service.binding/host": "path={.spec.host}"
-                    "service.binding/port": "path={.spec.port}"
-            spec:
-                host: example.common
-                port: "8080"
-            """
-        When Service Binding is applied
-            """
-            apiVersion: binding.operators.coreos.com/v1alpha1
-            kind: ServiceBinding
-            metadata:
-                name: binding-backend-vm-03
-            spec:
-                mountPath: "/foo/bar"
-                bindAsFiles: true
-                services:
-                -   group: stable.example.com
-                    version: v1
-                    kind: Backend
-                    name: backend-demo-03
-
-                application:
-                    name: generic-app-a-d-u-3
-                    group: apps
-                    version: v1
-                    resource: deployments
-            """
-        Then jq ".status.conditions[] | select(.type=="CollectionReady").status" of Service Binding "binding-backend-vm-03" should be changed to "True"
-        And jq ".status.conditions[] | select(.type=="InjectionReady").status" of Service Binding "binding-backend-vm-03" should be changed to "True"
-        And The env var "host" is not available to the application
-        And The env var "port" is not available to the application
-        And The env var "SERVICE_BINDING_ROOT" is not available to the application
-        And Content of file "/foo/bar/host" in application pod is
-            """
-            example.common
-            """
-        And Content of file "/foo/bar/port" in application pod is
-            """
-            8080
-            """
-
-    Scenario: Binding is injected as files at the location of SERVICE_BINDING_ROOT env var even with mountPath
-        Given Generic test application "generic-app-a-d-u-4" is running with binding root as "/var/data"
-        * The Custom Resource is present
-            """
-            apiVersion: "stable.example.com/v1"
-            kind: Backend
-            metadata:
-                name: backend-demo-04
-                annotations:
-                    "service.binding/host": "path={.spec.host}"
-                    "service.binding/port": "path={.spec.port}"
-            spec:
-                host: example.common
-                port: "8080"
-            """
-        When Service Binding is applied
-            """
-            apiVersion: binding.operators.coreos.com/v1alpha1
-            kind: ServiceBinding
-            metadata:
-                name: binding-backend-vm-04
-            spec:
-                mountPath: "/foo/bar"
-                bindAsFiles: true
-                services:
-                -   group: stable.example.com
-                    version: v1
-                    kind: Backend
-                    name: backend-demo-04
-                    id: bk
-
-                mappings:
-                  - name: MYHOST
-                    value: '{{ .bk.spec.host }}'
-
-                application:
-                    name: generic-app-a-d-u-4
-                    group: apps
-                    version: v1
-                    resource: deployments
-            """
-        Then jq ".status.conditions[] | select(.type=="CollectionReady").status" of Service Binding "binding-backend-vm-04" should be changed to "True"
-        And jq ".status.conditions[] | select(.type=="InjectionReady").status" of Service Binding "binding-backend-vm-04" should be changed to "True"
-        And The env var "host" is not available to the application
-        And The env var "port" is not available to the application
-        And The application env var "SERVICE_BINDING_ROOT" has value "/var/data"
-        And Content of file "/var/data/binding-backend-vm-04/host" in application pod is
-            """
-            example.common
-            """
-        And Content of file "/var/data/binding-backend-vm-04/port" in application pod is
-            """
-            8080
-            """
-        And Content of file "/var/data/binding-backend-vm-04/MYHOST" in application pod is
-            """
-            example.common
-            """
-
-    Scenario: Binding is injected as file into application at the location specified through mountPath with empty prefix
-        Given Generic test application "generic-app-a-d-u-5" is running
-        * The Custom Resource is present
-            """
-            apiVersion: "stable.example.com/v1"
-            kind: Backend
-            metadata:
-                name: backend-demo-05
-                annotations:
-                    "service.binding/host": "path={.spec.host}"
-                    "service.binding/port": "path={.spec.port}"
-            spec:
-                host: example.common
-                port: "8080"
-            """
-        When Service Binding is applied
-            """
-            apiVersion: binding.operators.coreos.com/v1alpha1
-            kind: ServiceBinding
-            metadata:
-                name: binding-backend-vm-05
-            spec:
-                mountPath: "/foo/bar"
-                bindAsFiles: true
-                services:
-                -   group: stable.example.com
-                    version: v1
-                    kind: Backend
-                    name: backend-demo-05
-
-                application:
-                    name: generic-app-a-d-u-5
-                    group: apps
-                    version: v1
-                    resource: deployments
-            """
-        Then jq ".status.conditions[] | select(.type=="CollectionReady").status" of Service Binding "binding-backend-vm-05" should be changed to "True"
-        And jq ".status.conditions[] | select(.type=="InjectionReady").status" of Service Binding "binding-backend-vm-05" should be changed to "True"
-        And The env var "host" is not available to the application
-        And The env var "port" is not available to the application
-        And The env var "SERVICE_BINDING_ROOT" is not available to the application
-        And Content of file "/foo/bar/host" in application pod is
-            """
-            example.common
-            """
-        And Content of file "/foo/bar/port" in application pod is
-            """
-            8080
-            """
-
     @negative
     Scenario: Do not bind as files if there is no binding data is collected from the service
         Given Generic test application is running