Skip to content
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

Drop k8s 1.24 #447

Merged
merged 2 commits into from
Jan 30, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 16 additions & 16 deletions tools/bottlerocket-variant/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ pub mod error {
///
/// For example, here are some valid variant strings:
/// - aws-ecs-1
/// - vmware-k8s-1.23
/// - vmware-k8s-1.32
/// - metal-dev
/// - aws-k8s-1.24-nvidia
/// - aws-k8s-1.32-nvidia
///
/// The `platform` and `runtime` values are required. `variant_version` and `variant_flavor` values
/// are optional and will default to `"0"` and `"none"` respectively.
Expand All @@ -70,10 +70,10 @@ pub mod error {
///
/// ```rust
/// use bottlerocket_variant::{Variant, VARIANT_ENV};
/// std::env::set_var(VARIANT_ENV, "metal-k8s-1.24");
/// std::env::set_var(VARIANT_ENV, "vmware-k8s-1.32");
/// let variant = Variant::from_env().unwrap();
///
/// assert_eq!(variant.version().unwrap(), "1.24");
/// assert_eq!(variant.version().unwrap(), "1.32");
///
/// // In a `build.rs` file, you may want to emit cfgs that you can use for conditional compilation.
/// variant.emit_cfgs();
Expand All @@ -96,9 +96,9 @@ impl Variant {
/// # Valid Values
///
/// - `aws-dev`
/// - `vmware-k8s-1.24`
/// - `aws-k8s-1.24-nvidia`
/// - `aws-k8s-1.24-nvidia-some-additional-ignored-tuple-positions`
/// - `vmware-k8s-1.32`
/// - `aws-k8s-1.32-nvidia`
/// - `aws-k8s-1.32-nvidia-some-additional-ignored-tuple-positions`
///
/// # Invalid Values
///
Expand Down Expand Up @@ -130,13 +130,13 @@ impl Variant {
}

/// The variant's runtime. This is the second member of the tuple. For example, in
/// `metal-k8s-1.24`, `k8s` is the `runtime`.
/// `vmware-k8s-1.32`, `k8s` is the `runtime`.
pub fn runtime(&self) -> &str {
&self.runtime
}

/// The variant's family. This is the `platform` and `runtime` together. For example, in
/// `aws-k8s-1.24`, `aws-k8s` is the `family`.
/// `aws-k8s-1.32`, `aws-k8s` is the `family`.
pub fn family(&self) -> &str {
&self.family
}
Expand All @@ -149,7 +149,7 @@ impl Variant {
}

/// The variant's flavor. This is the optional fourth value in the variant string tuple. For
/// example for `aws-k8s-1.24-nvidia` the `variant_flavor` is `nvidia`.
/// example for `aws-k8s-1.32-nvidia` the `variant_flavor` is `nvidia`.
pub fn variant_flavor(&self) -> Option<&str> {
self.variant_flavor.as_deref()
}
Expand All @@ -166,14 +166,14 @@ impl Variant {
///
/// # Example
///
/// Given a variant `aws-k8s-1.24`, if this function has been called in `build.rs`, then
/// Given a variant `aws-k8s-1.32`, if this function has been called in `build.rs`, then
/// all of the following conditional complition checks would evaluate to `true`.
///
/// `#[cfg(variant = "aws-k8s-1.24")]`
/// `#[cfg(variant = "aws-k8s-1.32")]`
/// `#[cfg(variant_platform = "aws")]`
/// `#[cfg(variant_runtime = "k8s")]`
/// `#[cfg(variant_family = "aws-k8s")]`
/// `#[cfg(variant_version = "1.24")]`
/// `#[cfg(variant_version = "1.32")]`
/// `#[cfg(variant_flavor = "none")]`
pub fn emit_cfgs(&self) {
Self::rerun_if_changed();
Expand Down Expand Up @@ -407,11 +407,11 @@ fn parse_ok() {
variant_flavor: None,
},
Test {
input: "aws-k8s-1.24-nvidia-some-additional-ignored-tuple-positions",
input: "aws-k8s-1.32-nvidia-some-additional-ignored-tuple-positions",
platform: "aws",
runtime: "k8s",
variant_family: "aws-k8s",
variant_version: Some("1.24"),
variant_version: Some("1.32"),
variant_flavor: Some("nvidia"),
},
];
Expand All @@ -430,7 +430,7 @@ fn parse_ok() {

#[test]
fn parse_err() {
let tests = vec!["aws", "aws-", "aws-dev-", "aws-k8s-1.24-"];
let tests = vec!["aws", "aws-", "aws-dev-", "aws-k8s-1.32-"];
for test in tests {
let result = Variant::new(test);
assert!(
Expand Down
4 changes: 2 additions & 2 deletions tools/testsys/Test.toml.example
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,6 @@ instance-type = "p3.2xlarge"
[aws-ecs-nvidia.aarch64]
instance-type = "g5g.2xlarge"

# Configuration for only the `aws-k8s-1.24` variant (variant level configuration).
["aws-k8s-1.24".aarch64]
# Configuration for only the `aws-k8s-1.32` variant (variant level configuration).
["aws-k8s-1.32".aarch64]
conformance-image = "<KUBERNETES-CONFORMANCE-IMAGE-URI>"
2 changes: 1 addition & 1 deletion twoliter/embedded/Makefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ BUILDSYS_VERSION_BUILD_TIMESTAMP = { script = ["git show -s --format=%ct HEAD ||
# use a different Release.toml.
BUILDSYS_RELEASE_CONFIG_PATH = "${BUILDSYS_ROOT_DIR}/Release.toml"
# This can be overridden with -e to build a different variant from the variants/ directory
BUILDSYS_VARIANT = { script = ['echo "${BUILDSYS_VARIANT:-aws-k8s-1.24}"'] }
BUILDSYS_VARIANT = { script = ['echo "${BUILDSYS_VARIANT:-aws-k8s-1.32}"'] }
# Product name used for file and directory naming
BUILDSYS_NAME = "bottlerocket"
# "Pretty" name used to identify OS in os-release, bootloader, etc.
Expand Down
Loading