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/helm-requirements.md
+70-26Lines changed: 70 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,18 +1,43 @@
1
1
---
2
2
title: About 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 lifecyce action. For most effecient integration with Azure Operator Service Manager (AOSM), publisher 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
+
## Critical Considerations for registryUrl and imagePullSecrets
15
+
Every Helm chart generally requires a declared registryUrl and imagePullSecrets. It's recommended that the pubisher define these two parameters consistantly as variables in the values.yaml. At first, AOSM depended upon the publisher exposing these as values in a very 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 don't expose registryUrl and/or imagePullSecrets correctly, hiding them behind conditionals, or other values restrictions, which were not always met.
17
+
* Some charts don't expose 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 Reigstry. These two methods do not depend upone the registryUrl or imagePullSecrets appearing in the Helm package, instead these values are derived and injected by AOSM on behalf of the network function.
20
+
21
+
### Summary of approach options for registryUrl and imagePullSecrets
22
+
**Legacy.**
23
+
* Required publisher to parameterize registryUrl & imagePullSecrets correctly in helm values and templates for substitution.
24
+
* Images hosted in publisher ACR.
25
+
26
+
**InjectArtifactStoreDetail.**
27
+
* Uses a webhook to inject registryUrl & imagePullSecrets directly into pod w/o helm dependency.
28
+
* Images hosted in publisher ACR.
29
+
30
+
**Cluster Registry.**
31
+
* Same as InjectArtifactStoreDetail except now the images are now hosted in a local cluster registry.
32
+
33
+
> [!NOTE]
34
+
> In all three cases, AOSM is substituting AOSM derived secrets with whatever secrets a publisher may have had in templates. The only difference is Legeacy and InjectArtifactStoreDetail, the secret is bound to publisher ACR, while in Cluster Registry, the secret is bound to cluster registry.
35
+
36
+
### Legacy approach for registryUrl and imagePullSecrets
37
+
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 registryUrl and imagePullSecrets dynamically into the helm values during Network Function (NF) deployment.
38
+
39
+
#### How to enable
40
+
The following helm deployment template shows an example of how a publisher should expose registryPath and imagePullSecrets for compatibility with AOSM legacy approach.
16
41
17
42
```json
18
43
apiVersion: apps/v1
@@ -41,7 +66,7 @@ spec:
41
66
- containerPort: 80
42
67
```
43
68
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.
69
+
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
70
46
71
```json
47
72
{
@@ -63,23 +88,13 @@ spec:
63
88
64
89
```
65
90
66
-
The NFDVersion request payload provides the following values in the registryValuesPaths:
91
+
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.
97
+
The following `values.yaml` shows an example of how a publisher can provide the registryPath and imagePullSecretsvalue values for compatibility with AOSM legacy approach. This filecontains the default values for a Helm chart. TWo types of variables must be present; imagePullSecrets and registryPath.
83
98
84
99
```json
85
100
global:
@@ -92,11 +107,40 @@ global:
92
107
| imagePullSecrets | String | imagePullSecrets are an array of secret names, which are used to pull container images |
93
108
| registryPath | String | registryPath is the `AzureContainerRegistry` server location |
94
109
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.
110
+
> [!NOTE]
111
+
> * 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.
112
+
> * imagePullSecrets and registryPath must be provided in the create NFDVersion onboarding step.
113
+
114
+
### injectArtifactStoreDetails approach for registryUrl and imagePullSecrets
115
+
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.
116
+
117
+
#### How to enable
118
+
To use injectArtifactStoreDetails, set the installOptions parameter in the NF resource roleOverrides section to true, then use whatever registryURL value is needed to keep the registry URL valid. See following example of injectArtifactStoreDetails parameter enabled.
For more information, see: [pull-image-private-registry](https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry)
142
+
### Cluster Registry approach for registryUrl and imagePullSecrets
143
+
TBD
100
144
101
145
## Immutability restrictions
102
146
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.
@@ -115,7 +159,7 @@ Users should avoid using references to an external registry. For example, if dep
Splitting the Custom Resource Definitions (CRDs) declaration and usage plus using manual validations are recommended practices. Each is described in the following sections.
0 commit comments