Skip to content

Commit 01c6814

Browse files
authored
Update safe-upgrade-practices.md
add DependsOnProfile example
1 parent 731e8cf commit 01c6814

File tree

1 file changed

+190
-0
lines changed

1 file changed

+190
-0
lines changed

articles/operator-service-manager/safe-upgrade-practices.md

Lines changed: 190 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,199 @@ In the NFDV resource, under deployParametersMappingRuleProfile there is the prop
9393
### Publisher changes
9494
For the applicationEnablement property, the publisher has two options: either provide a default value or parameterize it.
9595

96+
#### Sample NFDV
97+
```json
98+
{
99+
"location":"<location>",
100+
"properties": {
101+
"networkFunctionTemplate": {
102+
"networkFunctionApplications": [
103+
{
104+
"artifactProfile": {
105+
"helmArtifactProfile": {
106+
"var":"var"
107+
},
108+
"artifactStore": {
109+
"id": "<artifactStore id>"
110+
}
111+
},
112+
"deployParametersMappingRuleProfile": {
113+
"helmMappingRuleProfile": {
114+
"releaseNamespace": "{deployParameters.role1releasenamespace}",
115+
"releaseName": "{deployParameters.role1releasename}"
116+
},
117+
"applicationEnablement": "Enabled"
118+
},
119+
"artifactType": "HelmPackage",
120+
"dependsOnProfile": "null",
121+
"name": "hellotest"
122+
},
123+
{
124+
"artifactProfile": {
125+
"helmArtifactProfile": {
126+
"var":"var"
127+
},
128+
"artifactStore": {
129+
"id": "<artifactStore id>"
130+
}
131+
},
132+
"deployParametersMappingRuleProfile": {
133+
"helmMappingRuleProfile": {
134+
"releaseNamespace": "{deployParameters.role2releasenamespace}",
135+
"releaseName": "{deployParameters.role2releasename}"
136+
},
137+
"applicationEnablement": "Enabled"
138+
},
139+
"artifactType": "HelmPackage",
140+
"dependsOnProfile": "null",
141+
"name": "hellotest1"
142+
}
143+
],
144+
"nfviType": "AzureArcKubernetes"
145+
},
146+
"description": "null",
147+
"deployParameters": {"type":"object","properties":{"role1releasenamespace":{"type":"string"},"role1releasename":{"type":"string"},"role2releasenamespace":{"type":"string"},"role2releasename":{"type":"string"}},"required":["role1releasenamespace","role1releasename","role2releasenamespace","role2releasename"]},
148+
"networkFunctionType": "ContainerizedNetworkFunction"
149+
}
150+
}
151+
```
152+
96153
### Operator changes
97154
Operators specify applicationEnablement as defined by the NFDV. If applicationEnablement for specific application is parameterized, then it must be passed through the deploymentValues property at runtime.
98155

156+
#### Sample configuration group schema (CGS) resource
157+
```json
158+
{
159+
"type": "object",
160+
"properties": {
161+
"location": {
162+
"type": "string"
163+
},
164+
"nfviType": {
165+
"type": "string"
166+
},
167+
"nfdvId": {
168+
"type": "string"
169+
},
170+
"helloworld-cnf-config": {
171+
"type": "object",
172+
"properties": {
173+
"role1releasenamespace": {
174+
"type": "string"
175+
},
176+
"role1releasename": {
177+
"type": "string"
178+
},
179+
"role2releasenamespace": {
180+
"type": "string"
181+
},
182+
"role2releasename": {
183+
"type": "string"
184+
},
185+
"roleOverrideValues1": {
186+
"type": "string"
187+
},
188+
"roleOverrideValues2": {
189+
"type": "string"
190+
}
191+
},
192+
"required": [
193+
"role1releasenamespace",
194+
"role1releasename",
195+
"role2releasenamespace",
196+
"role2releasename",
197+
"roleOverrideValues1",
198+
"roleOverrideValues2"
199+
]
200+
}
201+
},
202+
"required": [
203+
"nfviType",
204+
"nfdvId",
205+
"location",
206+
"helloworld-cnf-config"
207+
]
208+
}
209+
```
210+
211+
#### Sample configuration group value (CGV) resource
212+
```json
213+
{
214+
"location": "<location>",
215+
"nfviType": "AzureArcKubernetes",
216+
"nfdvId": "<nfdv_id>",
217+
"helloworld-cnf-config": {
218+
"role1releasenamespace": "hello-test-releasens",
219+
"role1releasename": "hello-test-release",
220+
"role2releasenamespace": "hello-test-2-releasens",
221+
"role2releasename": "hello-test-2-release",
222+
"roleOverrideValues1": "{\"name\":\"hellotest\",\"deployParametersMappingRuleProfile\":{\"applicationEnablement\":\"Enabled\",\"helmMappingRuleProfile\":{\"releaseName\":\"override-release\",\"releaseNamespace\":\"override-namespace\",\"helmPackageVersion\":\"1.0.0\",\"values\":\"\",\"options\":{\"installOptions\":{\"atomic\":\"true\",\"wait\":\"true\",\"timeout\":\"30\",\"injectArtifactStoreDetails\":\"true\"},\"upgradeOptions\":{\"atomic\":\"true\",\"wait\":\"true\",\"timeout\":\"30\",\"injectArtifactStoreDetails\":\"true\"}}}}}",
223+
"roleOverrideValues2": "{\"name\":\"hellotest1\",\"deployParametersMappingRuleProfile\":{\"applicationEnablement\" : \"Enabled\"}}"
224+
}
225+
}
226+
```
227+
228+
#### Sample NF template
229+
```json
230+
{
231+
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
232+
"contentVersion": "1.0.0.0",
233+
"parameters": {
234+
"nameValue": {
235+
"type": "string",
236+
"defaultValue": "HelloWorld"
237+
},
238+
"locationValue": {
239+
"type": "string",
240+
"defaultValue": "eastus"
241+
},
242+
"nfviTypeValue": {
243+
"type": "string",
244+
"defaultValue": "AzureArcKubernetes"
245+
},
246+
"nfviIdValue": {
247+
"type": "string"
248+
},
249+
"config": {
250+
"type": "object",
251+
"defaultValue": {}
252+
},
253+
"nfdvId": {
254+
"type": "string"
255+
}
256+
},
257+
"variables": {
258+
"deploymentValuesValue": "[string(createObject('role1releasenamespace', parameters('config').role1releasenamespace, 'role1releasename',parameters('config').role1releasename, 'role2releasenamespace', parameters('config').role2releasenamespace, 'role2releasename',parameters('config').role2releasename))]",
259+
"nfName": "[concat(parameters('nameValue'), '-CNF')]",
260+
"roleOverrideValues1": "[string(parameters('config').roleOverrideValues1)]",
261+
"roleOverrideValues2": "[string(parameters('config').roleOverrideValues2)]"
262+
},
263+
"resources": [
264+
{
265+
"type": "Microsoft.HybridNetwork/networkFunctions",
266+
"apiVersion": "2023-09-01",
267+
"name": "[variables('nfName')]",
268+
"location": "[parameters('locationValue')]",
269+
"properties": {
270+
"networkFunctionDefinitionVersionResourceReference": {
271+
"id": "[parameters('nfdvId')]",
272+
"idType": "Open"
273+
},
274+
"nfviType": "[parameters('nfviTypeValue')]",
275+
"nfviId": "[parameters('nfviIdValue')]",
276+
"allowSoftwareUpdate": true,
277+
"configurationType": "Open",
278+
"deploymentValues": "[string(variables('deploymentValuesValue'))]",
279+
"roleOverrideValues": [
280+
"[variables('roleOverrideValues1')]",
281+
"[variables('roleOverrideValues2')]"
282+
]
283+
}
284+
}
285+
]
286+
}
287+
```
288+
99289
## Support for in service upgrades
100290
Azure Operator Service Manager, where possible, supports in service upgrades, an upgrade method which advances a deployment version without interrupting the service. However, the ability for a given service to be upgraded without interruption is a feature of the service itself. Consult further with the service publisher to understand the in-service upgrade capabilities.
101291

0 commit comments

Comments
 (0)