Skip to content

Commit 14c41fa

Browse files
authored
Merge pull request #296463 from msftadam/patch-66
Update helm-requirements.md
2 parents 58817e6 + cea068e commit 14c41fa

File tree

1 file changed

+62
-42
lines changed

1 file changed

+62
-42
lines changed

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

Lines changed: 62 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -9,38 +9,34 @@ ms.service: azure-operator-service-manager
99
---
1010

1111
# 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.
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 actions. For most efficient integration with Azure Operator Service Manager (AOSM), publisher's should consider certain best-practices when developing Helm charts.
1313

14-
## Considerations for registryUrl and imagePullSecrets
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-
* 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.
14+
## Considerations for registryPath and imagePullSecrets
15+
Every Helm chart generally requires a registryPath and imagePullSecrets. Most commonly, a publisher exposes these parameters in the values.yaml. At first, AOSM depended upon the publisher managing these values in a strict manner (legacy approach), to be substituted for the proper Azure values during deployment. Overtime, it was found that not all publishers could easily comply with the strict management of these values. Some charts hide registryPath and/or imagePullSecrets behind conditionals, or other values restrictions, which were not always met. Some charts don't declare registryPath and/or imagePullSecrets as the expected named string, instead as an array. To reduce the strict compliance requirements on publishers, AOSM introduced two improved methods, injectArtifactStoreDetail and cluster registry. These newer methods do not depend upon the registryPath or imagePullSecrets which appear in the Helm package. Instead, these methods use a webhook to inject proper Azure values directly into pod operations.
1816

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.
17+
### Method summary for registryPath and imagePullSecrets
18+
All three methods are presently supported as described in this article. A publisher should choose the best option for their (network function) NF and use-case.
2019

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.
23-
24-
**Legacy.**
25-
* Requires publisher to compliantly parameterize registryUrl & imagePullSecrets in helm values and deployment templates for substitution.
20+
**Legacy**
21+
* Requires publisher to parameterize registryPath & imagePullSecrets in helm values and deployment templates for substitution.
2622
* Images are hosted in the publisher Azure Container Registry (ACR).
2723

28-
**InjectArtifactStoreDetail.**
29-
* Uses a webhook to inject registryUrl & imagePullSecrets directly into pod operations, with minimal dependencies on helm.
24+
**InjectArtifactStoreDetail**
25+
* Uses a webhook to inject registryPath & imagePullSecrets directly into pod operations, with minimal dependencies on helm.
3026
* Images are still hosted in the publisher ACR.
3127

32-
**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.
28+
**Cluster Registry**
29+
* Uses a webhook to inject registryPath & imagePullSecrets directly into pod operations, with no dependency on helm.
30+
* Images are hosted in the local network function operator (NFO) extension cluster registry.
3531

3632
> [!NOTE]
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.
33+
> In all three cases, AOSM is substituting Azure values for whatever values a publisher exposes in templates. The only difference is method of substitution.
3834
39-
## Legacy requirements for registryUrl and imagePullSecrets
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.
35+
## Legacy requirements for registryPath and imagePullSecrets
36+
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 registryPath and imagePullSecrets values into the helm operation during Network Function (NF) deployment.
4137

4238
### 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+
The following `helm deployment` template shows an example of how a publisher should expose registryPath and imagePullSecrets.
4440

4541
```json
4642
apiVersion: apps/v1
@@ -69,7 +65,15 @@ spec:
6965
- containerPort: 80
7066
```
7167

72-
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.
68+
The following `values.yaml` template shows an example of how a publisher can provide the registryPath and imagePullSecretsvalue values.
69+
70+
```json
71+
global:
72+
imagePullSecrets: []
73+
registryPath: “”
74+
```
75+
76+
The following `values.schema.json` file shows an example of how a publisher can easily define registryPath and imagePullSecretsvalue.
7377

7478
```json
7579
{
@@ -91,46 +95,38 @@ The following `values.schema.json` file shows an example of how a publisher can
9195

9296
```
9397

94-
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.
98+
The following `NFDV request payload` shows an example of how a publisher can provide the registryPath and imagePullSecretsvalue values at deployment.
9599

96100
```json
97101
"registryValuesPaths": [ "global.registryPath" ],
98102
"imagePullSecretsValuesPaths": [ "global.imagePullSecrets" ],
99103
```
100104

101-
The following `values.yaml` shows an example of how a publisher can provide the registryPath and imagePullSecretsvalue values for compatibility with AOSM legacy approach.
102-
103-
```json
104-
global:
105-
imagePullSecrets: []
106-
registryPath: “”
107-
```
108-
109105
> [!NOTE]
110106
> * The registryPath is set without any prefix such as `https://` or `oci://`. If needed, publisher must define a prefix in the helm package.
111107
> * imagePullSecrets and registryPath must be provided in the create NFDVersion onboarding step.
112108
113109
### Other considerations with Legacy method
114-
Publisher should additional consider the following recommendations when using the legacy method:
110+
Publisher should consider the following recommendations when using the legacy method:
115111
* Avoid references to external registry
116-
* Performa manual validations
112+
* Perform manual validations
117113
* Ensure static image repository and tags
118114

119115
#### Avoid references to external registry
120116
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.
121117

122118
#### Perform manual validations
123-
Review the images and container specs created to ensure the images have prefix of registryURL and the imagePullSecrets are populated with secretName.
119+
Review the images and container specs created to ensure the images have prefix of registryPath and the imagePullSecrets are populated with secretName.
124120

125121
```shell
126-
helm template --set "global.imagePullSecrets[0].name=<secretName>" --set "global.registry.url=<registryURL>" <release-name> <chart-name> --dry-run
122+
helm template --set "global.imagePullSecrets[0].name=<secretName>" --set "global.registry.url=<registryPath>" <release-name> <chart-name> --dry-run
127123
```
128124

129125
OR
130126

131127
```shell
132-
helm install --set "global.imagePullSecrets[0].name=<secretName>" --set "global.registry.url=<registryURL>" <release-name> <chart-name> --dry-run
133-
kubectl create secret <secretName> regcred --docker-server=<registryURL> --dockerusername=<regusername> --docker-password=<regpassword>
128+
helm install --set "global.imagePullSecrets[0].name=<secretName>" --set "global.registry.url=<registryPath>" <release-name> <chart-name> --dry-run
129+
kubectl create secret <secretName> regcred --docker-server=<registryPath> --dockerusername=<regusername> --docker-password=<regpassword>
134130
```
135131

136132
#### Ensure static image repository and tags
@@ -156,11 +152,22 @@ image:
156152
```
157153

158154
```json
159-
image: http://myURL/{{ .Values.image.repository }}:{{ .Values.image.tag}}
155+
image: http://myUrl/{{ .Values.image.repository }}:{{ .Values.image.tag}}
160156
```
161157

162-
## injectArtifactStoreDetails requirements for registryUrl and imagePullSecrets
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.
158+
## injectArtifactStoreDetails requirements for registryPath and imagePullSecrets
159+
In some cases, third-party helm charts may not be fully compliant with AOSM requirements for registryPath. 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 registryPath and imagePullSecrets dynamically during the pod operations. This overrides the values which are configured in the helm package. A publisher still must use legal dummy values where registryPath and imagePullSecrets are referenced, usually in the global section of values.yaml.
160+
161+
The following `values.yaml` shows an example of how a publisher can provide the registryPath and imagePullSecretsvalue values for compatibility with injectArtifactStoreDetails approach.
162+
163+
```json
164+
global:
165+
registryPath: “”
166+
imagePullSecrets: []
167+
```
168+
169+
> [!NOTE]
170+
> If registryPath is left blank in underlying helm package, site network service (SNS) deployment fails while trying to download image.
164171
165172
### Using injectArtifactStoreDetails method
166173
To enable injectArtifactStoreDetails, set the installOptions parameter in the NF resource roleOverrides section to true, as shown in the following example.
@@ -188,10 +195,23 @@ resource networkFunction 'Microsoft.HybridNetwork/networkFunctions@2023-09-01' =
188195
```
189196

190197
> [!NOTE]
191-
> The helm chart package must still expose properly formatted registryURL and imagePullSecrets values.
198+
> The helm chart package must still expose properly formatted registryPath and imagePullSecrets values.
199+
200+
## Cluster registry requirements for registryPath and imagePullSecrets
201+
With cluster registry, images are copied from the publisher ACR to a local docker repository on the nexus AKS (NAKS) cluster. When enabled, a webhook method is used to inject the proper registryPath and imagePullSecrets dynamically during the pod operations. This overrides the values which are configured in the helm package. A publisher still must use legal dummy values where registryPath and imagePullSecrets are referenced, usually in global section of values.yaml.
202+
203+
The following `values.yaml` shows an example of how a publisher can provide the registryPath and imagePullSecretsvalue values for compatibility with cluster registry approach.
204+
205+
```json
206+
global:
207+
registryPath: “”
208+
imagePullSecrets: []
209+
```
210+
211+
> [!NOTE]
212+
> If registryPath is left blank in underlying helm package, SNS deployment fails while trying to download image.
192213
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).
214+
For information on using cluster registry, see the [concept documentation](get-started-with-cluster-registry.md).
195215

196216
## Chart immutability restrictions
197217
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.

0 commit comments

Comments
 (0)