Skip to content

Commit 8902158

Browse files
authored
Revise Helm package requirements to best practices
Updated the title and description to reflect best practices for Helm packages in Azure Operator Service Manager. Removed redundant text and improved clarity in the document.
1 parent f2503ac commit 8902158

1 file changed

Lines changed: 79 additions & 28 deletions

File tree

articles/operator-service-manager/helm-requirements.md

Lines changed: 79 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
title: Helm Package Requirements for Azure Operator Service Manager
3-
description: Learn about the Helm package requirements for Azure Operator Service Manager.
2+
title: Publisher helm best practices for Azure Operator Service Manager
3+
description: Learn about publisher helm best practices for Azure Operator Service Manager.
44
author: msftadam
55
ms.author: adamdor
66
ms.date: 08/27/2025
@@ -9,47 +9,35 @@ ms.service: azure-operator-service-manager
99
ms.custom: sfi-ropc-blocked
1010
---
1111

12-
# Helm package requirements for Azure Operator Service Manager
13-
14-
Helm is a package manager for Kubernetes that helps simplify application lifecycle management. Helm packages are called *charts* and consist of YAML configuration and template files.
15-
16-
Upon execution of a Helm operation, the charts are rendered into Kubernetes manifest files to trigger the appropriate application lifecycle actions. For the most efficient integration with Azure Operator Service Manager, use best practices when you're developing Helm charts.
12+
# Helm package best practices
13+
Helm is a package manager for Kubernetes that helps simplify application lifecycle management. Helm packages are called *charts* and consist of YAML configuration and template files. Upon execution of a Helm operation, the charts are rendered into Kubernetes manifest files to trigger the appropriate application lifecycle actions. For the most efficient integration with Azure Operator Service Manager, follow these recommended best practices when developing Helm charts.
1714

1815
## Considerations for registryPath and imagePullSecrets
19-
20-
Every Helm chart generally requires `registryPath` and `imagePullSecrets` parameters. Most commonly, you expose these parameters in the `values.yaml` file.
21-
22-
At first, Azure Operator Service Manager depended on publishers managing these values in a strict manner (legacy approach), to be substituted for the proper Azure values during deployment. But not all publishers could easily comply with the strict management of these values. Some charts hide `registryPath` and/or `imagePullSecrets` behind conditionals, or other value restrictions, which weren't always met. Some charts declare `registryPath` and/or `imagePullSecrets` as an array instead of as the expected named string.
16+
Every Helm chart generally requires `registryPath` and `imagePullSecrets` parameters. Most commonly, you expose these parameters in the `values.yaml` file. At first, Azure Operator Service Manager depended on publishers managing these values in a strict manner (legacy approach), to be substituted for the proper Azure values during deployment. But not all publishers could easily comply with the strict management of these values. Some charts hide `registryPath` and/or `imagePullSecrets` behind conditionals, or other value restrictions, which weren't always met. Some charts declare `registryPath` and/or `imagePullSecrets` as an array instead of as the expected named string.
2317

2418
To reduce the compliance requirements on publishers, Azure Operator Service Manager introduced two improved methods: `injectArtifactStoreDetail` and cluster registry. These newer methods don't depend on `registryPath` or `imagePullSecrets` appearing in the Helm package. Instead, these methods use a webhook to inject proper Azure values directly into pod operations.
2519

2620
### Method summary for registryPath and imagePullSecrets
27-
2821
All three methods are presently supported as described in this article. Choose the best option for your network function (NF) and use case.
2922

3023
Legacy:
31-
3224
* Requires you to parameterize `registryPath` and `imagePullSecrets` in Helm values and deployment templates for substitution.
3325
* Hosts images in Azure Container Registry.
3426

3527
InjectArtifactStoreDetail:
36-
3728
* Uses a webhook to inject `registryPath` and `imagePullSecrets` directly into pod operations, with minimal dependencies on Helm.
3829
* Hosts images in Azure Container Registry.
3930

4031
Cluster registry:
41-
4232
* Uses a webhook to inject `registryPath` and `imagePullSecrets` directly into pod operations, with no dependency on Helm.
4333
* Hosts images in the local network function operator (NFO) extension.
4434

4535
In all three cases, Azure Operator Service Manager substitutes Azure values for whatever values you expose in templates. The only difference is the method of substitution.
4636

4737
## Legacy requirements for registryPath and imagePullSecrets
48-
4938
Azure Operator Service Manager uses the Azure Network Function Manager service to deploy containerized network functions (CNFs). With the legacy method, Azure Network Function Manager substitutes the Azure Operator Service Manager container's `registryPath` and `imagePullSecrets` values into the Helm operation during the deployment of network functions.
5039

5140
### Example of the legacy method
52-
5341
The following Helm deployment template shows an example of how you should expose `registryPath` and `imagePullSecrets`:
5442

5543
```
@@ -122,15 +110,12 @@ In the preceding examples:
122110
* `imagePullSecrets` and `registryPath` must be provided during NFDV onboarding.
123111

124112
### Other considerations
125-
126113
Consider the following recommendations when you're using the legacy method.
127114

128115
#### Avoid references to an external registry
129-
130116
References to an external registry can cause validation problems. For example, if `deployment.yaml` uses a hard-coded registry path or external registry references, it fails validation.
131117

132118
#### Perform manual validations
133-
134119
Review the images and container specifications to ensure that the images have a prefix of `registryPath` and that `imagePullSecrets` is populated with `secretName`:
135120

136121
```shell
@@ -145,9 +130,7 @@ Here's another example:
145130
```
146131

147132
#### Use a static image repository and tags
148-
149133
Each Helm chart should contain a static image repository and tags. You set the static values through one of the following methods:
150-
151134
* In the `image` line
152135
* In `values.yaml`, without exposing these values in the NFDV
153136

@@ -171,7 +154,6 @@ image:
171154
```
172155

173156
## injectArtifactStoreDetails requirements for registryPath and imagePullSecrets
174-
175157
In some cases, third-party Helm charts might not be fully compliant with Azure Operator Service Manager requirements for `registryPath`. In these cases, you can use `injectArtifactStoreDetails` to avoid making compliance changes to Helm packages.
176158

177159
With `injectArtifactStoreDetails` enabled, you use a webhook method to inject the proper `registryPath` and `imagePullSecrets` dynamically during the pod operations. This method overrides the values that are configured in the Helm package. You still must use legal dummy values where `registryPath` and `imagePullSecrets` are referenced, usually in the `global` section of `values.yaml`.
@@ -188,7 +170,6 @@ global:
188170
> If `registryPath` is left blank in the underlying Helm package, site network service (SNS) deployment fails during image download.
189171
190172
### Using the injectArtifactStoreDetails method
191-
192173
To enable `injectArtifactStoreDetails`, set the `installOptions` parameter in the NF resource's `roleOverrides` section to `true`, as shown in the following example:
193174

194175
```
@@ -217,7 +198,6 @@ resource networkFunction 'Microsoft.HybridNetwork/networkFunctions@2023-09-01' =
217198
> The Helm chart package must still expose properly formatted `registryPath` and `imagePullSecrets` values.
218199
219200
## Cluster registry requirements for registryPath and imagePullSecrets
220-
221201
With a cluster registry, images are copied from Azure Container Registry to a local Docker repository on the Nexus Kubernetes cluster. You use a webhook method to inject the proper `registryPath` and `imagePullSecrets` values dynamically during the pod operations. This method overrides the values that are configured in the Helm package. You still must use legal dummy values where `registryPath` and `imagePullSecrets` are referenced, usually in the `global` section of `values.yaml`.
222202

223203
The following `values.yaml` example shows how you can provide the `registryPath` and `imagePullSecrets` values for compatibility with the cluster registry approach:
@@ -234,19 +214,16 @@ global:
234214
For more information on using a cluster registry, see the [concept documentation](get-started-with-cluster-registry.md).
235215

236216
## Recommendations for immutability restrictions
237-
238217
Immutability restrictions prevent changes to a file or directory. For example, an immutable file can't be changed or renamed. You should avoid using mutable tags such as `latest`, `dev`, or `stable`. For example, if `deployment.yaml` uses `latest` for `.Values.image.tag`, the deployment fails.
239218

240219
```
241220
image: "{{ .Values.global.registryPath }}/{{ .Values.image.repository }}:{{ .Values.image.tag}}"
242221
```
243222

244223
## Recommendations for CRD declaration and usage split
245-
246224
We recommend splitting the declaration and usage of customer resource definitions (CRDs) into separate Helm charts to support updates. For detailed information, see the [Helm documentation about separating charts](https://helm.sh/docs/chart_best_practices/custom_resource_definitions/#method-2-separate-charts).
247225

248226
## Recommendations for Image Version Tagging
249-
250227
To ensure consistent and predictable deployments, we recommend the following for all container images:
251228
* Avoid using `:latest` in production environments.
252229
* Using latest can cause unexpected behavior because the actual image behind latest can change without notice.
@@ -257,4 +234,78 @@ To ensure consistent and predictable deployments, we recommend the following for
257234

258235
These practices help prevent deployment issues and improve traceability, rollback safety, and security compliance.
259236

237+
## Recommendations for nfApplication sequential ordering
238+
By default, CNF applications are installed or updated based on the order in which they appear in the NFDV. For the deletion operation, the CNF applications are deleted in the specified reverse order. If you need to define a specific order of CNF applications that's different from the default, use `dependsOnProfile` to define a unique sequence for installation, update, and deletion operations.
239+
240+
### How to use dependsOnProfile
241+
You can use `dependsOnProfile` in the NFDV to control the sequence of Helm executions for CNF applications. In the example that follows:
242+
- During an installation operation, the CNF applications are deployed in the following order: `dummyApplication1`, `dummyApplication2`, `dummyApplication`.
243+
- During an update operation, the CNF applications are updated in the following order: `dummyApplication2`, `dummyApplication1`, `dummyApplication`.
244+
- During a deletion operation, the CNF applications are deleted in the following order: `dummyApplication2`, `dummyApplication1`, `dummyApplication`.
245+
246+
```json
247+
{
248+
"location": "eastus",
249+
"properties": {
250+
"networkFunctionTemplate": {
251+
"networkFunctionApplications": [
252+
{
253+
"dependsOnProfile": {
254+
"installDependsOn": [
255+
"dummyApplication1",
256+
"dummyApplication2"
257+
],
258+
"uninstallDependsOn": [
259+
"dummyApplication1"
260+
],
261+
"updateDependsOn": [
262+
"dummyApplication1"
263+
]
264+
},
265+
"name": "dummyApplication"
266+
},
267+
{
268+
"dependsOnProfile": {
269+
"installDependsOn": [
270+
],
271+
"uninstallDependsOn": [
272+
"dummyApplication2"
273+
],
274+
"updateDependsOn": [
275+
"dummyApplication2"
276+
]
277+
},
278+
"name": "dummyApplication1"
279+
},
280+
{
281+
"dependsOnProfile": null,
282+
"name": "dummyApplication2"
283+
}
284+
],
285+
"nfviType": "AzureArcKubernetes"
286+
},
287+
"networkFunctionType": "ContainerizedNetworkFunction"
288+
}
289+
}
290+
```
291+
292+
### Common errors with dependsOnProfile
293+
Currently, if the `dependsOnProfile` code provided in the NFDV is invalid, the NF operation fails with a validation error. The message for the validation error appears in the operation status resource and looks similar to the following example:
294+
295+
```json
296+
{
297+
"id": "/providers/Microsoft.HybridNetwork/locations/EASTUS2EUAP/operationStatuses/ca051ddf-c8bc-4cb2-945c-a292bf7b654b*C9B39996CFCD97AB3A121AE136ED47F67BB13946C573EF90628C47628BC5EF5F",
298+
"name": "ca051ddf-c8bc-4cb2-945c-a292bf7b654b*C9B39996CFCD97AB3A121AE136ED47F67BB13946C573EF90628C47628BC5EF5F",
299+
"resourceId": "/subscriptions/aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e/resourceGroups/xinrui-publisher/providers/Microsoft.HybridNetwork/networkfunctions/testnfDependsOn02",
300+
"status": "Failed",
301+
"startTime": "2023-07-17T20:48:01.4792943Z",
302+
"endTime": "2023-07-17T20:48:10.0191285Z",
303+
"error": {
304+
"code": "DependenciesValidationFailed",
305+
"message": "CyclicDependencies: Circular dependencies detected at hellotest."
306+
}
307+
}
308+
```
309+
310+
260311

0 commit comments

Comments
 (0)