-
Notifications
You must be signed in to change notification settings - Fork 15
Added docs for flavour specific node group overrides + PVC example #218
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
wtripp180901
wants to merge
1
commit into
devel
Choose a base branch
from
docs/flavour-specific-overrides
base: devel
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -257,3 +257,108 @@ capi_cluster_worker_failure_domain: az1 | |
azimuth_capi_operator_capi_helm_control_plane_failure_domains: [az1, az2] | ||
azimuth_capi_operator_capi_helm_worker_failure_domain: az1 | ||
``` | ||
|
||
## Flavour-specific node group overrides | ||
|
||
There may be situations where node groups with certain flavours require different config | ||
options to the `nodeGroupDefaults` configured for the cluster e.g performance tuning options | ||
which should only be applied to flavours with GPUs. This can be done by overriding | ||
`azimuth_capi_operator_release_overrides.config.capiHelm.flavorSpecificNodeGroupOverrides`, which | ||
is a dictionary with [fnmatch](https://docs.python.org/3/library/fnmatch.html) patterns for flavours | ||
as keys and CAPI node group config objects as values. For example, to apply CPU pinning to any | ||
flavour that has a name ending in `.gpu`, you would set: | ||
|
||
```yaml title="environments/my-site/inventory/group_vars/all/variables.yml" | ||
azimuth_capi_operator_release_overrides: | ||
config: | ||
capiHelm: | ||
flavorSpecificNodeGroupOverrides: | ||
'*.gpu': | ||
kubeadmConfigSpec: | ||
files: | ||
- path: /etc/kubernetes/patches/kubeletconfiguration0+strategic.json | ||
owner: "root:root" | ||
permissions: "0644" | ||
content: | | ||
{ | ||
"apiVersion": "kubelet.config.k8s.io/v1beta1", | ||
"kind": "KubeletConfiguration", | ||
"cpuManagerPolicy": "static" | ||
} | ||
joinConfiguration: | ||
patches: | ||
directory: /etc/kubernetes/patches | ||
``` | ||
|
||
### Example flavour-specific config for Intel PVC flavours | ||
|
||
Below is an example config for flavours with Intel PVC nodes (here identified by the `.pvc.` string), | ||
including Kubernetes performance tuning options, a KubeADM pre script for installing PVC drivers and | ||
taints compatible with the ExtendedResourceToleration admission controller to ensure that only workloads | ||
making resource requests for GPUs are scheduled onto the nodes: | ||
|
||
```yaml title="environments/my-site/inventory/group_vars/all/variables.yml" | ||
azimuth_capi_operator_release_overrides: | ||
config: | ||
capiHelm: | ||
flavorSpecificNodeGroupOverrides: | ||
'*.pvc.*': | ||
kubeadmConfigSpec: | ||
preKubeadmCommands: | ||
- | | ||
# Adapted from https://dgpu-docs.intel.com/driver/installation.html#ubuntu | ||
sudo apt update | ||
sudo apt install -y gpg-agent wget | ||
. /etc/os-release | ||
if [[ ! " jammy " =~ " ${VERSION_CODENAME} " ]]; then | ||
echo "Ubuntu version ${VERSION_CODENAME} not supported" | ||
else | ||
wget -qO - https://repositories.intel.com/gpu/intel-graphics.key | \ | ||
sudo gpg --yes --dearmor --output /usr/share/keyrings/intel-graphics.gpg | ||
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/intel-graphics.gpg] https://repositories.intel.com/gpu/ubuntu ${VERSION_CODENAME}/lts/2350 unified" | \ | ||
sudo tee /etc/apt/sources.list.d/intel-gpu-${VERSION_CODENAME}.list | ||
sudo apt update | ||
fi | ||
sudo apt install -y \ | ||
linux-headers-$(uname -r) \ | ||
linux-modules-extra-$(uname -r) \ | ||
flex bison \ | ||
intel-fw-gpu intel-i915-dkms xpu-smi | ||
# Avoids reboot | ||
modprobe i915 | ||
files: | ||
- path: /etc/kubernetes/patches/kubeletconfiguration0+strategic.json | ||
owner: "root:root" | ||
permissions: "0644" | ||
content: | | ||
{ | ||
"apiVersion": "kubelet.config.k8s.io/v1beta1", | ||
"kind": "KubeletConfiguration", | ||
"reservedSystemCPUs": "0-3", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. still don't know a sensible way to set this |
||
"cpuManagerPolicy": "static", | ||
"cpuManagerPolicyOptions": | ||
{ | ||
"full-pcpus-only": "true", | ||
}, | ||
"topologyManagerPolicy": "restricted", | ||
"memoryManagerPolicy": "Static", | ||
"reservedMemory": [ | ||
{ | ||
"numaNode": 0, | ||
"limits": { | ||
"memory": "1Gi", | ||
} | ||
} | ||
], | ||
"evictionHard": { | ||
"memory.available": "1Gi", | ||
}, | ||
} | ||
joinConfiguration: | ||
patches: | ||
directory: /etc/kubernetes/patches | ||
nodeRegistration: | ||
taints: | ||
- effect: NoSchedule | ||
key: gpu.intel.com/i915 | ||
``` |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.