diff --git a/debian_pkg_dirs b/debian_pkg_dirs index 9d6d95cea..e86d9bf98 100644 --- a/debian_pkg_dirs +++ b/debian_pkg_dirs @@ -40,6 +40,7 @@ kubernetes/etcd kubernetes/helm kubernetes/k8s-pod-recovery kubernetes/kubernetes-1.21.3 +kubernetes/kubernetes-unversioned kubernetes/plugins/isolcpus-device-plugin kubernetes/runc ldap/ldapscripts diff --git a/kubernetes/kubernetes-unversioned/debian/deb_folder/changelog b/kubernetes/kubernetes-unversioned/debian/deb_folder/changelog new file mode 100644 index 000000000..00146150f --- /dev/null +++ b/kubernetes/kubernetes-unversioned/debian/deb_folder/changelog @@ -0,0 +1,5 @@ +kubernetes-unversioned (1.0-1) unstable; urgency=medium + + * Initial release + + -- Mihnea Saracin Mon, 15 Nov 2021 16:09:12 +0000 diff --git a/kubernetes/kubernetes-unversioned/debian/deb_folder/control b/kubernetes/kubernetes-unversioned/debian/deb_folder/control new file mode 100644 index 000000000..c83fd5f57 --- /dev/null +++ b/kubernetes/kubernetes-unversioned/debian/deb_folder/control @@ -0,0 +1,16 @@ +Source: kubernetes-unversioned +Section: admin +Priority: optional +Maintainer: StarlingX Developers +Build-Depends: debhelper-compat (= 13), libsystemd-dev +Standards-Version: 4.4.1 +Homepage: https://www.starlingx.io +Rules-Requires-Root: no + +Package: kubernetes-unversioned +Architecture: any +Depends: ${shlibs:Depends}, + ${misc:Depends}, + systemd +Description: Kubernetes unversioned common config and current version symlinks + This package contains kubernetes config files and current version symlinks diff --git a/kubernetes/kubernetes-unversioned/debian/deb_folder/copyright b/kubernetes/kubernetes-unversioned/debian/deb_folder/copyright new file mode 100644 index 000000000..bc38cc017 --- /dev/null +++ b/kubernetes/kubernetes-unversioned/debian/deb_folder/copyright @@ -0,0 +1,22 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: kubernetes-unversioned +Source: https://opendev.org/starlingx/integ/src/branch/master/kubernetes/kubernetes-unversioned + +Files: * +Copyright: (c) 2021 Wind River Systems, Inc + (c) Others (See individual files for more details) +License: Apache-2 + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + . + http://www.apache.org/licenses/LICENSE-2.0 + . + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + . + On Debian-based systems the full text of the Apache version 2.0 license + can be found in `/usr/share/common-licenses/Apache-2.0'. diff --git a/kubernetes/kubernetes-unversioned/debian/deb_folder/kubernetes-accounting.conf b/kubernetes/kubernetes-unversioned/debian/deb_folder/kubernetes-accounting.conf new file mode 100644 index 000000000..af7220769 --- /dev/null +++ b/kubernetes/kubernetes-unversioned/debian/deb_folder/kubernetes-accounting.conf @@ -0,0 +1,3 @@ +[Manager] +DefaultCPUAccounting=yes +DefaultMemoryAccounting=yes diff --git a/kubernetes/kubernetes-unversioned/debian/deb_folder/kubernetes-unversioned.dirs b/kubernetes/kubernetes-unversioned/debian/deb_folder/kubernetes-unversioned.dirs new file mode 100644 index 000000000..09e988773 --- /dev/null +++ b/kubernetes/kubernetes-unversioned/debian/deb_folder/kubernetes-unversioned.dirs @@ -0,0 +1,6 @@ +etc/systemd/system/kubelet.service.d +usr/share/bash-completion/completions +usr/local/kubernetes/current/stage1 +usr/local/kubernetes/current/stage2 +var/lib/kubelet +run/kubernetes diff --git a/kubernetes/kubernetes-unversioned/debian/deb_folder/kubernetes-unversioned.install b/kubernetes/kubernetes-unversioned/debian/deb_folder/kubernetes-unversioned.install new file mode 100644 index 000000000..8e2cb1e78 --- /dev/null +++ b/kubernetes/kubernetes-unversioned/debian/deb_folder/kubernetes-unversioned.install @@ -0,0 +1,7 @@ +usr/lib/systemd/system/kubelet.service +etc/kubernetes/config +etc/kubernetes/kubelet +etc/kubernetes/kubelet.kubeconfig +etc/kubernetes/proxy +etc/systemd/system.conf.d/kubernetes-accounting.conf +usr/lib/tmpfiles.d/kubernetes.conf diff --git a/kubernetes/kubernetes-unversioned/debian/deb_folder/kubernetes-unversioned.links b/kubernetes/kubernetes-unversioned/debian/deb_folder/kubernetes-unversioned.links new file mode 100644 index 000000000..305bb84fa --- /dev/null +++ b/kubernetes/kubernetes-unversioned/debian/deb_folder/kubernetes-unversioned.links @@ -0,0 +1,6 @@ +/usr/local/kubernetes/current/stage1/usr/bin/kubeadm /usr/bin/kubeadm +/usr/local/kubernetes/current/stage2/usr/bin/kubelet /usr/bin/kubelet +/usr/local/kubernetes/current/stage2/usr/bin/kubelet-cgroup-setup.sh /usr/bin/kubelet-cgroup-setup.sh +/usr/local/kubernetes/current/stage2/usr/bin/kubectl /usr/bin/kubectl +/usr/local/kubernetes/current/stage2/etc/systemd/system/kubelet.service.d/kubeadm.conf /etc/systemd/system/kubelet.service.d/kubeadm.conf +/usr/local/kubernetes/current/stage2/usr/share/bash-completion/completions/kubectl /usr/share/bash-completion/completions/kubectl diff --git a/kubernetes/kubernetes-unversioned/debian/deb_folder/not-installed b/kubernetes/kubernetes-unversioned/debian/deb_folder/not-installed new file mode 100644 index 000000000..666a84f38 --- /dev/null +++ b/kubernetes/kubernetes-unversioned/debian/deb_folder/not-installed @@ -0,0 +1,6 @@ +usr/bin/kubeadm +usr/bin/kubelet +usr/bin/kubelet-cgroup-setup.sh +usr/bin/kubectl +etc/systemd/system/kubelet.service.d/kubeadm.conf +usr/share/bash-completion/completions/kubectl diff --git a/kubernetes/kubernetes-unversioned/debian/deb_folder/patches/kubelet-service-remove-docker-dependency.patch b/kubernetes/kubernetes-unversioned/debian/deb_folder/patches/kubelet-service-remove-docker-dependency.patch new file mode 100644 index 000000000..78eea1e63 --- /dev/null +++ b/kubernetes/kubernetes-unversioned/debian/deb_folder/patches/kubelet-service-remove-docker-dependency.patch @@ -0,0 +1,15 @@ +diff --git a/init/systemd/kubelet.service b/init/systemd/kubelet.service +index 1082bba..1fae395 100644 +--- a/init/systemd/kubelet.service ++++ b/init/systemd/kubelet.service +@@ -1,8 +1,8 @@ + [Unit] + Description=Kubernetes Kubelet Server + Documentation=https://kubernetes.io/docs/concepts/overview/components/#kubelet https://kubernetes.io/docs/reference/generated/kubelet/ +-After=docker.service +-Requires=docker.service ++Wants=network-online.target ++After=network-online.target + + [Service] + WorkingDirectory=/var/lib/kubelet diff --git a/kubernetes/kubernetes-unversioned/debian/deb_folder/patches/series b/kubernetes/kubernetes-unversioned/debian/deb_folder/patches/series new file mode 100644 index 000000000..eb4803e41 --- /dev/null +++ b/kubernetes/kubernetes-unversioned/debian/deb_folder/patches/series @@ -0,0 +1 @@ +kubelet-service-remove-docker-dependency.patch diff --git a/kubernetes/kubernetes-unversioned/debian/deb_folder/rules b/kubernetes/kubernetes-unversioned/debian/deb_folder/rules new file mode 100755 index 000000000..18921fccd --- /dev/null +++ b/kubernetes/kubernetes-unversioned/debian/deb_folder/rules @@ -0,0 +1,67 @@ +#!/usr/bin/make -f +# See debhelper(7) (uncomment to enable) +# output every command that modifies files on the build system. +#export DH_VERBOSE = 1 + +_k8s_name := kubernetes +_bindir := /usr/bin +_curr_stage1 := /usr/local/kubernetes/current/stage1 +_curr_stage2 := /usr/local/kubernetes/current/stage2 + +DEBIAN_DESTDIR := $(CURDIR)/debian/tmp + + +stage_link = ln -v -sf ${1}${2}/${3} ${DEBIAN_DESTDIR}${2}/${3} + +%: + dh $@ --builddirectory=contrib + +override_dh_auto_build: + mkdir -pv contrib + cp -rv init contrib + +override_dh_install: + # Current staged directories + install -v -m 755 -d ${DEBIAN_DESTDIR}${_curr_stage1} + install -v -m 755 -d ${DEBIAN_DESTDIR}${_curr_stage2} + + # Symlink targets + install -v -m 755 -d ${DEBIAN_DESTDIR}${_bindir} + install -v -m 755 -d ${DEBIAN_DESTDIR}/etc/systemd/system/kubelet.service.d + install -v -m 755 -d ${DEBIAN_DESTDIR}/usr/share/bash-completion/completions + $(call stage_link,${_curr_stage1},${_bindir},kubeadm) + $(call stage_link,${_curr_stage2},/etc/systemd/system/kubelet.service.d,kubeadm.conf) + $(call stage_link,${_curr_stage2},/usr/share/bash-completion/completions,kubectl) + $(call stage_link,${_curr_stage2},${_bindir},kubelet-cgroup-setup.sh) + $(call stage_link,${_curr_stage2},${_bindir},kubelet) + $(call stage_link,${_curr_stage2},${_bindir},kubectl) + + # install environment files + install -v -d -m 0755 ${DEBIAN_DESTDIR}/etc/${_k8s_name} + install -v -m 644 -t ${DEBIAN_DESTDIR}/etc/${_k8s_name} contrib/init/systemd/environ/config + install -v -m 644 -t ${DEBIAN_DESTDIR}/etc/${_k8s_name} contrib/init/systemd/environ/kubelet + install -v -m 644 -t ${DEBIAN_DESTDIR}/etc/${_k8s_name} contrib/init/systemd/environ/kubelet.kubeconfig + install -v -m 644 -t ${DEBIAN_DESTDIR}/etc/${_k8s_name} contrib/init/systemd/environ/proxy + + # install config files + install -v -d -m 0755 ${DEBIAN_DESTDIR}/usr/lib/tmpfiles.d + install -v -p -m 0644 -t ${DEBIAN_DESTDIR}/usr/lib/tmpfiles.d contrib/init/systemd/tmpfiles.d/kubernetes.conf + mkdir -p ${DEBIAN_DESTDIR}/run + install -v -d -m 0755 ${DEBIAN_DESTDIR}/run/${_k8s_name}/ + + # install service files + install -v -d -m 0755 ${DEBIAN_DESTDIR}/usr/lib/systemd/system + install -v -m 0644 -t ${DEBIAN_DESTDIR}/usr/lib/systemd/system contrib/init/systemd/kubelet.service + + # install the place the kubelet defaults to put volumes (/var/lib/kubelet) + install -v -d ${DEBIAN_DESTDIR}/var/lib/kubelet + + # enable CPU and Memory accounting + install -v -d -m 0755 ${DEBIAN_DESTDIR}/etc/systemd/system.conf.d + install -v -p -m 0644 -t ${DEBIAN_DESTDIR}/etc/systemd/system.conf.d debian/kubernetes-accounting.conf + + dh_install + +override_dh_usrlocal: + +override_dh_auto_test: diff --git a/kubernetes/kubernetes-unversioned/debian/deb_folder/source/format b/kubernetes/kubernetes-unversioned/debian/deb_folder/source/format new file mode 100644 index 000000000..163aaf8d8 --- /dev/null +++ b/kubernetes/kubernetes-unversioned/debian/deb_folder/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/kubernetes/kubernetes-unversioned/debian/meta_data.yaml b/kubernetes/kubernetes-unversioned/debian/meta_data.yaml new file mode 100644 index 000000000..ce5fe02cc --- /dev/null +++ b/kubernetes/kubernetes-unversioned/debian/meta_data.yaml @@ -0,0 +1,9 @@ +debname: kubernetes-unversioned +debver: 1.0-1 +dl_path: + name: kubernetes-contrib-v1.18.1.tar.gz + url: https://github.com/kubernetes-retired/contrib/tarball/89f6948e24578fed2a90a87871b2263729f90ac3 + md5sum: 9aa15af65ed89a7167b9520573bbdcd7 +revision: + dist: $STX_DIST + PKG_GITREVCOUNT: true