Skip to content

Commit

Permalink
Merge pull request #4306 from piyush-jena/mig-feature-migrations
Browse files Browse the repository at this point in the history
Add support for nvidia MIG
  • Loading branch information
piyush-jena authored Feb 7, 2025
2 parents 028fe04 + 01d33d9 commit 7a4c242
Show file tree
Hide file tree
Showing 7 changed files with 95 additions and 43 deletions.
1 change: 1 addition & 0 deletions Release.toml
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,7 @@ version = "1.33.0"
]
"(1.31.0, 1.32.0)" = []
"(1.32.0, 1.33.0)" = [
"migrate_v1.33.0_kubelet-device-plugins-mig-settings.lz4",
"migrate_v1.33.0_public-control-container-v0-7-19-update.lz4",
"migrate_v1.33.0_public-control-container-v0-7-20-update.lz4",
"migrate_v1.33.0_aws-remove-schnauzer-admin.lz4",
Expand Down
77 changes: 42 additions & 35 deletions sources/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 7 additions & 6 deletions sources/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ members = [
"settings-migrations/v1.31.0/public-admin-container-v0-11-16",
"settings-migrations/v1.31.0/aws-control-container-v0-7-20",
"settings-migrations/v1.31.0/public-control-container-v0-7-20",
"settings-migrations/v1.33.0/kubelet-device-plugins-mig-settings",
"settings-migrations/v1.33.0/public-control-container-v0-7-19-update",
"settings-migrations/v1.33.0/public-control-container-v0-7-20-update",
"settings-migrations/v1.33.0/aws-remove-schnauzer-admin",
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-plugin-v0.1.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
4 changes: 2 additions & 2 deletions sources/models/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ Bottlerocket has different variants supporting different features and use cases.
Each variant has its own set of software, and therefore needs its own configuration.
We support having an API model for each variant to support these different configurations.
The model here defines a top-level `Settings` structure, and delegates the actual implementation to a ["settings plugin"](https://github.com/bottlerocket/bottlerocket-settings-sdk/tree/settings-plugins).
The model here defines a top-level `Settings` structure, and delegates the actual implementation to a ["settings plugin"](https://github.com/bottlerocket-os/bottlerocket-settings-sdk/tree/develop/bottlerocket-settings-plugin).
Settings plugin are written in Rust as a "cdylib" crate, and loaded at runtime.
Each settings plugin must define its own private `Settings` structure.
It can use pre-defined structures inside, or custom ones as needed.
`apiserver::datastore` offers serialization and deserialization modules that make it easy to map between Rust types and the data store, and thus, all inputs and outputs are type-checked.
At the field level, standard Rust types can be used, or ["modeled types"](src/modeled_types) that add input validation.
At the field level, standard Rust types can be used, or ["modeled types"](https://github.com/bottlerocket-os/bottlerocket-settings-sdk/tree/develop/bottlerocket-settings-models/modeled-types) that add input validation.
The `#[model]` attribute on Settings and its sub-structs reduces duplication and adds some required metadata; see [its docs](model-derive/) for details.
*/
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 <[email protected]>"]
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
Loading

0 comments on commit 7a4c242

Please sign in to comment.