Skip to content

Commit

Permalink
Added kubeadm to automation
Browse files Browse the repository at this point in the history
  • Loading branch information
DreamingRaven committed Sep 23, 2023
1 parent c70ac0c commit e1888d0
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 0 deletions.
24 changes: 24 additions & 0 deletions kubeadm-bin/.SRCINFO
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
pkgbase = kubeadm-bin
pkgdesc = Kubernetes.io kubeadm binary
pkgver = 1.28.0
pkgrel = 1
url = http://kubernetes.io
arch = x86_64
arch = armv7l
arch = armv7h
arch = aarch64
license = apache
depends = kubelet-bin
depends = conntrack-tools
depends = iptables
depends = iproute2
depends = util-linux
depends = crictl
provides = kubeadm
conflicts = kubeadm
source = 10-kubeadm.conf
source = kubeadm-bin-1.28.0-amd64::https://storage.googleapis.com/kubernetes-release/release/v1.28.0/bin/linux/amd64/kubeadm
b2sums = 074744d327227c32661befcff7651209438090fbd75890ad3b5a32ada1fbdf8901dbd132c7093ed353901f1ea7505c97089a5a89a104f57cb7f53a342eecc7e8
b2sums = 87d6abbebdf568b4c362750faa3a2138d748f62a5f67c95a23f531b9096dda29f45f95b7f42d009b5f0bfadde9691b0879f111e9a5b5b0fb7a94d1802eecdfd2

pkgname = kubeadm-bin
11 changes: 11 additions & 0 deletions kubeadm-bin/10-kubeadm.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Note: This dropin only works with kubeadm and kubelet v1.11+
[Service]
Environment="KUBELET_KUBECONFIG_ARGS=--bootstrap-kubeconfig=/etc/kubernetes/bootstrap-kubelet.conf --kubeconfig=/etc/kubernetes/kubelet.conf"
Environment="KUBELET_CONFIG_ARGS=--config=/var/lib/kubelet/config.yaml"
# This is a file that "kubeadm init" and "kubeadm join" generate at runtime, populating the KUBELET_KUBEADM_ARGS variable dynamically
EnvironmentFile=-/var/lib/kubelet/kubeadm-flags.env
# This is a file that the user can use for overrides of the kubelet args as a last resort. Preferably, the user should use
# the .NodeRegistration.KubeletExtraArgs object in the configuration files instead. KUBELET_EXTRA_ARGS should be sourced from this file.
EnvironmentFile=-/etc/default/kubelet
ExecStart=
ExecStart=/usr/bin/kubelet $KUBELET_KUBECONFIG_ARGS $KUBELET_CONFIG_ARGS $KUBELET_KUBEADM_ARGS $KUBELET_EXTRA_ARGS
39 changes: 39 additions & 0 deletions kubeadm-bin/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Maintainer: George Raven <GeorgeRavenCommunity PLUS kubeadmbin AT pm DOT me>
# Contributor: Paul Nicholson <brenix AT gmail DOT com>
# Contributor: Wes Jackson <icebal DOT 7 AT gmail DOT com>

pkgname=kubeadm-bin
pkgdesc="Kubernetes.io kubeadm binary"
pkgver=1.28.0
pkgrel=1
arch=('x86_64' 'armv7l' 'armv7h' 'aarch64')
url="http://kubernetes.io"
license=('apache')
depends=('kubelet-bin' 'conntrack-tools' 'iptables' 'iproute2' 'util-linux' 'crictl')
conflicts=('kubeadm')
provides=('kubeadm')
source=(
"10-kubeadm.conf"
)
b2sums=('074744d327227c32661befcff7651209438090fbd75890ad3b5a32ada1fbdf8901dbd132c7093ed353901f1ea7505c97089a5a89a104f57cb7f53a342eecc7e8'
'87d6abbebdf568b4c362750faa3a2138d748f62a5f67c95a23f531b9096dda29f45f95b7f42d009b5f0bfadde9691b0879f111e9a5b5b0fb7a94d1802eecdfd2')

# if CARCH is not set default to x86_64
# https://stackoverflow.com/a/11362364/11164973
: "${CARCH:=x86_64}"

case "$CARCH" in
x86_64) _pkgarch="amd64"
;;
arm*) _pkgarch="arm"
;;
aarch64) _pkgarch="arm64"
;;
esac

source+=(${pkgname}-${pkgver}-${_pkgarch}::"https://storage.googleapis.com/kubernetes-release/release/v${pkgver}/bin/linux/${_pkgarch}/kubeadm")

package() {
install -D -m0644 "10-kubeadm.conf" "${pkgdir}/usr/lib/systemd/system/kubelet.service.d/10-kubeadm.conf"
install -D -m0755 "${pkgname}-${pkgver}-${_pkgarch}" "${pkgdir}/usr/bin/kubeadm"
}

0 comments on commit e1888d0

Please sign in to comment.