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: articles/operator-service-manager/safe-upgrade-practices.md
+56-15Lines changed: 56 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -107,13 +107,15 @@ After fixing the failed nfApp, but before attempting an upgrade retry, consider
107
107
By default, the reput retries nfApps in the declared update order, unless they're skipped using `applicationEnablement` flag.
108
108
109
109
## Skip nfApps using applicationEnablement
110
-
In the NFDV resource, under `deployParametersMappingRuleProfile` there's the property `applicationEnablement` of type enum, which takes values: Unknown, Enabled, or disabled. It can be used to exclude nfApp operations during network function (NF) deployment.
110
+
In the NFDV resource, under `deployParametersMappingRuleProfile` there's a supported property `applicationEnablement` of type enum, which takes values of Unknown, Enabled, or disabled. It can be used to manually exclude nfApp operations during network function (NF) deployment. The following example demonstrates a generic method to parameterize `applicationEnablement` as an included value in `roleOverrideValues` property.
111
111
112
-
### Publisher changes
113
-
For the `applicationEnablement` property, the publisher has two options: either provide a default value or parameterize it. The following example sets `enabled` as the default value for `hellotest` which can later be changed via override.
112
+
### Template changes
113
+
While no NFDV changes are necessarily required, optionally the publisher can use the NFDV to set a default value for the `applicationEnablement` property. The default value will be used, unless its changed via `roleOverrideValues`.
114
+
115
+
#### NFDV Template
116
+
Use the NFDV template to set a default value for `applicationEnablement`. The following example sets `enabled` state as the default value for `hellotest` networkfunctionApplication.
114
117
115
118
```json
116
-
{
117
119
"location":"<location>",
118
120
"properties": {
119
121
"networkFunctionTemplate": {
@@ -122,27 +124,66 @@ For the `applicationEnablement` property, the publisher has two options: either
122
124
"applicationEnablement": "Enabled"
123
125
},
124
126
"name": "hellotest"
125
-
}
126
127
],
127
128
"nfviType": "AzureArcKubernetes"
128
-
},
129
+
},
130
+
}
131
+
```
132
+
133
+
To manage the `applicationEnablement` value more dynamically, the Operator can pass a realtime value using the NF template `roleOverrideValues` property. While it's possible for the operator to manipulate the NF template directly, instead it's suggested to parameterize the `roleOverrideValues`, so that values can be passed via a CGV template at runtime. This requires the following modifications to the CGS, NF templates and finally the CGV.
134
+
135
+
#### CGS Template
136
+
The CGS template must be updated to include one variable declaration for each line to parameterize under `roleOverrideValues`. The below example demonstrates three override values, one to for nfConfiguration [0] and two for nfApplication options [1,2].
137
+
138
+
```json
139
+
"roleOverrideValues0": {
140
+
"type": "string"
141
+
},
142
+
"roleOverrideValues1": {
143
+
"type": "string"
144
+
},
145
+
"roleOverrideValues2": {
146
+
"type": "string"
147
+
}
148
+
```
149
+
150
+
#### NF Template
151
+
The NF template must be update three ways. First, the implicit config parameter must be defined as type object. Second, roleOverrideValues0, roleOverrideValues1 and roleOverrideValues2 must be declared as variables mapped to config parameter. Third, roleOverrideValues0, roleOverrideValues1 and roleOverrideValues2 must be referenced for substitution under `roleOverrideValues` in proper order and following proper syntax.
Operators inherit default `applicationEnablement` values as defined by the NFDV. If `applicationEnablement` is parameterized, then it can be passed through the `deploymentValues` property at runtime using the CGV. `roleOverrideValues` specifies a nondefault setting for `applicationEnablement`.
176
+
#### CGV Template
177
+
The CGV template can now be updated to include the content for each variable to be substituted into `roleOverrideValues` property at run-time. The below example sets `rollbackEnabled` to true, followed by override sets for `hellotest` and `hellotest1` nfApplications.
With this framework in place, the Operator can manage any of the `roleOverrideValues` via simple updates to the CGV, followed by attaching that CGV to the desired SNS operation.
146
187
147
188
## Skip nfApps which have no change
148
189
The `skipUpgrade` feature is designed to optimize the time taken for CNF upgrades. When the publisher enables this flag in the `roleOverrideValues` under `upgradeOptions`, the AOSM service layer performs certain prechecks, to determine whether an upgrade for a specific `nfApplication` can be skipped. If all precheck criteria are met, the upgrade is skipped for that application. Otherwise, an upgrade is executed at the cluster level.
0 commit comments