diff --git a/Release.toml b/Release.toml index bcc5a446320..d7504d3d560 100644 --- a/Release.toml +++ b/Release.toml @@ -1,4 +1,4 @@ -version = "1.22.0" +version = "1.23.0" [migrations] "(0.3.1, 0.3.2)" = ["migrate_v0.3.2_admin-container-v0-5-0.lz4"] @@ -344,3 +344,9 @@ version = "1.22.0" "migrate_v1.22.0_bootstrap-commands-settings.lz4", "migrate_v1.22.0_bootstrap-commands-metadata.lz4", ] +"(1.22.0, 1.23.0)" = [ + "migrate_v1.23.0_kubelet-device-plugins-metadata.lz4", + "migrate_v1.23.0_kubelet-device-plugins-settings.lz4", + "migrate_v1.23.0_nvidia-container-runtime-metadata.lz4", + "migrate_v1.23.0_nvidia-container-runtime-settings.lz4", +] diff --git a/Twoliter.toml b/Twoliter.toml index 964e07342a7..c642483aa0f 100644 --- a/Twoliter.toml +++ b/Twoliter.toml @@ -1,5 +1,5 @@ schema-version = 1 -release-version = "1.22.0" +release-version = "1.23.0" [vendor.bottlerocket] registry = "public.ecr.aws/bottlerocket" diff --git a/sources/Cargo.lock b/sources/Cargo.lock index 3f705574c0a..c6b6c96b676 100644 --- a/sources/Cargo.lock +++ b/sources/Cargo.lock @@ -1274,6 +1274,20 @@ dependencies = [ "migration-helpers", ] +[[package]] +name = "kubelet-device-plugins-metadata" +version = "0.1.0" +dependencies = [ + "migration-helpers", +] + +[[package]] +name = "kubelet-device-plugins-settings" +version = "0.1.0" +dependencies = [ + "migration-helpers", +] + [[package]] name = "lazy_static" version = "1.4.0" @@ -1472,6 +1486,20 @@ dependencies = [ "libc", ] +[[package]] +name = "nvidia-container-runtime-metadata" +version = "0.1.0" +dependencies = [ + "migration-helpers", +] + +[[package]] +name = "nvidia-container-runtime-settings" +version = "0.1.0" +dependencies = [ + "migration-helpers", +] + [[package]] name = "object" version = "0.32.2" diff --git a/sources/Cargo.toml b/sources/Cargo.toml index f1d7ecdc97a..e911d41db7b 100644 --- a/sources/Cargo.toml +++ b/sources/Cargo.toml @@ -51,6 +51,10 @@ members = [ "settings-migrations/v1.22.0/public-control-container-v0-7-15", "settings-migrations/v1.22.0/bootstrap-commands-settings", "settings-migrations/v1.22.0/bootstrap-commands-metadata", + "settings-migrations/v1.23.0/nvidia-container-runtime-metadata", + "settings-migrations/v1.23.0/nvidia-container-runtime-settings", + "settings-migrations/v1.23.0/kubelet-device-plugins-metadata", + "settings-migrations/v1.23.0/kubelet-device-plugins-settings", "settings-plugins/aws-dev", "settings-plugins/aws-ecs-1", diff --git a/sources/settings-migrations/v1.23.0/kubelet-device-plugins-metadata/Cargo.toml b/sources/settings-migrations/v1.23.0/kubelet-device-plugins-metadata/Cargo.toml new file mode 100644 index 00000000000..71f02375c60 --- /dev/null +++ b/sources/settings-migrations/v1.23.0/kubelet-device-plugins-metadata/Cargo.toml @@ -0,0 +1,15 @@ +[package] +name = "kubelet-device-plugins-metadata" +version = "0.1.0" +authors = ["Monirul Islam "] +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 diff --git a/sources/settings-migrations/v1.23.0/kubelet-device-plugins-metadata/src/main.rs b/sources/settings-migrations/v1.23.0/kubelet-device-plugins-metadata/src/main.rs new file mode 100644 index 00000000000..aac132f93e8 --- /dev/null +++ b/sources/settings-migrations/v1.23.0/kubelet-device-plugins-metadata/src/main.rs @@ -0,0 +1,21 @@ +use migration_helpers::common_migrations::{AddMetadataMigration, SettingMetadata}; +use migration_helpers::{migrate, Result}; +use std::process; + +/// We added a new setting for configuring the NVIDIA k8s device plugin. +fn run() -> Result<()> { + migrate(AddMetadataMigration(&[SettingMetadata { + metadata: &["affected-services"], + setting: "settings.kubelet-device-plugins", + }])) +} + +// 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); + } +} diff --git a/sources/settings-migrations/v1.23.0/kubelet-device-plugins-settings/Cargo.toml b/sources/settings-migrations/v1.23.0/kubelet-device-plugins-settings/Cargo.toml new file mode 100644 index 00000000000..16b42d94a34 --- /dev/null +++ b/sources/settings-migrations/v1.23.0/kubelet-device-plugins-settings/Cargo.toml @@ -0,0 +1,15 @@ +[package] +name = "kubelet-device-plugins-settings" +version = "0.1.0" +authors = ["Monirul Islam "] +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 diff --git a/sources/settings-migrations/v1.23.0/kubelet-device-plugins-settings/src/main.rs b/sources/settings-migrations/v1.23.0/kubelet-device-plugins-settings/src/main.rs new file mode 100644 index 00000000000..7780006fb6f --- /dev/null +++ b/sources/settings-migrations/v1.23.0/kubelet-device-plugins-settings/src/main.rs @@ -0,0 +1,23 @@ +use migration_helpers::common_migrations::AddPrefixesMigration; +use migration_helpers::{migrate, Result}; +use std::process; + +/// We added a new setting for configuring the NVIDIA k8s device plugin. +fn run() -> Result<()> { + migrate(AddPrefixesMigration(vec![ + "settings.kubelet-device-plugins", + "services.nvidia-k8s-device-plugin", + "configuration-files.nvidia-k8s-device-plugin-conf", + "configuration-files.nvidia-k8s-device-plugin-exec-start-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); + } +} diff --git a/sources/settings-migrations/v1.23.0/nvidia-container-runtime-metadata/Cargo.toml b/sources/settings-migrations/v1.23.0/nvidia-container-runtime-metadata/Cargo.toml new file mode 100644 index 00000000000..30faa64ca4a --- /dev/null +++ b/sources/settings-migrations/v1.23.0/nvidia-container-runtime-metadata/Cargo.toml @@ -0,0 +1,15 @@ +[package] +name = "nvidia-container-runtime-metadata" +version = "0.1.0" +authors = ["Monirul Islam "] +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 diff --git a/sources/settings-migrations/v1.23.0/nvidia-container-runtime-metadata/src/main.rs b/sources/settings-migrations/v1.23.0/nvidia-container-runtime-metadata/src/main.rs new file mode 100644 index 00000000000..9e25b90d572 --- /dev/null +++ b/sources/settings-migrations/v1.23.0/nvidia-container-runtime-metadata/src/main.rs @@ -0,0 +1,21 @@ +use migration_helpers::common_migrations::{AddMetadataMigration, SettingMetadata}; +use migration_helpers::{migrate, Result}; +use std::process; + +/// We added a new setting for configuring container runtime (containerd) settings only for NVIDIA k8s variants. +fn run() -> Result<()> { + migrate(AddMetadataMigration(&[SettingMetadata { + metadata: &["affected-services"], + setting: "settings.nvidia-container-runtime", + }])) +} + +// 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); + } +} diff --git a/sources/settings-migrations/v1.23.0/nvidia-container-runtime-settings/Cargo.toml b/sources/settings-migrations/v1.23.0/nvidia-container-runtime-settings/Cargo.toml new file mode 100644 index 00000000000..e57aea2f8ee --- /dev/null +++ b/sources/settings-migrations/v1.23.0/nvidia-container-runtime-settings/Cargo.toml @@ -0,0 +1,15 @@ +[package] +name = "nvidia-container-runtime-settings" +version = "0.1.0" +authors = ["Monirul Islam "] +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 diff --git a/sources/settings-migrations/v1.23.0/nvidia-container-runtime-settings/src/main.rs b/sources/settings-migrations/v1.23.0/nvidia-container-runtime-settings/src/main.rs new file mode 100644 index 00000000000..27122d646f7 --- /dev/null +++ b/sources/settings-migrations/v1.23.0/nvidia-container-runtime-settings/src/main.rs @@ -0,0 +1,22 @@ +use migration_helpers::common_migrations::AddPrefixesMigration; +use migration_helpers::{migrate, Result}; +use std::process; + +/// We added a new setting for configuring container runtime (containerd) settings only for NVIDIA k8s variants. +fn run() -> Result<()> { + migrate(AddPrefixesMigration(vec![ + "settings.nvidia-container-runtime", + "services.nvidia-container-toolkit", + "configuration-files.nvidia-container-toolkit", + ])) +} + +// 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); + } +}