[meta-freescale] [PATCH 3/7] qoriq-eds-kubelet: add recipes
chunrong.guo at nxp.com
chunrong.guo at nxp.com
Thu May 3 23:41:51 PDT 2018
From: Chunrong Guo <chunrong.guo at nxp.com>
*include the following changes:
d3ada01 - Kubernetes version v1.7.0 file updates
14b32e4 - Merge pull request #48162 from yguo0905/automated-cherry-pick-of-#47549-upstream-release-1.7
4a4b04e - Merge pull request #48266 from piosz/automated-cherry-pick-of-#48066-upstream-release-1.7
e8b5441 - Revert "Decrese fluentd cpu request"
d420643 - Merge pull request #48218 from dnardo/automated-cherry-pick-of-#48004-upstream-release-1.7
3a79966 - Merge pull request #48155 from ajitak/automated-cherry-pick-of-#47892-upstream-release-1.7
3648549 - Merge pull request #48229 from caesarxuchao/automated-cherry-pick-of-#48205-#48183-#48118-upstream-release-1.7
5afafb6 - Merge pull request #48238 from caesarxuchao/automated-cherry-pick-of-#48235-upstream-release-1.7
d7bb1ef - Implement GetCapacity in container_manager_unsupported
77c5be4 - Merge pull request #48230 from caesarxuchao/automated-cherry-pick-of-#48123-upstream-release-1.7
641ace7 - Kubelet: Centralize Capacity discovery of standard resources in Container manager. Have storage derive node capacity from container manager. Move certain cAdvisor interfa
28c96d1 - Ensures node becomes schedulable at the end of tests that delete nodes
72c2705 - Fix kube-proxy panic when running with "--cleanup-iptables=true"
Signed-off-by: Chunrong Guo <chunrong.guo at nxp.com>
---
recipes-containers/qoriq-eds/qoriq-eds-kubelet.bb | 90 ++++++++++++++++++++++
.../build-kube-toolchain-to-run-on-host.patch | 19 +++++
2 files changed, 109 insertions(+)
create mode 100644 recipes-containers/qoriq-eds/qoriq-eds-kubelet.bb
create mode 100644 recipes-containers/qoriq-eds/qoriq-eds-kubelet/build-kube-toolchain-to-run-on-host.patch
diff --git a/recipes-containers/qoriq-eds/qoriq-eds-kubelet.bb b/recipes-containers/qoriq-eds/qoriq-eds-kubelet.bb
new file mode 100644
index 0000000..26da900
--- /dev/null
+++ b/recipes-containers/qoriq-eds/qoriq-eds-kubelet.bb
@@ -0,0 +1,90 @@
+HOMEPAGE = "git://github.com/kubernetes/kubernetes"
+SUMMARY = "Production-Grade Container Scheduling and Management"
+DESCRIPTION = "Kubernetes is an open source system for managing containerized \
+applications across multiple hosts, providing basic mechanisms for deployment, \
+maintenance, and scaling of applications. \
+"
+
+SRC_URI = "git://github.com/kubernetes/kubernetes.git;nobranch=1;name=kubernetes \
+ file://build-kube-toolchain-to-run-on-host.patch \
+"
+SRCREV = "d3ada0119e776222f11ec7945e6d860061339aad"
+
+DEPENDS += "rsync-native \
+ coreutils-native \
+ "
+ALLOW_EMPTY_${PN} = "1"
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://src/import/LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"
+
+GO_IMPORT = "import"
+
+inherit systemd
+inherit go
+inherit goarch
+
+do_compile() {
+ sed -i "s:export CC=.*-gcc$:export CC=${HOST_PREFIX}gcc:g" ${S}/src/import/hack/lib/golang.sh
+ export GOARCH="${TARGET_GOARCH}"
+ export GOROOT="${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/go"
+ export GOPATH="${S}/src/import:${S}/src/import/vendor"
+
+ # Pass the needed cflags/ldflags so that cgo
+ # can find the needed headers files and libraries
+ export CGO_ENABLED="1"
+ export CFLAGS=""
+ export LDFLAGS=""
+ export CGO_CFLAGS="${BUILDSDK_CFLAGS} --sysroot=${STAGING_DIR_TARGET}"
+ export CGO_LDFLAGS="${BUILDSDK_LDFLAGS} --sysroot=${STAGING_DIR_TARGET}"
+
+ # link fixups for compilation
+ rm -f ${S}/src/import/vendor/src
+ ln -sf ./ ${S}/src/import/vendor/src
+
+ export GOPATH="${S}/src/import/.gopath:${S}/src/import/vendor:${STAGING_DIR_TARGET}/${prefix}/local/go"
+ export GOROOT="${STAGING_DIR_NATIVE}/${nonarch_libdir}/${HOST_SYS}/go"
+
+ # Pass the needed cflags/ldflags so that cgo
+ # can find the needed headers files and libraries
+ export CGO_ENABLED="1"
+ export CGO_CFLAGS="${CFLAGS} --sysroot=${STAGING_DIR_TARGET}"
+ export CGO_LDFLAGS="${LDFLAGS} --sysroot=${STAGING_DIR_TARGET}"
+
+ cd ${S}/src/import
+ export KUBE_BUILD_PLATFORMS="${HOST_GOOS}/${BUILD_GOARCH}"
+ export GOARCH="${BUILD_GOARCH}"
+ make generated_files
+ export KUBE_BUILD_PLATFORMS="${HOST_GOOS}/${TARGET_GOARCH}"
+ export GOARCH="${TARGET_GOARCH}"
+ # to limit what is built, use 'WHAT', i.e. make WHAT=cmd/kubelet
+ make WHAT="/cmd/libs/go2idl/deepcopy-gen"
+ make WHAT=cmd/kubelet
+}
+
+do_install() {
+ install -d ${D}${bindir}
+ install -d ${D}${systemd_unitdir}/system/
+ install -d ${D}${systemd_unitdir}/system/kubelet.service.d/
+
+ install -d ${D}${sysconfdir}/kubernetes/manifests/
+
+ #install -m 755 -D ${S}/src/import/_output/bin/kube* ${D}/${bindir}
+ if ls ${S}/src/import/_output/local/bin/*/${TARGET_GOARCH}/kube* > /dev/null 2>&1 ; then
+ install -m 755 -D ${S}/src/import/_output/local/bin/*/${TARGET_GOARCH}/kube* ${D}/${bindir}
+ elif ls ${S}/src/import/_output/bin/kube* > /dev/null 2>&1 ; then
+ install -m 755 -D ${S}/src/import/_output/bin/kube* ${D}/${bindir}
+ fi
+ install -m 0644 ${S}/src/import/build/debs/kubelet.service ${D}${systemd_unitdir}/system/
+}
+
+SYSTEMD_PACKAGES = "${@bb.utils.contains('DISTRO_FEATURES','systemd','kubelet','',d)}"
+SYSTEMD_SERVICE_kubelet = "${@bb.utils.contains('DISTRO_FEATURES','systemd','kubelet.service','',d)}"
+SYSTEMD_AUTO_ENABLE_kubelet = "enable"
+
+
+INHIBIT_PACKAGE_STRIP = "1"
+INSANE_SKIP_${PN} += "ldflags already-stripped"
+
+deltask compile_ptest_base
+BBCLASSEXTEND = "nativesdk"
diff --git a/recipes-containers/qoriq-eds/qoriq-eds-kubelet/build-kube-toolchain-to-run-on-host.patch b/recipes-containers/qoriq-eds/qoriq-eds-kubelet/build-kube-toolchain-to-run-on-host.patch
new file mode 100644
index 0000000..0bd26e2
--- /dev/null
+++ b/recipes-containers/qoriq-eds/qoriq-eds-kubelet/build-kube-toolchain-to-run-on-host.patch
@@ -0,0 +1,19 @@
+Upstream-Status: Inappropriate [embedded-specific]
+
+Signed-off-by: Chunrong Guo <chunrong.guo at nxp.com>
+
+--- a/src/import/hack/lib/golang.shold 2017-06-30 06:53:16.000000000 +0800
++++ b/src/import/hack/lib/golang.sh 2018-05-02 14:32:40.706915559 +0800
+@@ -668,9 +668,11 @@
+ parallel=false
+ fi
+ fi
+-
++ local goarch_backup=${GOARCH}
++ export GOARCH=$(go env GOHOSTARCH)
+ # First build the toolchain before building any other targets
+ kube::golang::build_kube_toolchain
++ export GOARCH="$goarch_backup"
+
+ kube::log::status "Generating bindata:" "${KUBE_BINDATAS[@]}"
+ for bindata in ${KUBE_BINDATAS[@]}; do
--
2.7.4
More information about the meta-freescale
mailing list