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
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
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.
15
+
Every Helm chart generally requires a registryUrl and imagePullSecrets. Most commonly, a publisher exposes these parameters in the values.yaml. At first, AOSM depended upon the publisher exposing these values in a strict manner, so they could be substituted for the proper Azure values during deployment. Overtime, not all publishers could easily comply with the strict handling of these values required by AOSM.
16
16
* Some charts hide registryUrl and/or imagePullSecrets behind conditionals, or other values restrictions, which were not always met.
17
17
* Some charts don't declare registryUrl and/or imagePullSecrets as the expected named string, instead as an array.
18
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.
19
+
To reduce the strict compliance requirements on publishers, AOSM later introduced two improved methods of handling these values. First injectArtifactStoreDetail and finally Cluster Registry. These two newer methods do not depend upon valid registryUrl or imagePullSecrets appearing in the Helm package. Instead, these methods inject these values directly into pod operations, on behalf of the network function.
20
20
21
21
### Method summary for registryUrl and imagePullSecrets
22
+
All three methods are supported and described in this article. A publisher should choose the best option for their Network Function and use-case.
22
23
23
24
**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).
25
+
*Requires publisher to compliantly parameterize registryUrl & imagePullSecrets in helm values and deployment templates for substitution.
26
+
* Images are hosted in the publisher Azure Container Registry (ACR).
26
27
27
28
**InjectArtifactStoreDetail.**
28
-
* Uses a webhook to inject registryUrl & imagePullSecrets directly into pod without any dependency on helm.
29
-
* Images still hosted in publisher ACR.
29
+
* Uses a webhook to inject registryUrl & imagePullSecrets directly into pod operations, with minimal dependencies on helm.
30
+
* Images are still hosted in the publisher ACR.
30
31
31
32
**Cluster Registry.**
32
-
* Same as InjectArtifactStoreDetail, except now the images are hosted in the local cluster registry.
33
+
* Uses a webhook to inject registryUrl & imagePullSecrets directly into pod operations, with no dependency on helm.
34
+
* Images are hosted in the local NFO extension cluster registry.
33
35
34
36
> [!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.
37
+
> In all three cases, AOSM is substituting AOSM values for whatever values a publisher exposes in templates. The only difference is method for substitution.
36
38
37
39
## 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.
40
+
Azure Operator Service Manager (AOSM) uses the Network Function Manager (NFM) service to deploy Containerized Network Functions (CNFs). With the legacy method, NFM substitutes the AOSM container registryUrl and imagePullSecrets values into the helm operation during Network Function (NF) deployment.
41
+
42
+
### Using legacy method
43
+
The following helm deployment template shows an example of how a publisher should expose registryPath and imagePullSecrets for compatibility with AOSM legacy approach.
39
44
40
45
```json
41
46
apiVersion: apps/v1
@@ -101,19 +106,20 @@ global:
101
106
registryPath: “”
102
107
```
103
108
104
-
| Name | Type | Description |
105
-
| :--- | :----: | :--- |
106
-
| imagePullSecrets | String | imagePullSecrets are an array of secret names, which are used to pull container images |
107
-
| registryPath | String | registryPath is the `AzureContainerRegistry` server location |
108
-
109
109
> [!NOTE]
110
110
> * The registryPath is set without any prefix such as `https://` or `oci://`. If needed, publisher must define a prefix in the helm package.
111
111
> * imagePullSecrets and registryPath must be provided in the create NFDVersion onboarding step.
112
112
113
-
### Avoid references to external registry
113
+
### Other considerations with Legacy method
114
+
Publisher should additional consider the following recommendations when using the legacy method:
115
+
* Avoid references to external registry
116
+
* Performa manual validations
117
+
* Ensure static image repository and tags
118
+
119
+
#### Avoid references to external registry
114
120
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.
115
121
116
-
###Manual validations
122
+
#### Perform manual validations
117
123
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. The static values are set as follows:
132
138
- Setting them in the image line or,
133
139
- Setting them in values.yaml and not exposing these values in the Network Function Design Version (NFDV).
@@ -154,7 +160,10 @@ image:
154
160
```
155
161
156
162
## 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.
163
+
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 compliance changes to helm packages. With injectArtifactStoreDetails enabled, a webhook method is used to inject the proper registryUrl and imagePullSecrets dynamically during the pod operations. This overrides the values which are configured in the helm package.
164
+
165
+
### Using injectArtifactStoreDetails method
166
+
To enable injectArtifactStoreDetails, set the installOptions parameter in the NF resource roleOverrides section to true, as shown in the following example.
> The helm chart package must still expose properly formatted registryURL and imagePullSecrets values.
192
+
193
+
## Cluster registry requirements for registryUrl and imagePullSecrets
194
+
For information on using cluster registry, please see the [concept documentation](get-started-with-cluster-registry.md).
195
+
181
196
## Chart immutability restrictions
182
197
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