Skip to content

Commit ebbc9e1

Browse files
authored
Improve documentation (#4202)
- Add AKS installation best practices, fixes #3828. - Add problem diagnostics for Argo Helm installation issues, fixes #4184. - Add FAQ entry around data output from one resource being input to the next.
1 parent aa86061 commit ebbc9e1

File tree

5 files changed

+89
-1
lines changed

5 files changed

+89
-1
lines changed

docs/hugo/content/_index.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,11 @@ recommended on AKS Free-tier clusters.
105105
See [CRD management](https://azure.github.io/azure-service-operator/guide/crd-management/) for more details.
106106
{{% /alert %}}
107107

108-
Alternatively you can install from the [release YAML directly](https://azure.github.io/azure-service-operator/guide/installing-from-yaml/).
108+
{{% alert title="Note" %}}
109+
When installing ASO in an AKS cluster, see [AKS Best Practices]({{< relref "best-practices#aks-best-practices" >}}).
110+
{{% /alert %}}
111+
112+
Alternatively you can install from the [release YAML directly](https://azure.github.io/azure-service-operator/guide/installing-from-yaml/).
109113

110114
#### Create a Managed Identity or Service Principal
111115

docs/hugo/content/guide/best-practices/_index.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,27 @@ has an `aso-credential` with permissions to manage the environment in question.
5454
A variant on this is **namespace per developer**, where each developer gets their own `dev-alice` or `dev-bob` namespace,
5555
rather than the whole team sharing a single `dev` namespace. Each `dev` namespace can point to a separate dev
5656
subscription or share the same dev subscription.
57+
58+
## AKS Best Practices
59+
60+
### CRDPattern
61+
62+
As described in the [CRD Management]({{< relref "crd-management" >}}) section, avoid installing a large number of CRDs
63+
into a Free tier AKS cluster.
64+
65+
### Affinity
66+
67+
If ASO is critical to your cluster/service operation, consider forcing the ASO pods to the `System` node pool which can
68+
often be less CPU/memory loaded than the `User` pools. This can be done with the following modification to the Helm
69+
`values.yaml` prior to installation:
70+
```yaml
71+
affinity:
72+
nodeAffinity:
73+
requiredDuringSchedulingIgnoredDuringExecution:
74+
nodeSelectorTerms:
75+
- matchExpressions:
76+
- key: kubernetes.azure.com/mode
77+
operator: In
78+
values:
79+
- system
80+
```

docs/hugo/content/guide/diagnosing-problems.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,40 @@ Events:
2626
...
2727
```
2828

29+
### Helm installation via Argo missing ClusterRole and other resources
30+
31+
See reference issue [#4184](https://github.com/Azure/azure-service-operator/issues/4184).
32+
33+
When using Argo to install the ASO Helm chart, make sure to specify the `raw` GitHub URL to the chart, rather than
34+
the URL to the ASO git repo. The chart `.tgz` file contains what you need to install ASO, not everything is in the
35+
[v2/charts/azure-service-operator](https://github.com/Azure/azure-service-operator/tree/main/v2/charts/azure-service-operator)
36+
folder. In particular, some files are autogenerated as part of the build and aren't checked in, attempting to install
37+
from the checked in templates will miss these autogenerated files.
38+
39+
Correct:
40+
41+
```
42+
apiVersion: argoproj.io/v1alpha1
43+
kind: Application
44+
spec:
45+
source:
46+
repoURL: https://raw.githubusercontent.com/Azure/azure-service-operator/main/v2/charts
47+
targetRevision: v2.8.0
48+
chart: azure-service-operator
49+
```
50+
51+
Incorrect:
52+
53+
```
54+
apiVersion: argoproj.io/v1alpha1
55+
kind: Application
56+
spec:
57+
source:
58+
repoURL: https://github.com/Azure/azure-service-operator.git
59+
targetRevision: v2.8.0
60+
path: v2/charts/azure-service-operator
61+
```
62+
2963
## Problems with resources
3064

3165
### Resource with no Ready condition set

docs/hugo/content/guide/frequently-asked-questions.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,31 @@ env:
172172
name: identity-details
173173
```
174174
175+
### How can I feed the output of one resource into a parameter for the next?
176+
177+
The answer changes a bit depending on the nature of the parameter.
178+
179+
For resource ownership: Set the `spec.owner.name` field of the dependent resource to be "owned by" the owning resource.
180+
This will inform ASO that the owning resource needs to be deployed first.
181+
182+
For cross-resource-relationships: A resource referring to another resource will have a field like
183+
[diskEncryptionSetReference](https://azure.github.io/azure-service-operator/reference/containerservice/v1api20231001/#containerservice.azure.com/v1api20231001.ManagedCluster_Spec).
184+
Set the reference to point to the resource you want:
185+
```yaml
186+
diskEncryptionSetReference:
187+
group: compute.azure.com
188+
kind: DiskEncryptionSet
189+
name: my-disk-encryption-set
190+
```
191+
192+
For other fields: Not every field can be exported/imported. ASO does not have general purpose DAG support, nor does it have a
193+
general-purpose templating language to describe such relationships. Instead, important properties can be imported/exported
194+
from `ConfigMaps` or `Secrets`. See [setting UMI details on pods](#when-using-workload-identity-how-can-i-easily-inject-the-aso-created-user-managed-identity-details-onto-the-service-account)
195+
above for one example of this. Another example can be found in
196+
[the authorization samples](https://github.com/Azure/azure-service-operator/blob/fe248787385af1b7b813e7bc2c8dbc595b8b4006/v2/samples/authorization/v1api20220401/v1api20220401_roleassignment.yaml#L12-L15),
197+
which reads the `principalId` from the `ConfigMap` written by
198+
[the associated identity](https://github.com/Azure/azure-service-operator/blob/main/v2/samples/authorization/v1api20220401/refs/v1api20181130_userassignedidentity.yaml).
199+
175200
### What should I know about RoleAssignment naming in ASO?
176201

177202
The `RoleAssignment` resource is required to have a name in Azure which is a UUID. Since it's difficult to make a

v2/charts/azure-service-operator/values.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@ tolerations: []
164164
# Node affinity functions like the nodeSelector field but is more expressive and allows you to specify soft rules.
165165
# Inter-pod affinity/anti-affinity allows you to constrain Pods against labels on other Pods.
166166
# For more information, see https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity
167+
# For specific affinity best practices on AKS clusters, see https://azure.github.io/azure-service-operator/guide/best-practices/#affinity
167168
affinity: {}
168169

169170
# MaxConcurrentReconciles is the number of threads/goroutines dedicated to reconciling each resource type.

0 commit comments

Comments
 (0)