-
Notifications
You must be signed in to change notification settings - Fork 522
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1904 from zmrow/metal-k8s-variant
variants: Add metal-k8s-1.21 variant
- Loading branch information
Showing
28 changed files
with
155 additions
and
17 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
File renamed without changes.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
vmware-k8s.conf | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
vmware-k8s.conf | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
[settings.kubernetes] | ||
cluster-domain = "cluster.local" | ||
standalone-mode = false | ||
authentication-mode = "tls" | ||
pod-infra-container-image = "public.ecr.aws/eks-distro/kubernetes/pause:3.5" | ||
server-tls-bootstrap = false | ||
cloud-provider = "external" | ||
|
||
[metadata.settings.kubernetes] | ||
node-ip.setting-generator = "netdog node-ip" | ||
affected-services = ["kubernetes"] | ||
|
||
# Metrics | ||
[settings.metrics] | ||
service-checks = ["apiserver", "chronyd", "containerd", "host-containerd", "kubelet"] | ||
|
||
# Network | ||
[metadata.settings.network] | ||
affected-services = ["containerd", "kubernetes", "host-containerd", "host-containers"] |
14 changes: 14 additions & 0 deletions
14
sources/models/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,14 @@ | ||
# Both containers are disabled by default in off-AWS variants because the user | ||
# must supply user data in order to use the containers. The admin container | ||
# isn't useful without SSH keys/CA certs, and the control container can only be | ||
# used with hybrid SSM off of AWS. Users of off-AWS variants might not want to | ||
# use either of those options. | ||
[settings.host-containers.admin] | ||
enabled = false | ||
superpowered = true | ||
source = "public.ecr.aws/bottlerocket/bottlerocket-admin:v0.7.3" | ||
|
||
[settings.host-containers.control] | ||
enabled = false | ||
superpowered = false | ||
source = "public.ecr.aws/bottlerocket/bottlerocket-control:v0.5.4" |
14 changes: 0 additions & 14 deletions
14
sources/models/shared-defaults/vmware-host-containers.toml
This file was deleted.
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
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.21/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.21/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 |
1 change: 1 addition & 0 deletions
1
sources/models/src/metal-k8s-1.21/defaults.d/51-kubernetes-containerd.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.toml |
1 change: 1 addition & 0 deletions
1
sources/models/src/metal-k8s-1.21/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.21/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.21/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,27 @@ | ||
use model_derive::model; | ||
use serde::{Deserialize, Serialize}; | ||
use std::collections::HashMap; | ||
|
||
use crate::modeled_types::Identifier; | ||
use crate::{ | ||
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, | ||
metrics: MetricsSettings, | ||
pki: HashMap<Identifier, PemCertificate>, | ||
container_registry: RegistrySettings, | ||
oci_hooks: OciHooks, | ||
} |
1 change: 1 addition & 0 deletions
1
sources/models/src/vmware-k8s-1.21/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 |
1 change: 0 additions & 1 deletion
1
sources/models/src/vmware-k8s-1.21/defaults.d/20-vmware-host-containers.toml
This file was deleted.
Oops, something went wrong.
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,40 @@ | ||
[package] | ||
# This is the metal-k8s-1.21 variant. "." is not allowed in crate names, but | ||
# we don't use this crate name anywhere. | ||
name = "metal-k8s-1_21" | ||
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 = [ | ||
"console=tty0", | ||
"console=ttyS1,115200n8", | ||
# Only reserve if there are at least 2GB | ||
"crashkernel=2G-:256M" | ||
] | ||
included-packages = [ | ||
"cni", | ||
"cni-plugins", | ||
"kernel-5.10", | ||
"kubelet-1.21", | ||
"release", | ||
] | ||
|
||
[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_21 = { path = "../../packages/kubernetes-1.21" } | ||
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 |