Skip to content

Commit

Permalink
Merge pull request #4418 from piyush-jena/roll-fwd
Browse files Browse the repository at this point in the history
Add support for NVIDIA MIG
  • Loading branch information
piyush-jena authored Feb 27, 2025
2 parents cbf935a + e7f43c3 commit 18d04e5
Show file tree
Hide file tree
Showing 8 changed files with 114 additions and 43 deletions.
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
# v1.34.0 (2025-03-03)

## OS Changes

* Add support for NVIDIA Multi-Instance GPU (MIG) ([#4418])

## Build Changes
* Update bottlerocket-core-kit from 6.0.1 to 6.0.2 [CHANGELOG](/~https://github.com/bottlerocket-os/bottlerocket-core-kit/blob/develop/CHANGELOG.md#v602-2025-02-26) ([#4416])
* Update bottlerocket-kernel-kit from 1.1.2 to 1.2.0 [CHANGELOG](/~https://github.com/bottlerocket-os/bottlerocket-kernel-kit/blob/develop/CHANGELOG.md#v120-2024-02-26) ([#4416])

### Twoliter

* Update Twoliter to 0.7.3 ([#4416])

[#4416]: /~https://github.com/bottlerocket-os/bottlerocket/pull/4416
[#4418]: /~https://github.com/bottlerocket-os/bottlerocket/pull/4418

# v1.33.0 (2025-02-26)

## Release Highlights
Expand Down
5 changes: 4 additions & 1 deletion Release.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version = "1.33.0"
version = "1.34.0"

[migrations]
"(0.3.1, 0.3.2)" = ["migrate_v0.3.2_admin-container-v0-5-0.lz4"]
Expand Down Expand Up @@ -404,3 +404,6 @@ version = "1.33.0"
"migrate_v1.33.0_public-remove-source-control.lz4",
"migrate_v1.33.0_remove-metadata-and-weak-settings-migration.lz4",
]
"(1.33.0, 1.34.0)" = [
"migrate_v1.34.0_kubelet-device-plugins-mig-settings.lz4",
]
2 changes: 1 addition & 1 deletion Twoliter.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
schema-version = 1
release-version = "1.33.0"
release-version = "1.34.0"

[vendor.bottlerocket]
registry = "public.ecr.aws/bottlerocket"
Expand Down
77 changes: 42 additions & 35 deletions sources/Cargo.lock

Large diffs are not rendered by default.

13 changes: 7 additions & 6 deletions sources/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ members = [
"settings-migrations/v1.33.0/public-remove-source-admin",
"settings-migrations/v1.33.0/public-remove-source-control",
"settings-migrations/v1.33.0/remove-metadata-and-weak-settings-migration",
"settings-migrations/v1.34.0/kubelet-device-plugins-mig-settings",

"settings-plugins/aws-dev",
"settings-plugins/aws-ecs-1",
Expand Down Expand Up @@ -164,22 +165,22 @@ version = "0.1.0"

[workspace.dependencies.bottlerocket-modeled-types]
git = "/~https://github.com/bottlerocket-os/bottlerocket-settings-sdk"
tag = "bottlerocket-settings-models-v0.7.0"
version = "0.7.0"
tag = "bottlerocket-settings-models-v0.8.0"
version = "0.8.0"

[workspace.dependencies.bottlerocket-settings-models]
git = "/~https://github.com/bottlerocket-os/bottlerocket-settings-sdk"
tag = "bottlerocket-settings-models-v0.7.0"
version = "0.7.0"
tag = "bottlerocket-settings-models-v0.8.0"
version = "0.8.0"

[workspace.dependencies.bottlerocket-settings-plugin]
git = "/~https://github.com/bottlerocket-os/bottlerocket-settings-sdk"
tag = "bottlerocket-settings-models-v0.7.0"
tag = "bottlerocket-settings-models-v0.8.0"
version = "0.1.0"

[workspace.dependencies.settings-extension-oci-defaults]
git = "/~https://github.com/bottlerocket-os/bottlerocket-settings-sdk"
tag = "bottlerocket-settings-models-v0.7.0"
tag = "bottlerocket-settings-models-v0.8.0"
version = "0.1.0"

[profile.release]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[package]
name = "kubelet-device-plugins-mig-settings"
version = "0.1.0"
authors = ["Piyush Jena <jepiyush@amazon.com>"]
license = "Apache-2.0 OR MIT"
edition = "2021"
publish = false
# Don't rebuild crate just because of changes to README.
exclude = ["README.md"]


# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
migration-helpers.workspace = true
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
use migration_helpers::common_migrations::AddPrefixesMigration;
use migration_helpers::{migrate, Result};
use std::process;

/// We added new settings for configuring the NVIDIA k8s device plugin.
fn run() -> Result<()> {
migrate(AddPrefixesMigration(vec![
"settings.kubelet-device-plugins.nvidia.device-partitioning-strategy",
"settings.kubelet-device-plugins.nvidia.mig",
"configuration-files.nvidia-k8s-device-plugin-mig-conf",
]))
}

// Returning a Result from main makes it print a Debug representation of the error, but with Snafu
// we have nice Display representations of the error, so we wrap "main" (run) and print any error.
// /~https://github.com/shepmaster/snafu/issues/110
fn main() {
if let Err(e) = run() {
eprintln!("{}", e);
process::exit(1);
}
}
6 changes: 6 additions & 0 deletions sources/shared-defaults/nvidia-k8s-device-plugin.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ restart-commands = ["/bin/systemctl try-reload-or-restart nvidia-k8s-device-plug
configuration-files = [
"nvidia-k8s-device-plugin-conf",
"nvidia-k8s-device-plugin-exec-start-conf",
"nvidia-k8s-device-plugin-mig-conf"
]

[configuration-files.nvidia-k8s-device-plugin-conf]
Expand All @@ -14,6 +15,10 @@ template-path = "/usr/share/templates/nvidia-k8s-device-plugin-conf"
path = "/etc/systemd/system/nvidia-k8s-device-plugin.service.d/exec-start.conf"
template-path = "/usr/share/templates/nvidia-k8s-device-plugin-exec-start-conf"

[configuration-files.nvidia-k8s-device-plugin-mig-conf]
path = "/etc/nvidia-migmanager/nvidia-migmanager.toml"
template-path = "/usr/share/templates/nvidia-k8s-device-plugin-mig-conf"

[metadata.settings.kubelet-device-plugins.nvidia]
affected-services = ["nvidia-k8s-device-plugin"]

Expand All @@ -22,3 +27,4 @@ pass-device-specs = true
device-id-strategy="index"
device-list-strategy="volume-mounts"
device-sharing-strategy="none"
device-partitioning-strategy="none"

0 comments on commit 18d04e5

Please sign in to comment.