--- /dev/null
+# Copyright (c) 2017 Intel Corporation
+#
+# 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.
+#
+apiVersion: v1
+kind: Pod
+metadata:
+ labels:
+ app: cmk-cluster-init-pod
+ name: cmk-cluster-init-pod
+ #namespace: user-supplied-namespace
+spec:
+ serviceAccountName: cmk-serviceaccount
+ containers:
+ - args:
+ # Change this value to pass different options to cluster-init.
+ - "/cmk/cmk.py cluster-init --host-list=$HOST_LIST --saname=cmk-serviceaccount --num-exclusive-cores=$NUM_EXCLUSIVE_CORES --num-shared-cores=$NUM_SHARED_CORES --cmk-img=$CMK_IMG"
+ command:
+ - "/bin/bash"
+ - "-c"
+ image: cmk:v1.3.1
+ name: cmk-cluster-init-pod
+ env:
+ - name: HOST_LIST
+ value: "oran-master"
+ - name: NUM_EXCLUSIVE_CORES
+ value: "4"
+ - name: NUM_SHARED_CORES
+ value: "1"
+ - name: CMK_IMG
+ value: "cmk:v1.3.1"
+ restartPolicy: Never
--- /dev/null
+From c0a24da25fed6503ae1eafc92d6d91277091039d Mon Sep 17 00:00:00 2001
+From: Jackie Huang <jackie.huang@windriver.com>
+Date: Mon, 28 Oct 2019 16:20:54 +0800
+Subject: [PATCH] requirements.txt: add urllib3<1.24
+
+Fixed the issue:
+/usr/local/lib/python3.4/site-packages/requests/__init__.py:91:
+RequestsDependencyWarning: urllib3 (1.25.6) or chardet (3.0.4) doesn't
+match a supported version!
+ RequestsDependencyWarning)
+
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+---
+ requirements.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/requirements.txt b/requirements.txt
+index 64f8999..534b542 100644
+--- a/requirements.txt
++++ b/requirements.txt
+@@ -10,3 +10,4 @@ cryptography>=2.3, <=2.4.2
+ yamlreader==3.0.4
+ pluggy>=0.5, <0.7
+ packaging==17.1
++urllib3<1.24
+--
+2.7.4
+
--- /dev/null
+#
+# Copyright (C) 2019 Wind River Systems, Inc.
+#
+
+SUMMARY = "CPU Manager for Kubernetes"
+uDESCRIPTION = "\
+ This project provides basic core affinity for NFV-style workloads \
+ on top of vanilla Kubernetes v1.5+. \
+ This project ships a single multi-use command-line program to perform \
+ various functions for host configuration, managing groups of CPUs, \
+ and constraining workloads to specific CPUs. \
+"
+HOMEPAGE = "https://github.com/intel/CPU-Manager-for-Kubernetes"
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=d62f25248fea71c71fb2b520c72b5171"
+
+SRC_URI = "\
+ https://github.com/intel/${BPN}/archive/v${PV}.tar.gz;downloadfilename=${BPN}-v${PV}.tar.gz \
+ file://docker-img-cmk-v1.3.1.tar.bz2;unpack=0 \
+ file://cmk-requirements.txt-add-urllib3-1.24.patch \
+ file://cmk-cluster-init-pod-template.yaml \
+"
+
+SRC_URI[md5sum] = "5ec9f665524b86654dedb2e6826851ed"
+SRC_URI[sha256sum] = "e86feb81751c6715247577c47070beca273022b470ae09c856e6da72f185688f"
+
+S = "${WORKDIR}/CPU-Manager-for-Kubernetes-${PV}"
+
+PACKAGES =+ "${PN}-img"
+
+DOCKER_IMG = "/opt/docker_images/${BPN}"
+K8S_PLUGINS_SRC = "/opt/kubernetes_plugins/${BPN}"
+K8S_PLUGINS = "${sysconfdir}/kubernetes/plugins/${BPN}"
+
+do_configure() {
+ :
+}
+
+do_compile() {
+ :
+}
+
+do_install() {
+ # Install the config files
+ install -d ${D}${K8S_PLUGINS}
+ install -m 644 ${S}/resources/authorization/cmk-serviceaccount.yaml ${D}${K8S_PLUGINS}
+ install -m 644 ${S}/resources/authorization/cmk-rbac-rules.yaml ${D}${K8S_PLUGINS}
+ install -m 644 ${WORKDIR}/cmk-cluster-init-pod-template.yaml ${D}${K8S_PLUGINS}
+
+ # Install the saved docker image
+ install -d ${D}${DOCKER_IMG}
+ install -m 644 ${WORKDIR}/docker-img-*.tar.bz2 ${D}${DOCKER_IMG}
+
+ # Install all the src
+ install -d ${D}${K8S_PLUGINS_SRC}
+ cp -a --no-preserve=ownership ${S}/* ${D}${K8S_PLUGINS_SRC}
+}
+
+FILES_${PN} += "${K8S_PLUGINS_SRC}"
+FILES_${PN}-img = "${DOCKER_IMG}"
+
+# provides a short alias
+RPROVIDES_${PN} = "cmk"
+RPROVIDES_${PN}-img = "cmk-img"
+
+INSANE_SKIP_${PN} = "file-rdeps"