| # |
| # Copyright 2021 Google LLC |
| # |
| # This program is free software; you can redistribute it and/or |
| # modify it under the terms of the GNU General Public License |
| # version 2 as published by the Free Software Foundation. |
| # |
| # This program is distributed in the hope that it will be useful, |
| # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| # GNU General Public License for more details. |
| # |
| |
| EAPI=6 |
| |
| inherit systemd |
| |
| DESCRIPTION="Kubernetes package for node" |
| HOMEPAGE="https://github.com/GoogleCloudPlatform/kubernetes" |
| SRC_URI=" |
| amd64? ( https://storage.googleapis.com/kubernetes-release/release/v${PV}/kubernetes-server-linux-amd64.tar.gz -> kubernetes-server-linux-amd64-${PV}.tar.gz ) |
| arm64? ( https://storage.googleapis.com/kubernetes-release/release/v${PV}/kubernetes-server-linux-arm64.tar.gz -> kubernetes-server-linux-arm64-${PV}.tar.gz ) |
| " |
| |
| LICENSE="BSD-Google" |
| SLOT="0" |
| KEYWORDS="*" |
| IUSE="platform_gcp kubeadm" |
| |
| S=${WORKDIR} |
| |
| RDEPEND=" |
| app-arch/gzip |
| >=net-misc/socat-1.7.3.0 |
| app-admin/logrotate |
| " |
| |
| src_install() { |
| dobin kubernetes/server/bin/kubelet |
| dobin kubernetes/server/bin/kubectl |
| |
| if use kubeadm; then |
| dobin kubernetes/server/bin/kubeadm |
| fi |
| |
| systemd_dounit "${FILESDIR}"/kubelet.service |
| insinto /etc/default |
| if use platform_gcp; then |
| newins "${FILESDIR}"/default-gcp kubelet |
| else |
| newins "${FILESDIR}"/default kubelet |
| fi |
| } |