From 2d7b386193d2fc1f4f4669ca0b237fd8474d63c3 Mon Sep 17 00:00:00 2001 From: Duffie Cooley Date: Wed, 28 Nov 2018 13:42:26 -0800 Subject: [PATCH] Add conntrack as a dependency of kubelet FIXES: https://github.com/kubernetes/kubeadm/issues/1287 - This commit integrates the work of @jdetiber to fix bazel build //build/rpms and also addresses an issue where not all common versions of rpmbuild have the %{_sysctldir} macro. - Since that macro points to /usr/lib/sysctl.d this commit just points directly to that dir. - This also adds conntrack as a dependency of kubelet for both rpm and deb builds. Signed-off-by: Duffie Cooley --- build/debs/BUILD | 15 ++++++++------- build/rpms/kubeadm.spec | 8 ++++---- build/rpms/kubelet.spec | 7 ++++--- build/rpms/kubernetes-cni.spec | 1 - 4 files changed, 16 insertions(+), 15 deletions(-) diff --git a/build/debs/BUILD b/build/debs/BUILD index d571efac2d3..26e2cc7ca29 100644 --- a/build/debs/BUILD +++ b/build/debs/BUILD @@ -148,14 +148,15 @@ k8s_deb( k8s_deb( name = "kubelet", depends = [ - "iptables (>= 1.4.21)", - "kubernetes-cni (>= 0.6.0)", - "iproute2", - "socat", - "util-linux", - "mount", + "conntrack", "ebtables", "ethtool", + "iproute2", + "iptables (>= 1.4.21)", + "kubernetes-cni (>= 0.6.0)", + "mount", + "socat", + "util-linux", ], description = """Kubernetes Node Agent The node agent of Kubernetes, the container cluster manager @@ -168,7 +169,7 @@ k8s_deb( depends = [ "kubelet (>= 1.8.0)", "kubectl (>= 1.8.0)", - "kubernetes-cni (>= 0.5.1)", + "kubernetes-cni (>= 0.6.0)", "cri-tools (>= 1.11.0)", ], description = """Kubernetes Cluster Bootstrapping Tool diff --git a/build/rpms/kubeadm.spec b/build/rpms/kubeadm.spec index 21557f1c090..b5dc2c2dac1 100644 --- a/build/rpms/kubeadm.spec +++ b/build/rpms/kubeadm.spec @@ -5,7 +5,7 @@ License: ASL 2.0 Summary: Container Cluster Manager - Kubernetes Cluster Bootstrapping Tool Requires: kubelet >= 1.8.0 Requires: kubectl >= 1.8.0 -Requires: kubernetes-cni >= 0.5.1 +Requires: kubernetes-cni >= 0.6.0 Requires: cri-tools >= 1.11.0 URL: https://kubernetes.io @@ -22,9 +22,9 @@ install -p -m 755 -t %{buildroot}%{_bindir} {kubeadm} install -p -m 644 -t %{buildroot}%{_sysconfdir}/systemd/system/kubelet.service.d/ {10-kubeadm.conf} install -p -m 644 -T {kubelet.env} %{buildroot}%{_sysconfdir}/sysconfig/kubelet mkdir -p %{buildroot}%{_libexecdir}/modules-load.d -mkdir -p %{buildroot}%{_sysctldir} +mkdir -p %{buildroot}/usr/lib/sysctl.d/ install -p -m 0644 -t %{buildroot}%{_libexecdir}/modules-load.d/ {kubeadm.conf} -install -p -m 0644 -t %{buildroot}%{_sysctldir} {50-kubeadm.conf} +install -p -m 0644 -t %{buildroot}/usr/lib/sysctl.d/ {50-kubeadm.conf} %files %{_bindir}/kubeadm @@ -32,4 +32,4 @@ install -p -m 0644 -t %{buildroot}%{_sysctldir} {50-kubeadm.conf} %{_sysconfdir}/sysconfig/kubelet %dir %{_libexecdir}/modules-load.d %{_libexecdir}/modules-load.d/kubeadm.conf -%{_sysctldir}/50-kubeadm.conf +/usr/lib/sysctl.d/50-kubeadm.conf diff --git a/build/rpms/kubelet.spec b/build/rpms/kubelet.spec index 2d9ae5e829f..3828f2e2cf0 100644 --- a/build/rpms/kubelet.spec +++ b/build/rpms/kubelet.spec @@ -6,13 +6,14 @@ Summary: Container Cluster Manager - Kubernetes Node Agent URL: https://kubernetes.io +Requires: conntrack +Requires: ebtables +Requires: ethtool +Requires: iproute Requires: iptables >= 1.4.21 Requires: kubernetes-cni >= 0.6.0 Requires: socat Requires: util-linux -Requires: ethtool -Requires: iproute -Requires: ebtables %description The node agent of Kubernetes, the container cluster manager. diff --git a/build/rpms/kubernetes-cni.spec b/build/rpms/kubernetes-cni.spec index e2a8cda1baf..e77fdae3b6c 100644 --- a/build/rpms/kubernetes-cni.spec +++ b/build/rpms/kubernetes-cni.spec @@ -3,7 +3,6 @@ Version: OVERRIDE_THIS Release: 00 License: ASL 2.0 Summary: Container Cluster Manager - CNI plugins - URL: https://kubernetes.io %description