hetzner-alpine-k8s/config.yaml

117 lines
2.5 KiB
YAML
Raw Normal View History

2022-12-17 00:05:27 +00:00
---
apk_tools_version: v2.12.10
apk_tools_arch: x86_64
apk_tools_url: https://gitlab.alpinelinux.org/api/v4/projects/5/packages/generic//{{ apk_tools_version }}/{{ apk_tools_arch }}/apk.static
apk_tools_checksum: sha256:d7506bb11327b337960910daffed75aa289d8bb350feab624c52965be82ceae8
alpine_version: edge
alpine_mirror: http://dl-cdn.alpinelinux.org/alpine
alpine_repositories: [ main, community, testing ]
boot_size: +100m
root_size: '0'
hostname: alpine-k8s
packages:
# Alpine base system
openssh: ''
syslinux: ''
linux-virt: ''
sudo: '@community'
vim: ''
2022-12-17 00:05:27 +00:00
cloud-init: '@community'
e2fsprogs-extra: ''
py3-pyserial: '@community'
py3-netifaces: '@community'
2022-12-17 00:05:27 +00:00
# K8s requirements
# OpenEBS
2022-12-17 00:05:27 +00:00
open-iscsi: ''
open-iscsi-openrc: ''
udev: ''
2022-12-17 00:05:27 +00:00
cni-plugin-flannel: '@community'
cni-plugins: '@community'
flannel: '@testing'
flannel-contrib-cni: '@testing'
docker: '@community'
uuidgen: ''
nfs-utils: ''
kubelet: '@testing=1.25.0-r4'
kubeadm: '@testing=1.25.0-r4'
kubectl: '@testing=1.25.0-r4'
services:
devfs: sysinit
dmesg: sysinit
hwdrivers: sysinit
udev: sysinit
2022-12-17 00:05:27 +00:00
hwclock: boot
modules: boot
sysctl: boot
hostname: boot
bootmisc: boot
syslog: boot
networking: boot
mount-ro: shutdown
killprocs: shutdown
savecache: shutdown
sshd: default
# K8s requirements
docker: default
iscsid: default
kubelet: default
ntpd: default
nameservers:
- 185.12.64.1
- 185.12.64.2
- 2a01:4ff:ff00::add:1
- 2a01:4ff:ff00::add:2
sysctl: {}
extlinux_modules:
- ext4
kernel_features:
- base
- ext4
- keymap
- virtio
kernel_modules:
- ipv6
- af_packet
default_kernel_opts:
- quiet
chroot_commands:
# kernel stuff
- 'echo "br_netfilter" >/etc/modules-load.d/k8s.conf'
- 'echo "net.bridge.bridge-nf-call-iptables=1" >>/etc/sysctl.conf'
# Fix prometheus errors
- 'echo -e "#!/bin/sh\nmount --make-rshared /" >/etc/local.d/sharemetrics.start'
- 'chmod +x /etc/local.d/sharemetrics.start'
- 'rc-update add local'
# Enable private interface
- 'echo "network: {config: disabled}" >/etc/cloud/cloud.cfg.d/99-disable-network-config.cfg'
- 'echo -e "auto lo\niface lo inet loopback\n" >/etc/network/interfaces'
- 'echo -e "auto eth0\niface eth0 inet dhcp\niface eth0 inet6 auto\n" >>/etc/network/interfaces'
- 'echo -e "auto eth1\niface eth1 inet dhcp\niface eth1 inet6 auto\n" >>/etc/network/interfaces'
# Force --cloud-provider=external
- "sed -i 's/command_args=\"/command_args=\"--cloud-provider=external /' /etc/init.d/kubelet"
2022-12-17 00:05:27 +00:00
...