Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This change adds an additional variant `metal-k8s-1.23`, which includes necessary Kubernetes packages and settings for running Bottlerocket on metal in a Kubernetes v1.23 cluster.
- Loading branch information
Showing
23 changed files
with
129 additions
and
4 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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 |
---|---|---|
@@ -0,0 +1 @@ | ||
k8s.conf |
This file contains 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
This file contains 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
1 change: 1 addition & 0 deletions
1
sources/models/src/metal-k8s-1.22/defaults.d/51-kubernetes-containerd-dockershim.toml
This file contains 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 |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../shared-defaults/kubernetes-containerd-dockershim.toml |
This file contains 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 |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../shared-defaults/defaults.toml |
1 change: 1 addition & 0 deletions
1
sources/models/src/metal-k8s-1.23/defaults.d/20-public-host-containers.toml
This file contains 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 |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../shared-defaults/public-host-containers.toml |
This file contains 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 |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../shared-defaults/metrics.toml |
1 change: 1 addition & 0 deletions
1
sources/models/src/metal-k8s-1.23/defaults.d/50-kubernetes-metal.toml
This file contains 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 |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../shared-defaults/kubernetes-metal.toml |
File renamed without changes.
1 change: 1 addition & 0 deletions
1
sources/models/src/metal-k8s-1.23/defaults.d/52-kubernetes-services.toml
This file contains 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 |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../shared-defaults/kubernetes-services.toml |
1 change: 1 addition & 0 deletions
1
sources/models/src/metal-k8s-1.23/defaults.d/53-containerd-cri-pki.toml
This file contains 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 |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../shared-defaults/containerd-cri-pki.toml |
1 change: 1 addition & 0 deletions
1
sources/models/src/metal-k8s-1.23/defaults.d/60-lockdown-integrity.toml
This file contains 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 |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../shared-defaults/lockdown-integrity.toml |
1 change: 1 addition & 0 deletions
1
sources/models/src/metal-k8s-1.23/defaults.d/70-public-ntp.toml
This file contains 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 |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../shared-defaults/public-ntp.toml |
This file contains 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 |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../shared-defaults/oci-hooks.toml |
This file contains 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 |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../shared-defaults/boot.toml |
This file contains 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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
use model_derive::model; | ||
use serde::{Deserialize, Serialize}; | ||
use std::collections::HashMap; | ||
|
||
use crate::modeled_types::Identifier; | ||
use crate::{ | ||
BootSettings, BootstrapContainer, HostContainer, KernelSettings, KubernetesSettings, | ||
MetricsSettings, NetworkSettings, NtpSettings, OciHooks, PemCertificate, RegistrySettings, | ||
UpdatesSettings, | ||
}; | ||
|
||
// Note: we have to use 'rename' here because the top-level Settings structure is the only one | ||
// that uses its name in serialization; internal structures use the field name that points to it | ||
#[model(rename = "settings", impl_default = true)] | ||
struct Settings { | ||
motd: String, | ||
kubernetes: KubernetesSettings, | ||
updates: UpdatesSettings, | ||
host_containers: HashMap<Identifier, HostContainer>, | ||
bootstrap_containers: HashMap<Identifier, BootstrapContainer>, | ||
ntp: NtpSettings, | ||
network: NetworkSettings, | ||
kernel: KernelSettings, | ||
boot: BootSettings, | ||
metrics: MetricsSettings, | ||
pki: HashMap<Identifier, PemCertificate>, | ||
container_registry: RegistrySettings, | ||
oci_hooks: OciHooks, | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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 |
---|---|---|
@@ -0,0 +1,41 @@ | ||
[package] | ||
# This is the metal-k8s-1.23 variant. "." is not allowed in crate names, but | ||
# we don't use this crate name anywhere. | ||
name = "metal-k8s-1_23" | ||
version = "0.1.0" | ||
edition = "2018" | ||
publish = false | ||
build = "build.rs" | ||
# Don't rebuild crate just because of changes to README. | ||
exclude = ["README.md"] | ||
|
||
[package.metadata.build-variant.image-layout] | ||
os-image-size-gib = 4 | ||
partition-plan = "unified" | ||
|
||
[package.metadata.build-variant] | ||
image-format = "raw" | ||
kernel-parameters = [ | ||
# Only reserve if there are at least 2GB | ||
"crashkernel=2G-:256M" | ||
] | ||
included-packages = [ | ||
"cni", | ||
"cni-plugins", | ||
"kernel-5.10", | ||
"kubelet-1.23", | ||
"release", | ||
] | ||
grub-features = [ | ||
"set-private-var" | ||
] | ||
|
||
[lib] | ||
path = "lib.rs" | ||
|
||
[build-dependencies] | ||
cni = { path = "../../packages/cni" } | ||
cni-plugins = { path = "../../packages/cni-plugins" } | ||
kernel-5_10 = { path = "../../packages/kernel-5.10" } | ||
kubernetes-1_23 = { path = "../../packages/kubernetes-1.23" } | ||
release = { path = "../../packages/release" } |
This file contains 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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
use std::process::{exit, Command}; | ||
|
||
fn main() -> Result<(), std::io::Error> { | ||
let ret = Command::new("buildsys").arg("build-variant").status()?; | ||
if !ret.success() { | ||
exit(1); | ||
} | ||
Ok(()) | ||
} |
This file contains 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 |
---|---|---|
@@ -0,0 +1 @@ | ||
// not used |