diff options
author | Koen Kooi <koen@dominion.thruhere.net> | 2018-07-23 16:48:50 +0200 |
---|---|---|
committer | Bruce Ashfield <bruce.ashfield@windriver.com> | 2018-07-23 15:29:37 -0400 |
commit | 23bf4b01f2a80d1f630d6464194a7a7d70febf6f (patch) | |
tree | 9477ce29cdb696d8c29b98e56a97f2a113b5b630 | |
parent | 7cae5520fd3db229875f9a3af38e59d1ba2b4024 (diff) | |
download | meta-virtualization-23bf4b01f2a80d1f630d6464194a7a7d70febf6f.tar.gz |
kubernetes: OE styleguide fixes
* Keep variables close to the function they are used in, so R(untime)DEPENDS goes below do_install, PV next to SRCREV, etc.
* Don't use =+ as multiline seperator, it's a *very* heavy bitbake operation.
Signed-off-by: Koen Kooi <koen.kooi@linaro.org>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
-rw-r--r-- | recipes-containers/kubernetes/kubernetes_git.bb | 51 |
1 files changed, 23 insertions, 28 deletions
diff --git a/recipes-containers/kubernetes/kubernetes_git.bb b/recipes-containers/kubernetes/kubernetes_git.bb index bb80c3f1..4dbd0806 100644 --- a/recipes-containers/kubernetes/kubernetes_git.bb +++ b/recipes-containers/kubernetes/kubernetes_git.bb | |||
@@ -5,7 +5,11 @@ applications across multiple hosts, providing basic mechanisms for deployment, \ | |||
5 | maintenance, and scaling of applications. \ | 5 | maintenance, and scaling of applications. \ |
6 | " | 6 | " |
7 | 7 | ||
8 | # Note: 1.11+ requires go 1.10.2+, so the following must be set | ||
9 | # in your configuration: GOVERSION = "1.10%" | ||
10 | PV = "1.11.0+git${SRCREV_kubernetes}" | ||
8 | SRCREV_kubernetes = "210c9cd7e1782e9fe46938fe0368556f2166a528" | 11 | SRCREV_kubernetes = "210c9cd7e1782e9fe46938fe0368556f2166a528" |
12 | |||
9 | SRC_URI = "git://github.com/kubernetes/kubernetes.git;branch=release-1.11;name=kubernetes \ | 13 | SRC_URI = "git://github.com/kubernetes/kubernetes.git;branch=release-1.11;name=kubernetes \ |
10 | file://0001-hack-lib-golang.sh-use-CC-from-environment.patch \ | 14 | file://0001-hack-lib-golang.sh-use-CC-from-environment.patch \ |
11 | " | 15 | " |
@@ -14,34 +18,11 @@ DEPENDS += "rsync-native \ | |||
14 | coreutils-native \ | 18 | coreutils-native \ |
15 | " | 19 | " |
16 | 20 | ||
17 | PACKAGES =+ "${PN}-misc" | ||
18 | PACKAGES =+ "kubeadm" | ||
19 | PACKAGES =+ "kubectl" | ||
20 | PACKAGES =+ "kubelet" | ||
21 | PACKAGES =+ "kube-proxy" | ||
22 | |||
23 | ALLOW_EMPTY_${PN} = "1" | ||
24 | |||
25 | # Note: we are explicitly *not* adding docker to the rdepends, since we allow | ||
26 | # backends like cri-o to be used. | ||
27 | RDEPENDS_${PN} += "kubeadm \ | ||
28 | kubectl \ | ||
29 | kubelet \ | ||
30 | cni" | ||
31 | |||
32 | RDEPENDS_kubeadm = "kubelet kubectl" | ||
33 | RDEPENDS_kubelet = "iptables socat util-linux ethtool iproute2 ebtables iproute2-tc" | ||
34 | |||
35 | LICENSE = "Apache-2.0" | 21 | LICENSE = "Apache-2.0" |
36 | LIC_FILES_CHKSUM = "file://src/import/LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" | 22 | LIC_FILES_CHKSUM = "file://src/import/LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" |
37 | 23 | ||
38 | GO_IMPORT = "import" | 24 | GO_IMPORT = "import" |
39 | 25 | ||
40 | |||
41 | # Note: 1.11+ requires go 1.10.2+, so the following must be set | ||
42 | # in your configuration: GOVERSION = "1.10%" | ||
43 | PV = "1.11.0+git${SRCREV_kubernetes}" | ||
44 | |||
45 | inherit systemd | 26 | inherit systemd |
46 | inherit go | 27 | inherit go |
47 | inherit goarch | 28 | inherit goarch |
@@ -97,18 +78,32 @@ do_install() { | |||
97 | install -m 0644 ${S}/src/import/build/debs/10-kubeadm.conf ${D}${systemd_unitdir}/system/kubelet.service.d/ | 78 | install -m 0644 ${S}/src/import/build/debs/10-kubeadm.conf ${D}${systemd_unitdir}/system/kubelet.service.d/ |
98 | } | 79 | } |
99 | 80 | ||
81 | PACKAGES =+ "kubeadm kubectl kubelet kube-proxy ${PN}-misc" | ||
82 | |||
83 | ALLOW_EMPTY_${PN} = "1" | ||
84 | INSANE_SKIP_${PN} += "ldflags already-stripped" | ||
85 | |||
86 | # Note: we are explicitly *not* adding docker to the rdepends, since we allow | ||
87 | # backends like cri-o to be used. | ||
88 | RDEPENDS_${PN} += "kubeadm \ | ||
89 | kubectl \ | ||
90 | kubelet \ | ||
91 | cni" | ||
92 | |||
93 | RDEPENDS_kubeadm = "kubelet kubectl" | ||
94 | FILES_kubeadm = "${bindir}/kubeadm ${systemd_unitdir}/system/kubelet.service.d/*" | ||
95 | |||
96 | RDEPENDS_kubelet = "iptables socat util-linux ethtool iproute2 ebtables iproute2-tc" | ||
97 | FILES_kubelet = "${bindir}/kubelet ${systemd_unitdir}/system/kubelet.service ${sysconfdir}/kubernetes/manifests/" | ||
98 | |||
100 | SYSTEMD_PACKAGES = "${@bb.utils.contains('DISTRO_FEATURES','systemd','kubelet','',d)}" | 99 | SYSTEMD_PACKAGES = "${@bb.utils.contains('DISTRO_FEATURES','systemd','kubelet','',d)}" |
101 | SYSTEMD_SERVICE_kubelet = "${@bb.utils.contains('DISTRO_FEATURES','systemd','kubelet.service','',d)}" | 100 | SYSTEMD_SERVICE_kubelet = "${@bb.utils.contains('DISTRO_FEATURES','systemd','kubelet.service','',d)}" |
102 | SYSTEMD_AUTO_ENABLE_kubelet = "enable" | 101 | SYSTEMD_AUTO_ENABLE_kubelet = "enable" |
103 | 102 | ||
104 | FILES_${PN}-misc = "${bindir}" | ||
105 | FILES_kubeadm = "${bindir}/kubeadm ${systemd_unitdir}/system/kubelet.service.d/*" | ||
106 | FILES_kubectl = "${bindir}/kubectl" | 103 | FILES_kubectl = "${bindir}/kubectl" |
107 | FILES_kube-proxy = "${bindir}/kube-proxy" | 104 | FILES_kube-proxy = "${bindir}/kube-proxy" |
108 | FILES_kubelet = "${bindir}/kubelet ${systemd_unitdir}/system/kubelet.service ${sysconfdir}/kubernetes/manifests/" | 105 | FILES_${PN}-misc = "${bindir}" |
109 | |||
110 | 106 | ||
111 | INHIBIT_PACKAGE_STRIP = "1" | 107 | INHIBIT_PACKAGE_STRIP = "1" |
112 | INSANE_SKIP_${PN} += "ldflags already-stripped" | ||
113 | 108 | ||
114 | deltask compile_ptest_base | 109 | deltask compile_ptest_base |