Skip to content

Commit 449fc5c

Browse files
authored
Create install-network-function-operator.md
new article
1 parent 2001332 commit 449fc5c

File tree

1 file changed

+199
-0
lines changed

1 file changed

+199
-0
lines changed
Lines changed: 199 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,199 @@
1+
---
2+
title: Manage network function operation extension
3+
description: Safely install or update the Azure Operator Service Manager network function operator extension.
4+
author: msftadam
5+
ms.author: adamdor
6+
ms.date: 09/16/2024
7+
ms.topic: how-to
8+
ms.service: azure-operator-service-manager
9+
---
10+
11+
# Manage network function operator extension
12+
13+
## Overview
14+
This article guides user installation of the Azure Operator Service Manager (AOSM) network function operator (NFO) extension. This kubernetes cluster extension is used as part of the AOSM service offering to manage container based workloads hosted by the Azure Operator Nexus platform.
15+
16+
## Create or update network function extension
17+
18+
### Command
19+
```bash
20+
az k8s-extension create --cluster-name
21+
--cluster-type {connectedClusters}
22+
--extension-type {Microsoft.Azure.HybridNetwork}
23+
--name
24+
--resource-group
25+
--scope {cluster}
26+
--release-namespace {azurehybridnetwork}
27+
--release-train {preview, stable}
28+
--config Microsoft.CustomLocation.ServiceAccount=azurehybridnetwork-networkfunction-operator
29+
[--auto-upgrade {false, true}]
30+
[--config global.networkfunctionextension.enableClusterRegistry={false, true}]
31+
[--config global.networkfunctionextension.enableLocalRegistry={false, true}]
32+
[--config global.networkfunctionextension.enableEarlyLoading={false,true}]
33+
[--config global.networkfunctionextension.clusterRegistry.highAvailability.enabled={true, false}]
34+
[--config global.networkfunctionextension.clusterRegistry.autoScaling.enabled={true, false}]
35+
[--config global.networkfunctionextension.webhook.highAvailability.enabled={true, false}]
36+
[--config global.networkfunctionextension.webhook.autoScaling.enabled={true, false}]
37+
[--config global.networkfunctionextension.clusterRegistry.storageClassName=]
38+
[--config global.networkfunctionextension.clusterRegistry.storageSize=]
39+
[--config global.networkfunctionextension.webhook.pod.mutation.matchConditionExpression=]
40+
[--version]
41+
```
42+
43+
### Required Parameters
44+
`--cluster-name -c`
45+
* Name of the Kubernetes cluster.
46+
47+
`--cluster-type -t`
48+
* Specify Arc clusters or AKS managed clusters or Arc appliances or provisionedClusters.
49+
* Accepted values: connectedClusters.
50+
51+
`--extension-type`
52+
* Name of the extension type.
53+
* Accepted values: Microsoft.Azure.HybridNetwork.
54+
55+
`--name -n`
56+
* Name of the extension instance.
57+
58+
`--resource-group -g`
59+
* Name of resource group. You can configure the default group using az configure --defaults group=<name>.
60+
61+
`--config Microsoft.CustomLocation.ServiceAccount=azurehybridnetwork-networkfunction-operator`
62+
* This configuration must be provided.
63+
64+
### Optional Parameters
65+
`--auto-upgrade`
66+
* Automatically upgrade minor version of the extension instance.
67+
* Accepted values: false, true.
68+
* Default value: true.
69+
70+
`--release-train`
71+
* Specify the release train for the extension type.
72+
* Accepted values: preview, stable.
73+
* Default value: stable.
74+
75+
`--version`
76+
* Specify the version to install for the extension instance if --auto-upgrade-minor-version is not enabled.
77+
* Availabe version can be found on [Network Function Extension Release notes]
78+
79+
### Optional feature specific configurations
80+
81+
#### Pod Mutating Webhook
82+
83+
`--config global.networkfunctionextension.webhook.pod.mutation.matchConditionExpression=`
84+
* This configuration is an optional parameter. It comes into play when CNF is getting installed and as a part of its installation corresponding pods are spin up in the CNF's release namespace.
85+
* This configuration configures more granular control on top of rules and namespaceSelectors defined in [Pod Mutating Webhook Configuration](https://dev.azure.com/msazuredev/AzureForOperatorsIndustry/_git/aosm-networkfunctionextension?version=GBmain&path=/src/NetworkFunctionExtension/config/default/networkfunction-operator/templates/webhook_pod/webhook_mutating_config.yaml).
86+
* Default value:
87+
```bash
88+
"((object.metadata.namespace != \"kube-system\") || (object.metadata.namespace == \"kube-system\" && has(object.metadata.labels) && (has(object.metadata.labels.app) && (object.metadata.labels.app == \"commissioning\") || (has(object.metadata.labels.name) && object.metadata.labels.name == \"cert-exporter\") || (has(object.metadata.labels.app) && object.metadata.labels.app == \"descheduler\"))))"
89+
```
90+
The above matchCondition implies that the pods getting admitted in kube-system namespace will be mutated only if they have atleast one of the following labels:
91+
- app == "commissioning"
92+
- name == "cert-exporter"
93+
- app == "descheduler"
94+
95+
else they will not be mutated and continue to be pulled from the original source as per the helm chart of CNF/Component/Application.
96+
* Accepted value:
97+
Any valid [CEL expressions](https://kubernetes.io/docs/reference/using-api/cel/)
98+
* To learn more about matchConditions [reference Kubernetes doc link](https://kubernetes.io/docs/reference/access-authn-authz/extensible-admission-controllers/#matching-requests-matchconditions).
99+
* This is configurable parameter that can be set or updated during NF Extension's installation or update.
100+
* Also, this condition comes into play only when the CNF/Component/Application is getting installed into the namespace as per the rules and namespaceSelectors defined in [Pod Mutating Webhook Configuration](https://dev.azure.com/msazuredev/AzureForOperatorsIndustry/_git/aosm-networkfunctionextension?version=GBmain&path=/src/NetworkFunctionExtension/config/default/networkfunction-operator/templates/webhook_pod/webhook_mutating_config.yaml). If there are more pods getting spin up in that namespace, this condition will still be applied to them.
101+
102+
#### Cluster registry
103+
104+
`--config global.networkfunctionextension.enableClusterRegistry=`
105+
* This configuration will provision a regsitry in the cluster to locally cache artifacts.
106+
* By default this will enable lazy loading mode unless global.networkfunctionextension.enableEarlyLoading=true.
107+
* Accepted values: false, true.
108+
* Default value: false.
109+
110+
`--config global.networkfunctionextension.clusterRegistry.highAvailability.enabled=`
111+
* This configuration will provision the cluster regsitry in high availability mode if cluster registry is enabled.
112+
* By default is true and uses NAKS nexus-shared volume on AKS recommendation is to set this as false.
113+
* Accepted values: true, false.
114+
* Default value: true.
115+
116+
`--config global.networkfunctionextension.clusterRegistry.autoScaling.enabled=`
117+
* This configuration will provision the cluster registry pods with horizontal auto scaling.
118+
* Accepted values: true, false.
119+
* Default value: true.
120+
121+
`--config global.networkfunctionextension.webhook.highAvailability.enabled=`
122+
* This configuration will provision multiple replicas of webhook for high availability.
123+
* Accepted values: true, false.
124+
* Default value: true.
125+
126+
`--config global.networkfunctionextension.webhook.autoScaling.enabled=`
127+
* This configuration will provision the webhook pods with horizontal auto scaling.
128+
* Accepted values: true, false.
129+
* Default value: true.
130+
131+
`--config global.networkfunctionextension.enableEarlyLoading=`
132+
* This configuration will enable artifacts early loading into cluster regsitry before helm installation or upgrade.
133+
* This configuration can only be enabled when global.networkfunctionextension.enableClusterRegistry=true.
134+
* Accetped values: false, true.
135+
* Default value: false.
136+
137+
`--config global.networkfunctionextension.clusterRegistry.storageClassName=`
138+
* This configuration must be provided when global.networkfunctionextension.enableClusterRegistry=true.
139+
* NetworkFunctionExtension will provision a PVC to local cache artifacts from this storage class.
140+
* Platform specific values
141+
* AKS: managed-csi
142+
* NAKS(Default): nexus-shared
143+
* NAKS(Non-HA): nexus-volume
144+
* ASE: managed-premium
145+
* Default value: nexus-shared.
146+
147+
`--config global.networkfunctionextension.clusterRegistry.storageSize=`
148+
* This configuration must be provided when global.networkfunctionextension.enableClusterRegistry=true.
149+
* This configuration configures the size we reserve for cluster registry.
150+
* Recommend carefully choose a value that needed to cache artifacts.
151+
* Please notes to use unit as Gi and Ti for sizing. International system of unites: https://physics.nist.gov/cuu/Units/binary.html
152+
* Default value: 100Gi
153+
154+
#### Side loading
155+
156+
`--config global.networkfunctionextension.enableLocalRegistry=`
157+
* This configuration will allow artifacts to be delivered to edge via hardware drive.
158+
* It is only used for Tempnet with AP5GC.
159+
* Accepted values: false, true.
160+
* Default value: false.
161+
162+
### Recommended NFO config for AKS
163+
164+
The default NFO config is configured for HA on NAKS as none of the csi disk drives on AKS support ReadWriteX access mode, HA needs to be disabled on AKS.Use the following config options on AKS
165+
166+
` --config global.networkfunctionextension.clusterRegistry.highAvailability.enabled=false`
167+
` --config global.networkfunctionextension.webhook.highAvailability.enabled=false` (optional)
168+
` --config global.networkfunctionextension.clusterRegistry.storageClassName=managed-csi`
169+
170+
### Examples
171+
Create a network function extension with auto upgrade.
172+
```bash
173+
az k8s-extension create --resource-group myresourcegroup --cluster-name mycluster --name myextension --cluster-type connectedClusters --extension-type Microsoft.Azure.HybridNetwork --scope cluster --config Microsoft.CustomLocation.ServiceAccount=azurehybridnetwork-networkfunction-operator --release-namespace azurehybridnetwork
174+
```
175+
176+
Create a network function extension with a pined version.
177+
```bash
178+
az k8s-extension create --resource-group myresourcegroup --cluster-name mycluster --name myextension --cluster-type connectedClusters --extension-type Microsoft.Azure.HybridNetwork --auto-upgrade-minor-version false --scope cluster --config Microsoft.CustomLocation.ServiceAccount=azurehybridnetwork-networkfunction-operator --release-namespace azurehybridnetwork --version 1.0.2711-7
179+
```
180+
181+
Create a network function extension with cluster registry (default lazy loading mode) feature enabled on NAKS.
182+
```bash
183+
az k8s-extension create --resource-group myresourcegroup --cluster-name mycluster --name myextension --cluster-type connectedClusters --extension-type Microsoft.Azure.HybridNetwork --scope cluster --config Microsoft.CustomLocation.ServiceAccount=azurehybridnetwork-networkfunction-operator --release-namespace azurehybridnetwork --config global.networkfunctionextension.enableClusterRegistry=true --config global.networkfunctionextension.clusterRegistry.storageSize=100Gi
184+
```
185+
186+
Create a network function extension with cluster registry (default lazy loading mode) feature enabled on AKS.
187+
```bash
188+
az k8s-extension create --resource-group myresourcegroup --cluster-name mycluster --name myextension --cluster-type connectedClusters --extension-type Microsoft.Azure.HybridNetwork --scope cluster --config Microsoft.CustomLocation.ServiceAccount=azurehybridnetwork-networkfunction-operator --release-namespace azurehybridnetwork --config global.networkfunctionextension.enableClusterRegistry=true --config global.networkfunctionextension.clusterRegistry.highAvailability.enabled=false --config global.networkfunctionextension.clusterRegistry.storageClassName=managed-csi --config global.networkfunctionextension.clusterRegistry.storageSize=100Gi
189+
```
190+
191+
Create a network function extension with cluster registry (early loading) feature enabled.
192+
```bash
193+
az k8s-extension create --resource-group myresourcegroup --cluster-name mycluster --name myextension --cluster-type connectedClusters --extension-type Microsoft.Azure.HybridNetwork --scope cluster --config Microsoft.CustomLocation.ServiceAccount=azurehybridnetwork-networkfunction-operator --release-namespace azurehybridnetwork --config global.networkfunctionextension.enableClusterRegistry=true --config global.networkfunctionextension.enableEarlyLoading=true --config global.networkfunctionextension.clusterRegistry.storageClassName=managed-csi --config global.networkfunctionextension.clusterRegistry.storageSize=100Gi
194+
```
195+
196+
Create a network function extension with side loading feature enabled.
197+
```bash
198+
az k8s-extension create --resource-group myresourcegroup --cluster-name mycluster --name myextension --cluster-type connectedClusters --extension-type Microsoft.Azure.HybridNetwork --scope cluster --config Microsoft.CustomLocation.ServiceAccount=azurehybridnetwork-networkfunction-operator --release-namespace azurehybridnetwork --config global.networkfunctionextension.enableLocalRegistry=true
199+
```

0 commit comments

Comments
 (0)