Skip to content

Commit be8fead

Browse files
author
I744845
committed
Added description for new parameters
1 parent cecbb80 commit be8fead

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed

namespace/README.adoc

+54
Original file line numberDiff line numberDiff line change
@@ -112,3 +112,57 @@ The steps are the same as previous examples, the difference is that 'apply-names
112112
...
113113

114114
```
115+
## Deploying with global namespace modifier parameter
116+
117+
To deploy an application with set global parameters, follow these steps:
118+
119+
### 1. Check out the repository and navigate to the 'cf-mta-examples/namespace/global-parameters' directory.
120+
### 2. The deployment process is similar to previous examples, but there are new parameters for modifying namespace behavior globally and locally.
121+
122+
The global namespace parameters are defined as follows:
123+
```
124+
parameters:
125+
apply-namespace:
126+
app-names: true
127+
service-names: true
128+
app-routes: true
129+
```
130+
131+
If you deploy with only these parameters, all applications, services, and routes are expected to have the namespace applied as a prefix, if one was provided.
132+
133+
When a namespace modifying parameter locally, for example:
134+
```
135+
modules:
136+
- name: hello-backend
137+
type: application
138+
path: appBits.zip
139+
parameters:
140+
apply-namespace: false
141+
```
142+
it means that the application named "hello-backend" will not have the namespace prefix. Locally applied namespace parameters have higher priority than global parameters.
143+
144+
The local `apply-namespace` parameter is set for one application/service/route, whereas global parameters are set on all applications/services/routes.
145+
146+
When you run the command:
147+
```bash
148+
$ cf deploy ./hello.mtar --namespace foo
149+
```
150+
the expected results are:
151+
- hello-backend // local value is higher priority that global and global is ignored
152+
- foo-hello-router // global value is applied
153+
- route-without-namespace.${default-domain}
154+
- foo-my-cf-service
155+
156+
Operation parameters/command-line options have the highest priority. If you use them, all applications/services/routes will follow the behavior specified in these command-line options and ignore all additional parameters, even if present.
157+
158+
When you run the command:
159+
```bash
160+
$ cf deploy ./hello.mtar --namespace foo --apply-namespace-app-names true --apply-namespace-service-names true --apply-namespace-app-routes true
161+
```
162+
all applications/services/routes will have the prefix `foo`. In this way, other parameters in the descriptor are ignored.
163+
164+
Similarly, when you run the command:
165+
```bash
166+
$ cf deploy ./hello.mtar --namespace foo --apply-namespace-app-names false --apply-namespace-service-names false --apply-namespace-app-routes false
167+
```
168+
none of the applications/services/routes will have the prefix `foo`.

0 commit comments

Comments
 (0)