You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: namespace/README.adoc
+54
Original file line number
Diff line number
Diff line change
@@ -112,3 +112,57 @@ The steps are the same as previous examples, the difference is that 'apply-names
112
112
...
113
113
114
114
```
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.
0 commit comments