forked from kubernetes/kubernetes
-
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.
bazel: build rpms to match the debs that we output
- Loading branch information
1 parent
576d1d2
commit fd9c017
Showing
9 changed files
with
164 additions
and
1 deletion.
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
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,9 @@ | ||
[Service] | ||
Environment="KUBELET_KUBECONFIG_ARGS=--kubeconfig=/etc/kubernetes/kubelet.conf --require-kubeconfig=true" | ||
Environment="KUBELET_SYSTEM_PODS_ARGS=--pod-manifest-path=/etc/kubernetes/manifests --allow-privileged=true" | ||
Environment="KUBELET_NETWORK_ARGS=--network-plugin=cni --cni-conf-dir=/etc/cni/net.d --cni-bin-dir=/opt/cni/bin" | ||
Environment="KUBELET_DNS_ARGS=--cluster-dns=10.96.0.10 --cluster-domain=cluster.local" | ||
Environment="KUBELET_AUTHZ_ARGS=--authorization-mode=Webhook --client-ca-file=/etc/kubernetes/pki/ca.crt" | ||
Environment="KUBELET_CGROUP_ARGS=--cgroup-driver=systemd" | ||
ExecStart= | ||
ExecStart=/usr/bin/kubelet $KUBELET_KUBECONFIG_ARGS $KUBELET_SYSTEM_PODS_ARGS $KUBELET_NETWORK_ARGS $KUBELET_DNS_ARGS $KUBELET_AUTHZ_ARGS $KUBELET_CGROUP_ARGS $KUBELET_EXTRA_ARGS |
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,45 @@ | ||
package(default_visibility = ["//visibility:public"]) | ||
|
||
load("@bazel_tools//tools/build_defs/pkg:rpm.bzl", "pkg_rpm") | ||
|
||
pkg_rpm( | ||
name = "kubectl", | ||
changelog = "//:CHANGELOG.md", | ||
data = [ | ||
"//cmd/kubectl", | ||
], | ||
spec_file = "kubectl.spec", | ||
version = "1.6.0", | ||
) | ||
|
||
pkg_rpm( | ||
name = "kubelet", | ||
changelog = "//:CHANGELOG.md", | ||
data = [ | ||
"kubelet.service", | ||
"//cmd/kubelet", | ||
], | ||
spec_file = "kubelet.spec", | ||
version = "1.6.0", | ||
) | ||
|
||
pkg_rpm( | ||
name = "kubeadm", | ||
changelog = "//:CHANGELOG.md", | ||
data = [ | ||
"10-kubeadm.conf", | ||
"//cmd/kubeadm", | ||
], | ||
spec_file = "kubeadm.spec", | ||
version = "1.6.0", | ||
) | ||
|
||
pkg_rpm( | ||
name = "kubernetes-cni", | ||
changelog = "//:CHANGELOG.md", | ||
data = [ | ||
"@kubernetes_cni//file", | ||
], | ||
spec_file = "kubernetes-cni.spec", | ||
version = "1.6.0", | ||
) |
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,24 @@ | ||
Name: kubeadm | ||
Version: OVERRIDE_THIS | ||
Release: 00 | ||
License: ASL 2.0 | ||
Summary: Container Cluster Manager | ||
Requires: kubelet >= %{version} | ||
Requires: kubectl >= %{version} | ||
Requires: kubernetes-cni | ||
|
||
URL: https://kubernetes.io | ||
|
||
%description | ||
Command-line utility for administering a Kubernetes cluster. | ||
|
||
%install | ||
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 -p -m 755 -t %{buildroot}%{_bindir} kubeadm | ||
install -p -m 755 -t %{buildroot}%{_sysconfdir}/systemd/system/kubelet.service.d/ 10-kubeadm.conf | ||
|
||
%files | ||
%{_bindir}/kubeadm | ||
%{_sysconfdir}/systemd/system/kubelet.service.d/10-kubeadm.conf |
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,18 @@ | ||
Name: kubectl | ||
Version: OVERRIDE_THIS | ||
Release: 00 | ||
License: ASL 2.0 | ||
Summary: Container Cluster Manager | ||
|
||
URL: https://kubernetes.io | ||
|
||
%description | ||
Command-line utility for interacting with a Kubernetes cluster. | ||
|
||
%install | ||
|
||
install -m 755 -d %{buildroot}%{_bindir} | ||
install -p -m 755 -t %{buildroot}%{_bindir} kubectl | ||
|
||
%files | ||
%{_bindir}/kubectl |
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,12 @@ | ||
[Unit] | ||
Description=kubelet: The Kubernetes Node Agent | ||
Documentation=http://kubernetes.io/docs/ | ||
|
||
[Service] | ||
ExecStart=/usr/bin/kubelet | ||
Restart=always | ||
StartLimitInterval=0 | ||
RestartSec=10 | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
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,31 @@ | ||
Name: kubelet | ||
Version: OVERRIDE_THIS | ||
Release: 00 | ||
License: ASL 2.0 | ||
Summary: Container Cluster Manager | ||
|
||
URL: https://kubernetes.io | ||
|
||
Requires: iptables >= 1.4.21 | ||
Requires: kubernetes-cni >= 0.5.1 | ||
Requires: socat | ||
Requires: util-linux | ||
Requires: ethtool | ||
Requires: iproute | ||
Requires: ebtables | ||
|
||
%description | ||
The node agent of Kubernetes, the container cluster manager. | ||
|
||
%install | ||
|
||
install -m 755 -d %{buildroot}%{_bindir} | ||
install -m 755 -d %{buildroot}%{_sysconfdir}/systemd/system/ | ||
install -m 755 -d %{buildroot}%{_sysconfdir}/kubernetes/manifests/ | ||
install -p -m 755 -t %{buildroot}%{_bindir} kubelet | ||
install -p -m 755 -t %{buildroot}%{_sysconfdir}/systemd/system/ kubelet.service | ||
|
||
%files | ||
%{_bindir}/kubelet | ||
%{_sysconfdir}/systemd/system/kubelet.service | ||
%{_sysconfdir}/kubernetes/manifests/ |
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,23 @@ | ||
Name: kubernetes-cni | ||
Version: OVERRIDE_THIS | ||
Release: 00 | ||
License: ASL 2.0 | ||
Summary: Container Cluster Manager | ||
|
||
URL: https://kubernetes.io | ||
|
||
%description | ||
Binaries required to provision container networking. | ||
|
||
%prep | ||
tar xzfv cni-*.tar.gz | ||
|
||
%install | ||
|
||
install -m 755 -d %{buildroot}%{_sysconfdir}/cni/net.d/ | ||
install -m 755 -d %{buildroot}/opt/cni | ||
mv bin/ %{buildroot}/opt/cni/ | ||
|
||
%files | ||
/opt/cni | ||
%{_sysconfdir}/cni/net.d/ |
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 |
---|---|---|
|
@@ -40,6 +40,7 @@ package_group( | |
packages = [ | ||
"//build", | ||
"//build/debs", | ||
"//build/rpms", | ||
], | ||
) | ||
|
||
|