forked from kubernetes/release
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Build RPMs with local source files if available
Changes to rpm build container: * Add source dir in docker build instead of mounting as volume * Add .dockerignore to skip adding build scripts Changes to entry.sh: * Use spectool to download sources if not available (enables caching and locally available files, such as generated from a manual build) Changes to kubelet.spec: * Add URLs for all source files Files downloaded from the Internet are not saved back to the host machine. Updated .gitignore to skip rpm/kube* and cni files.
- Loading branch information
Showing
6 changed files
with
34 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
docker-build.sh | ||
Dockerfile | ||
output/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,7 @@ | ||
kubelet | ||
kubeadm | ||
kubectl | ||
cni-*.tar.gz | ||
bin/ | ||
output/ | ||
*.swp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,5 +7,6 @@ RUN rpmdev-setuptree | |
|
||
USER root | ||
ADD entry.sh /root/ | ||
COPY ./ /root/rpmbuild/SPECS | ||
CMD ["/root/entry.sh"] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
%global KUBE_VERSION 1.4.1 | ||
%global KUBEADM_VERSION 1.5.0-alpha.1.409+714f816a349e79 | ||
%global CNI_RELEASE 07a8a28637e97b22eb8dfe710eeae1344f69d16e | ||
%global RPM_RELEASE 0 | ||
%global RPM_RELEASE 1 | ||
|
||
Name: kubelet | ||
Version: %{KUBE_VERSION} | ||
|
@@ -11,6 +12,11 @@ License: ASL 2.0 | |
URL: https://kubernetes.io | ||
Source0: https://storage.googleapis.com/kubernetes-release/release/v%{KUBE_VERSION}/bin/linux/amd64/kubelet | ||
Source1: kubelet.service | ||
Source2: https://storage.googleapis.com/kubernetes-release/release/v%{KUBE_VERSION}/bin/linux/amd64/kubectl | ||
Source3: https://storage.googleapis.com/kubernetes-release-dev/ci-cross/v%{KUBEADM_VERSION}/bin/linux/amd64/kubeadm | ||
Source4: 10-kubeadm.conf | ||
Source5: https://storage.googleapis.com/kubernetes-release/network-plugins/cni-amd64-%{CNI_RELEASE}.tar.gz | ||
|
||
|
||
BuildRequires: curl | ||
Requires: iptables >= 1.4.21 | ||
|
@@ -54,26 +60,24 @@ Command-line utility for administering a Kubernetes cluster. | |
# 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: rpmbuild --define "_sourcedir $PWD" -bb kubelet.spec | ||
# Example: | ||
# spectool -gf kubelet.spec | ||
# rpmbuild --define "_sourcedir $PWD" -bb kubelet.spec | ||
# | ||
cp -p %{_sourcedir}/kubelet.service %{_builddir}/ | ||
cp -p %{_sourcedir}/10-kubeadm.conf %{_builddir}/ | ||
|
||
# NOTE: Uncomment if you have these binaries in the directory you're building from. | ||
# This is a useful temporary hack for faster Docker builds when working on the spec. | ||
# Implies you also comment out the curl commands below. | ||
#cp -p %{_sourcedir}/kubelet %{_builddir}/ | ||
#cp -p %{_sourcedir}/kubectl %{_builddir}/ | ||
#cp -p %{_sourcedir}/kubeadm %{_builddir}/ | ||
cp -p %SOURCE0 %{_builddir}/ | ||
cp -p %SOURCE1 %{_builddir}/ | ||
cp -p %SOURCE2 %{_builddir}/ | ||
cp -p %SOURCE3 %{_builddir}/ | ||
cp -p %SOURCE4 %{_builddir}/ | ||
%setup -D -T -a 5 -n %{_builddir}/ | ||
|
||
|
||
%install | ||
|
||
curl -L --fail "https://storage.googleapis.com/kubernetes-release/release/v%{KUBE_VERSION}/bin/linux/amd64/kubelet" -o kubelet | ||
curl -L --fail "https://storage.googleapis.com/kubernetes-release/release/v%{KUBE_VERSION}/bin/linux/amd64/kubectl" -o kubectl | ||
curl -L --fail "http://storage.googleapis.com/kubernetes-release-dev/ci-cross/v1.5.0-alpha.1.409+714f816a349e79/bin/linux/amd64/kubeadm" -o kubeadm | ||
|
||
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/ | ||
|
@@ -88,7 +92,6 @@ install -p -m 755 -t %{buildroot}%{_sysconfdir}/systemd/system/kubelet.service.d | |
|
||
|
||
install -m 755 -d %{buildroot}/opt/cni | ||
curl -sSL --fail --retry 5 https://storage.googleapis.com/kubernetes-release/network-plugins/cni-amd64-%{CNI_RELEASE}.tar.gz | tar xz | ||
mv bin/ %{buildroot}/opt/cni/ | ||
|
||
|
||
|
@@ -113,6 +116,10 @@ mv bin/ %{buildroot}/opt/cni/ | |
%changelog | ||
* Mon Oct 17 2016 luxas <[email protected]> | ||
- 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. | ||
|