Skip to content

Commit c3d2f40

Browse files
authored
Merge pull request #168 from gardenlinux/fixup-khost
Update khost feature for CAPI image
2 parents 96d8f81 + f7272af commit c3d2f40

File tree

14 files changed

+103
-1
lines changed

14 files changed

+103
-1
lines changed

features/khost

Lines changed: 0 additions & 1 deletion
This file was deleted.

features/khost/README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
## Feature: khost
2+
### Description
3+
<website-feature>
4+
The khost feature adjusts Garden Linux to support running Kubernetes (vanilla) workloads.
5+
</website-feature>
6+
7+
### Features
8+
The `khost` feature adjusts Garden Linux to support running Kubernetes (vanilla) workloads and installs and configures all related packages (regarding the used hardware architecture) and tools. It adjusts the `kublets`, `sysctl` and removes any swap partition.
9+
10+
### Unit testing
11+
Unit tests will ensure that the needed packages are present as well as the `kublet` is enabled within `systemd`.
12+
13+
### Meta
14+
|||
15+
|---|---|
16+
|type|element|
17+
|artifact|None|
18+
|included_features|`chost`|
19+
|excluded_features|None|

features/khost/exec.late

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/usr/bin/env bash
2+
set -Eeuo pipefail
3+
4+
K8S_VERSION=v1.34.3
5+
K8S_VERSION_REPO="${K8S_VERSION%.*}"
6+
7+
gpg --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg < /builder/features/khost/release.key
8+
echo "deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/${K8S_VERSION_REPO}/deb/ /" | tee /etc/apt/sources.list.d/kubernetes.list
9+
apt update -y
10+
apt install -y --no-install-recommends "kubelet=${K8S_VERSION#v}*" "kubectl=${K8S_VERSION#v}*" "kubeadm=${K8S_VERSION#v}*" "cri-tools=${K8S_VERSION_REPO#v}*"
11+

features/khost/file.exclude

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/etc/init.d/apparmor
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
br_netfilter
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
net.bridge.bridge-nf-call-iptables=1
2+
net.bridge.bridge-nf-call-ip6tables=1
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
fs.inotify.max_user_instances = 8192
2+
fs.inotify.max_user_watches = 65536
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
net.ipv4.ip_forward=1
2+
net.ipv6.conf.all.forwarding=1
3+

features/khost/fstab.mod

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/usr/bin/env bash
2+
set -Eeuo pipefail
3+
4+
# remove any swap partition
5+
sed '/^[^[:space:]]\+[[:space:]]\+[^[:space:]]\+[[:space:]]\+swap[[:space:]]\+/d'
6+

features/khost/info.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
description: 'host for kubernetes workloads (vanilla)'
2+
type: element
3+
features:
4+
include:
5+
- chost

0 commit comments

Comments
 (0)