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
title: About Helm package requirements for Azure Operator Service Manager
2
+
title: Helm package requirements for Azure Operator Service Manager
3
3
description: Learn about the Helm package requirements for Azure Operator Service Manager.
4
-
author: sherrygonz
5
-
ms.author: sherryg
6
-
ms.date: 09/07/2023
4
+
author: msftadam
5
+
ms.author: adamdor
6
+
ms.date: 01/30/2025
7
7
ms.topic: concept-article
8
8
ms.service: azure-operator-service-manager
9
9
---
10
10
11
-
# Helm package requirements
12
-
Helm is a package manager for Kubernetes that helps you manage Kubernetes applications. Helm packages are called charts, and they consist of a few YAML configuration files and some templates that are rendered into Kubernetes manifest files. Charts are reusable by anyone for any environment, which reduces complexity and duplicates.
11
+
# Helm requirements overview
12
+
Helm is a package manager for Kubernetes that helps to 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 action. For most efficient integration with Azure Operator Service Manager (AOSM), publisher's should consider certain best-practice considerations when developing Helm charts.
13
13
14
-
## Registry URL path and imagepullsecrets requirements
15
-
When developing a helm package, it's common to keep the container registry server URL in the values. Keeping the container registry server URL in the values is useful for moving artifacts between each environment container registry. Azure Operator Service Manager (AOSM) uses the Network Function Manager (NFM) service to deploy Containerized Network Function (CNF). The Network Function Manager (NFM) contains features to inject container registry server location and imagepullsecrets into the helm values during Network Function (NF) deployment. An imagePullSecret is an authorization token, also known as a secret, that stores Docker credentials that are used for accessing a registry. For example, if you need to deploy an application via Kubernetes deployment, you can define a deployment like the following example:
14
+
## Considerations for registryUrl and imagePullSecrets
15
+
Every Helm chart generally requires a declared registryUrl and imagePullSecrets. Best practice recommends that the publisher defines these two parameters consistently as variables in the values.yaml. At first, AOSM depended upon the publisher exposing these values in a strict manner, so they could be ingested and then injected during deployment. This approach is known as the legacy method. Overtime, many complications arose, as not all publishers charts complied with the strict definition of registryUrl and imagePullSecrets required by AOSM.
16
+
* Some charts hide registryUrl and/or imagePullSecrets behind conditionals, or other values restrictions, which were not always met.
17
+
* Some charts don't declare registryUrl and/or imagePullSecrets as the expected named string, instead as an array.
18
+
19
+
To reduce the strict compliance requirements on publishers for registryUrl and imagePullSecrets, AOSM later introduced two improved methods of handling these values. First injectArtifactStoreDetail and finally Cluster Registry. These two newer methods do not depend upon the registryUrl or imagePullSecrets appearing in the Helm package, at all. Instead these methods derive and inject these values on behalf of the network function.
20
+
21
+
### Method summary for registryUrl and imagePullSecrets
22
+
23
+
**Legacy.**
24
+
* Required publisher to parameterize registryUrl & imagePullSecrets correctly in helm values and templates for substitution.
25
+
* Images hosted in publisher Azure Container Registry (ACR).
26
+
27
+
**InjectArtifactStoreDetail.**
28
+
* Uses a webhook to inject registryUrl & imagePullSecrets directly into pod without any dependency on helm.
29
+
* Images still hosted in publisher ACR.
30
+
31
+
**Cluster Registry.**
32
+
* Same as InjectArtifactStoreDetail, except now the images are hosted in the local cluster registry.
33
+
34
+
> [!NOTE]
35
+
> In all three cases, AOSM is substituting AOSM derived secrets with whatever secrets a publisher exposes in templates. The only difference is Legacy and InjectArtifactStoreDetail, the secret is bound to publisher ACR, while in Cluster Registry, the secret is bound to cluster registry.
36
+
37
+
## Legacy requirements for registryUrl and imagePullSecrets
38
+
Azure Operator Service Manager (AOSM) uses the Network Function Manager (NFM) service to deploy Containerized Network Function (CNF). The NFM injects container registryUrl and imagePullSecrets dynamically into the helm values during Network Function (NF) deployment. The following helm deployment template shows an example of how a publisher should expose registryPath and imagePullSecrets for compatibility with AOSM legacy approach.
16
39
17
40
```json
18
41
apiVersion: apps/v1
@@ -41,7 +64,7 @@ spec:
41
64
- containerPort: 80
42
65
```
43
66
44
-
`values.schema.json`is a file that allows you to easily set value requirements and constraints in a single location for Helm charts. In this file, define registryPath and imagePullSecrets as required properties.
67
+
The following `values.schema.json`file shows an example of how a publisher can easily set registryPath and imagePullSecretsvalue requirements for compatibility with AOSM legacy approach.
45
68
46
69
```json
47
70
{
@@ -63,23 +86,14 @@ spec:
63
86
64
87
```
65
88
66
-
The NFDVersion request payload provides the following values in the registryValuesPaths:
89
+
The following `NFDVersion request payload` shows an example of how a publisher can provide the registryPath and imagePullSecretsvalue values for compatibility with AOSM legacy approach.
During an NF deployment, the Network Function Operator (NFO) sets the registryPath to the correct Azure Container Registry (ACR) server location. For example, the NFO runs the following equivalent command:
> The registryPath is set without any prefix such as https:// or oci://. If a prefix is required in the helm package, publishers need to define this in the package.
81
-
82
-
`values.yaml` is a file that contains the default values for a Helm chart. It's a YAML file that defines the default values for a chart. In the values.yaml file, two types of variables must be present; imagePullSecrets and registryPath. Each is described in the table.
96
+
The following `values.yaml` shows an example of how a publisher can provide the registryPath and imagePullSecretsvalue values for compatibility with AOSM legacy approach.
83
97
84
98
```json
85
99
global:
@@ -92,36 +106,13 @@ global:
92
106
| imagePullSecrets | String | imagePullSecrets are an array of secret names, which are used to pull container images |
93
107
| registryPath | String | registryPath is the `AzureContainerRegistry` server location |
94
108
95
-
imagePullSecrets and registryPath must be provided in the create NFDVersion onboarding step.
96
-
97
-
An NFO running in the cluster populates these two variables (imagePullSecrets and registryPath) during a helm release using the helm install –set command.
98
-
99
-
For more information, see: [pull-image-private-registry](https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry)
100
-
101
-
## Immutability restrictions
102
-
Immutability restrictions prevent changes to a file or directory. For example, an immutable file can't be changed or renamed, and a file that allows append operations can't be deleted, modified, or renamed.
103
-
104
-
### Avoid use of mutable tags
105
-
Users should avoid using mutable tags such as latest, dev or stable. For example, if deployment.yaml used 'latest' for the .Values.image.tag the deployment would fail.
> * The registryPath is set without any prefix such as `https://` or `oci://`. If needed, publisher must define a prefix in the helm package.
111
+
> * imagePullSecrets and registryPath must be provided in the create NFDVersion onboarding step.
110
112
111
113
### Avoid references to external registry
112
114
Users should avoid using references to an external registry. For example, if deployment.yaml uses a hardcoded registry path or external registry references it fails validation.
Splitting the Custom Resource Definitions (CRDs) declaration and usage plus using manual validations are recommended practices. Each is described in the following sections.
120
-
121
-
### Split CRD declaration and usage
122
-
We recommend splitting the declaration and usage of CRDs into separate helm charts to support
123
-
updates. For detailed information see: [method-2-separate-charts](https://helm.sh/docs/chart_best_practices/custom_resource_definitions/#method-2-separate-charts)
124
-
125
116
### Manual validations
126
117
Review the images and container specs created to ensure the images have prefix of registryURL and the imagePullSecrets are populated with secretName.
Each helm chart should contain static image repository and tags. Users should set the image repository and tag to static values. The static values can be set by:
140
-
-By hard-coding them in the image line or,
141
-
- Setting the Values in values.yaml and not exposing these values in the Network Function Design Version (NFDV).
131
+
Each helm chart should contain static image repository and tags. The static values are set as follows:
132
+
-Setting them in the image line or,
133
+
- Setting them in values.yaml and not exposing these values in the Network Function Design Version (NFDV).
142
134
143
135
A Network Function Design Version (NFDV) should map to a static set of helm charts and images. The charts and images are only updated by publishing a new Network Function Design Version (NFDV).
## injectArtifactStoreDetails requirements for registryUrl and imagePullSecrets
157
+
In some cases, third-party helm charts may not be fully compliant with AOSM requirements for registryURL. In this case, the injectArtifactStoreDetails feature can be used to avoid making changes to helm packages. To use injectArtifactStoreDetails, set the installOptions parameter in the NF resource roleOverrides section to true, then in the helm chart package, use whatever registryURL value is needed to keep the registry URL valid. See following example of injectArtifactStoreDetails parameter enabled.
Immutability restrictions prevent changes to a file or directory. For example, an immutable file can't be changed or renamed. Users should avoid using mutable tags such as latest, dev, or stable. For example, if deployment.yaml used 'latest' for the .Values.image.tag the deployment would fail.
We recommend splitting the declaration and usage of customer resource definitions (CRD) into separate helm charts to support updates. For detailed information see: [method-2-separate-charts](https://helm.sh/docs/chart_best_practices/custom_resource_definitions/#method-2-separate-charts)
0 commit comments