forked from kubernetes/release
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkubelet.spec
225 lines (170 loc) · 7.03 KB
/
kubelet.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
%global KUBE_MAJOR 1
%global KUBE_MINOR 9
%global KUBE_PATCH 0
%global KUBE_VERSION %{KUBE_MAJOR}.%{KUBE_MINOR}.%{KUBE_PATCH}
%global RPM_RELEASE 0
%global ARCH amd64
# This expands a (major, minor, patch) tuple into a single number so that it
# can be compared against other versions. It has the current implementation
# assumption that none of these numbers will exceed 255.
%define semver() (%1 * 256 * 256 + %2 * 256 + %3)
%global KUBE_SEMVER %{semver %{KUBE_MAJOR} %{KUBE_MINOR} %{KUBE_PATCH}}
%if %{KUBE_SEMVER} >= %{semver 1 9 0}
%global CNI_VERSION 0.6.0
%else
%global CNI_VERSION 0.5.1
%endif
Name: kubelet
Version: %{KUBE_VERSION}
Release: %{RPM_RELEASE}
Summary: Container cluster management
License: ASL 2.0
URL: https://kubernetes.io
Source0: https://dl.k8s.io/v%{KUBE_VERSION}/bin/linux/%{ARCH}/kubelet
Source1: kubelet.service
Source2: https://dl.k8s.io/v%{KUBE_VERSION}/bin/linux/%{ARCH}/kubectl
Source3: https://dl.k8s.io/v%{KUBE_VERSION}/bin/linux/%{ARCH}/kubeadm
Source4: 10-kubeadm.conf
%if %{KUBE_SEMVER} < %{semver 1 9 0}
Source5: https://dl.k8s.io/network-plugins/cni-%{ARCH}-0799f5732f2a11b329d9e3d51b9c8f2e3759f2ff.tar.gz
%else
Source5: https://dl.k8s.io/network-plugins/cni-plugins-%{ARCH}-v%{CNI_VERSION}.tgz
%endif
BuildRequires: curl
Requires: iptables >= 1.4.21
Requires: kubernetes-cni = %{CNI_VERSION}
Requires: socat
Requires: util-linux
Requires: ethtool
Requires: iproute
Requires: ebtables
%description
The node agent of Kubernetes, the container cluster manager.
%package -n kubernetes-cni
Version: %{CNI_VERSION}
Release: %{RPM_RELEASE}
Summary: Binaries required to provision kubernetes container networking
Requires: kubelet
%description -n kubernetes-cni
Binaries required to provision container networking.
%package -n kubectl
Version: %{KUBE_VERSION}
Release: %{RPM_RELEASE}
Summary: Command-line utility for interacting with a Kubernetes cluster.
%description -n kubectl
Command-line utility for interacting with a Kubernetes cluster.
%package -n kubeadm
Version: %{KUBE_VERSION}
Release: %{RPM_RELEASE}
Summary: Command-line utility for administering a Kubernetes cluster.
Requires: kubelet >= 1.6.0
Requires: kubectl >= 1.6.0
Requires: kubernetes-cni
%description -n kubeadm
Command-line utility for administering a Kubernetes cluster.
%prep
# Assumes the builder has overridden sourcedir to point to directory
# with this spec file. (where these files are stored) Copy them into
# the builddir so they can be installed.
# This is a useful hack for faster Docker builds when working on the spec or
# with locally obtained sources.
#
# Example:
# spectool -gf kubelet.spec
# rpmbuild --define "_sourcedir $PWD" -bb kubelet.spec
#
%if %{KUBE_SEMVER} >= %{semver 1 8 0}
ln -s 10-kubeadm-post-1.8.conf %SOURCE4
%else
ln -s 10-kubeadm-pre-1.8.conf %SOURCE4
%endif
cp -p %SOURCE0 %{_builddir}/
cp -p %SOURCE1 %{_builddir}/
cp -p %SOURCE2 %{_builddir}/
cp -p %SOURCE3 %{_builddir}/
cp -p %SOURCE4 %{_builddir}/
%setup -c -D -T -a 5 -n cni-plugins
%install
# The setup macro from prep will make install start in the cni-plugins directory, so cd back to the root.
cd %{_builddir}
install -m 755 -d %{buildroot}%{_bindir}
install -m 755 -d %{buildroot}%{_sysconfdir}/systemd/system/
install -m 755 -d %{buildroot}%{_sysconfdir}/systemd/system/kubelet.service.d/
install -m 755 -d %{buildroot}%{_sysconfdir}/cni/net.d/
install -m 755 -d %{buildroot}%{_sysconfdir}/kubernetes/manifests/
install -m 755 -d %{buildroot}/var/lib/kubelet/
install -p -m 755 -t %{buildroot}%{_bindir}/ kubelet
install -p -m 755 -t %{buildroot}%{_bindir}/ kubectl
install -p -m 755 -t %{buildroot}%{_bindir}/ kubeadm
install -p -m 755 -t %{buildroot}%{_sysconfdir}/systemd/system/ kubelet.service
install -p -m 755 -t %{buildroot}%{_sysconfdir}/systemd/system/kubelet.service.d/ 10-kubeadm.conf
install -m 755 -d %{buildroot}/opt/cni/bin
# bin directory from cni-plugins-%{ARCH}-%{CNI_VERSION}.tgz with a list of cni plugins (among other things)
%if %{KUBE_SEMVER} >= %{semver 1 9 0}
mv cni-plugins/* %{buildroot}/opt/cni/bin/
%else
mv cni-plugins/bin/ %{buildroot}/opt/cni/
%endif
%files
%{_bindir}/kubelet
%{_sysconfdir}/systemd/system/kubelet.service
%{_sysconfdir}/kubernetes/manifests/
%files -n kubernetes-cni
/opt/cni
%files -n kubectl
%{_bindir}/kubectl
%files -n kubeadm
%{_bindir}/kubeadm
%{_sysconfdir}/systemd/system/kubelet.service.d/10-kubeadm.conf
%doc
%changelog
* Fri Dec 15 2017 Anthony Yeh <[email protected]> - 1.9.0
- Release of Kubernetes 1.9.0.
* Thu Oct 19 2017 Di Xu <[email protected]>
- Bump CNI version to v0.6.0.
* Fri Sep 29 2017 Jacob Beacham <[email protected]> - 1.8.0
- Bump version of kubelet and kubectl to v1.8.0.
* Thu Aug 3 2017 Jacob Beacham <[email protected]> - 1.7.3
- Bump version of kubelet and kubectl to v1.7.3.
* Wed Jul 26 2017 Jacob Beacham <[email protected]> - 1.7.2
- Bump version of kubelet and kubectl to v1.7.2.
* Fri Jul 14 2017 Jacob Beacham <[email protected]> - 1.7.1
- Bump version of kubelet and kubectl to v1.7.1.
* Mon Jun 30 2017 Mike Danese <[email protected]> - 1.7.0
- Bump version of kubelet and kubectl to v1.7.0.
* Fri May 19 2017 Jacob Beacham <[email protected]> - 1.6.4
- Bump version of kubelet and kubectl to v1.6.4.
* Wed May 10 2017 Jacob Beacham <[email protected]> - 1.6.3
- Bump version of kubelet and kubectl to v1.6.3.
* Wed Apr 26 2017 Jacob Beacham <[email protected]> - 1.6.2
- Bump version of kubelet and kubectl to v1.6.2.
* Mon Apr 3 2017 Mike Danese <[email protected]> - 1.6.1
- Bump version of kubelet and kubectl to v1.6.1.
* Tue Mar 28 2017 Lucas Käldström <[email protected]>
- Bump CNI version to v0.5.1.
* Wed Mar 15 2017 Lucas Käldström <[email protected]> - 1.6.0
- Bump version of kubelet, kubectl and kubeadm to v1.6.0.
* Tue Dec 13 2016 Mike Danese <[email protected]> - 1.5.4
- Bump version of kubelet and kubectl to v1.5.4.
* Tue Dec 13 2016 Lucas Käldström <[email protected]> - 1.5.1
- Bump version of kubelet and kubectl to v1.5.1, plus kubeadm to the third stable version
* Tue Dec 6 2016 Lucas Käldström <[email protected]> - 1.5.0-beta.2
- Bump version of kubelet and kubectl
* Wed Nov 16 2016 Alexander Kanevskiy <[email protected]>
- fix iproute and mount dependencies (#204)
* Sun Nov 6 2016 Lucas Käldström <[email protected]>
- Sync the debs and rpm files; add some kubelet dependencies to the rpm manifest
* Wed Nov 2 2016 Lucas Käldström <[email protected]>
- Bump version of kubeadm to v1.5.0-alpha.2.380+85fe0f1aadf91e
* Fri Oct 21 2016 Ilya Dmitrichenko <[email protected]> - 1.4.4-0
- Bump version of kubelet and kubectl
* Mon Oct 17 2016 Lucas Käldström <[email protected]> - 1.4.3-0
- Bump version of kubeadm
* Fri Oct 14 2016 Matthew Mosesohn <[email protected]> - 1.4.0-1
- Allow locally built/previously downloaded binaries
* Tue Sep 20 2016 dgoodwin <[email protected]> - 1.4.0-0
- Add kubectl and kubeadm sub-packages.
- Rename to kubernetes-cni.
- Update versions of CNI.
* Wed Jul 20 2016 dgoodwin <[email protected]> - 1.3.4-1
- Initial packaging.