## 4. Default Values
If you don't provide any of the above mentioned parameters, the application will use the predefined default values. When you set the ' --namespace ' option, the default value is true , otherwise, it's false .
## Examples
To deploy several entities of a multitarget application using namespaces, follow these steps:
1. Using the CF CLI, deploy the initial MTA archive by using the command cf deploy ./MyMTA.mtar with the descriptor given below:
<!-- image -->
The result should match the image below:
<!-- image -->
2. Deploy again the MTA archive by using the command cf deploy ./MyMTA.mtar --namespace foo with the same descriptor. The result should match the image shown below:
<!-- image -->
If you bind 'appA' to 'appA.my-domain.com', the system automatically binds 'foo-appA' to 'foo-appA.mydomain.com' upon deployment. If 'appA' requires a service instance called 'service', 'foo-appA' binds to a different service instance named 'foo-service'.
There are also other ways to achieve this result, for example:
- Deploy using the cf deploy command with the following options:
```
cf deploy ./MyMTA.mtar --namespace foo --apply-namespace-app-names true --
```
```
apply-namespace-service-names true --apply-namespace-app-routes true
```
This command deploys the MTA archive 'MyMTA.mtar' and applies the namespace 'foo' to the application names, service names, and application routes.
- Set global parameters in the deployment descriptor:
If you don't have operation parameters or module-level and resource-level parameters, you can set the global parameters in the deployment descriptor to true . This approach produces the same result as using the cf deploy command with the namespace options.
Both methods ensure that the namespace is applied consistently across application names, service names, and application routes during the deployment process.
3. Deploy again the MTA archive by using the command cf deploy ./MyMTA.mtar --namespace foo with the given descriptor below:
<!-- image -->
```
parameters: apply-namespace: true
```
The result matches the image below:
<!-- image -->
The deployment automatically binds 'foo-appA' to 'foo-appA.my-domain.com'. If the descriptor contains:
```
routes: - route: appA.${default-domain} apply-namespace: false
```
then 'foo-appA' automatically binds to 'appA.my-domain.com' upon deployment instead.
## Special Use: Sharing One Resource Among Several MTAs Using Namespaces
You can use deployment with namespaces in a way that only one of the resources receives a namespace. To do so, you use the parameter apply-namespace in the MTA deployment descriptor follows, and then deploy by using the procedure above. The deployment result should be as follows:
For the example below we use a service, but this special use can be applied to any module or resource in the descriptor.
<!-- image -->
In the snippet above, the apply-namespace: false overrides the default value true , thus prohibiting the creation of additional instances of the service. This means that the service is unique in the space across all deployments of the MTA, and shared among them.
To see a practical example of the implementation above, go to Deploying MTA in a Namespace .