-
Notifications
You must be signed in to change notification settings - Fork 519
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 the necessary files for a VMware Kubernetes 1.20 variant.
- Loading branch information
Showing
25 changed files
with
170 additions
and
2 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
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 @@ | ||
vmware-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 |
---|---|---|
@@ -0,0 +1 @@ | ||
exec kube-status systemctl status kube* -l --no-pager |
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 = "k8s.gcr.io/pause:3.2" | ||
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", "vmtoolsd"] | ||
|
||
# Network | ||
[metadata.settings.network] | ||
affected-services = ["containerd", "kubernetes", "host-containerd", "host-containers"] |
14 changes: 14 additions & 0 deletions
14
sources/models/shared-defaults/vmware-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 VMware 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. VMware users 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.0" | ||
|
||
[settings.host-containers.control] | ||
enabled = false | ||
superpowered = false | ||
source = "public.ecr.aws/bottlerocket/bottlerocket-control:v0.5.0" |
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/vmware-k8s-1.20/defaults.d/20-vmware-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/vmware-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/vmware-k8s-1.20/defaults.d/50-kubernetes-vmware.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-vmware.toml |
1 change: 1 addition & 0 deletions
1
sources/models/src/vmware-k8s-1.20/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/vmware-k8s-1.20/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/vmware-k8s-1.20/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/vmware-k8s-1.20/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,24 @@ | ||
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, 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, | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,7 @@ members = [ | |
"aws-k8s-1.19", | ||
"aws-k8s-1.20", | ||
"vmware-dev", | ||
"vmware-k8s-1.20", | ||
] | ||
|
||
[profile.dev] | ||
|
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,37 @@ | ||
[package] | ||
# This is the vmware-k8s-1.20 variant. "." is not allowed in crate names, but | ||
# we don't use this crate name anywhere. | ||
name = "vmware-k8s-1_20" | ||
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-format = "vmdk" | ||
supported-arches = ["x86_64"] | ||
kernel-parameters = [ | ||
"console=ttyS0", | ||
"console=tty1", | ||
] | ||
included-packages = [ | ||
"cni", | ||
"cni-plugins", | ||
"kernel-5.10", | ||
"kubelet-1.20", | ||
"open-vm-tools", | ||
"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_20 = { path = "../../packages/kubernetes-1.20" } | ||
open-vm-tools = { path = "../../packages/open-vm-tools" } | ||
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 |
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 @@ | ||
../vmware-dev/template.ovf |