mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 04:06:03 +00:00
Merge pull request #53163 from kad/bazel-pkgs
Automatic merge from submit-queue (batch tested with PRs 44596, 52708, 53163, 53167, 52692). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Improve deb and rpm packaging in bazel build **What this PR does / why we need it**: - kubernetes-cni package now has proper version (0.5.1) - Synchronize post-1.8 version of 10-kubeadm.conf file from release repository. - Fix dependencies - Improve descriptions in produced packages **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes # **Special notes for your reviewer**: This PR will be safe to cherry-pick to 1.8 branch. After that we will be able to generate from bazel automatically usable packages for both 1.8 and master branch out of bazel builds. cc @ixdy @mikedanese @luxas **Release note**: ```release-note - Improved generation of deb and rpm packages in bazel build ```
This commit is contained in:
commit
703b0f4b05
@ -86,6 +86,12 @@ grep ^STABLE_BUILD_SCM_REVISION bazel-out/stable-status.txt \
|
|||||||
stamp = 1,
|
stamp = 1,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
genrule(
|
||||||
|
name = "cni_package_version",
|
||||||
|
outs = ["cni_version"],
|
||||||
|
cmd = "echo 0.5.1 >$@",
|
||||||
|
)
|
||||||
|
|
||||||
release_filegroup(
|
release_filegroup(
|
||||||
name = "docker-artifacts",
|
name = "docker-artifacts",
|
||||||
srcs = [":%s.tar" % binary for binary in DOCKERIZED_BINARIES.keys()] +
|
srcs = [":%s.tar" % binary for binary in DOCKERIZED_BINARIES.keys()] +
|
||||||
|
@ -4,7 +4,10 @@ Environment="KUBELET_SYSTEM_PODS_ARGS=--pod-manifest-path=/etc/kubernetes/manife
|
|||||||
Environment="KUBELET_NETWORK_ARGS=--network-plugin=cni --cni-conf-dir=/etc/cni/net.d --cni-bin-dir=/opt/cni/bin"
|
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_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_AUTHZ_ARGS=--authorization-mode=Webhook --client-ca-file=/etc/kubernetes/pki/ca.crt"
|
||||||
|
# Value should match Docker daemon settings.
|
||||||
|
# Defaults are "cgroupfs" for Debian/Ubuntu/OpenSUSE and "systemd" for Fedora/CentOS/RHEL
|
||||||
|
Environment="KUBELET_CGROUP_ARGS=--cgroup-driver=cgroupfs"
|
||||||
Environment="KUBELET_CADVISOR_ARGS=--cadvisor-port=0"
|
Environment="KUBELET_CADVISOR_ARGS=--cadvisor-port=0"
|
||||||
Environment="KUBELET_CERTIFICATE_ARGS=--rotate-certificates=true"
|
Environment="KUBELET_CERTIFICATE_ARGS=--rotate-certificates=true"
|
||||||
ExecStart=
|
ExecStart=
|
||||||
ExecStart=/usr/bin/kubelet $KUBELET_KUBECONFIG_ARGS $KUBELET_SYSTEM_PODS_ARGS $KUBELET_NETWORK_ARGS $KUBELET_DNS_ARGS $KUBELET_AUTHZ_ARGS $KUBELET_CADVISOR_ARGS $KUBELET_CERTIFICATE_ARGS $KUBELET_EXTRA_ARGS
|
ExecStart=/usr/bin/kubelet $KUBELET_KUBECONFIG_ARGS $KUBELET_SYSTEM_PODS_ARGS $KUBELET_NETWORK_ARGS $KUBELET_DNS_ARGS $KUBELET_AUTHZ_ARGS $KUBELET_CGROUP_ARGS $KUBELET_CADVISOR_ARGS $KUBELET_CERTIFICATE_ARGS $KUBELET_EXTRA_ARGS
|
@ -73,7 +73,7 @@ deb_data(
|
|||||||
"dir": "/usr/bin",
|
"dir": "/usr/bin",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"files": ["kubeadm-10.conf"],
|
"files": ["10-kubeadm.conf"],
|
||||||
"mode": "644",
|
"mode": "644",
|
||||||
"dir": "/etc/systemd/system/kubelet.service.d",
|
"dir": "/etc/systemd/system/kubelet.service.d",
|
||||||
},
|
},
|
||||||
@ -132,7 +132,7 @@ k8s_deb(
|
|||||||
name = "kubelet",
|
name = "kubelet",
|
||||||
depends = [
|
depends = [
|
||||||
"iptables (>= 1.4.21)",
|
"iptables (>= 1.4.21)",
|
||||||
"kubernetes-cni (>= 0.3.0.1)",
|
"kubernetes-cni (>= 0.5.1)",
|
||||||
"iproute2",
|
"iproute2",
|
||||||
"socat",
|
"socat",
|
||||||
"util-linux",
|
"util-linux",
|
||||||
@ -149,8 +149,9 @@ The node agent of Kubernetes, the container cluster manager
|
|||||||
k8s_deb(
|
k8s_deb(
|
||||||
name = "kubeadm",
|
name = "kubeadm",
|
||||||
depends = [
|
depends = [
|
||||||
"kubelet (>= 1.4.0)",
|
"kubelet (>= 1.8.0)",
|
||||||
"kubectl (>= 1.4.0)",
|
"kubectl (>= 1.8.0)",
|
||||||
|
"kubernetes-cni (>= 0.5.1)",
|
||||||
],
|
],
|
||||||
description = """Kubernetes Cluster Bootstrapping Tool
|
description = """Kubernetes Cluster Bootstrapping Tool
|
||||||
The Kubernetes command line tool for bootstrapping a Kubernetes cluster.
|
The Kubernetes command line tool for bootstrapping a Kubernetes cluster.
|
||||||
@ -163,7 +164,7 @@ k8s_deb(
|
|||||||
description = """Kubernetes Packaging of CNI
|
description = """Kubernetes Packaging of CNI
|
||||||
The Container Networking Interface tools for provisioning container networks.
|
The Container Networking Interface tools for provisioning container networks.
|
||||||
""",
|
""",
|
||||||
version_file = "//build:os_package_version",
|
version_file = "//build:cni_package_version",
|
||||||
)
|
)
|
||||||
|
|
||||||
filegroup(
|
filegroup(
|
||||||
|
@ -4,6 +4,10 @@ Environment="KUBELET_SYSTEM_PODS_ARGS=--pod-manifest-path=/etc/kubernetes/manife
|
|||||||
Environment="KUBELET_NETWORK_ARGS=--network-plugin=cni --cni-conf-dir=/etc/cni/net.d --cni-bin-dir=/opt/cni/bin"
|
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_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_AUTHZ_ARGS=--authorization-mode=Webhook --client-ca-file=/etc/kubernetes/pki/ca.crt"
|
||||||
|
# Value should match Docker daemon settings.
|
||||||
|
# Defaults are "cgroupfs" for Debian/Ubuntu/OpenSUSE and "systemd" for Fedora/CentOS/RHEL
|
||||||
Environment="KUBELET_CGROUP_ARGS=--cgroup-driver=systemd"
|
Environment="KUBELET_CGROUP_ARGS=--cgroup-driver=systemd"
|
||||||
|
Environment="KUBELET_CADVISOR_ARGS=--cadvisor-port=0"
|
||||||
|
Environment="KUBELET_CERTIFICATE_ARGS=--rotate-certificates=true"
|
||||||
ExecStart=
|
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
|
ExecStart=/usr/bin/kubelet $KUBELET_KUBECONFIG_ARGS $KUBELET_SYSTEM_PODS_ARGS $KUBELET_NETWORK_ARGS $KUBELET_DNS_ARGS $KUBELET_AUTHZ_ARGS $KUBELET_CGROUP_ARGS $KUBELET_CADVISOR_ARGS $KUBELET_CERTIFICATE_ARGS $KUBELET_EXTRA_ARGS
|
||||||
|
@ -45,7 +45,7 @@ pkg_rpm(
|
|||||||
"@kubernetes_cni//file",
|
"@kubernetes_cni//file",
|
||||||
],
|
],
|
||||||
spec_file = "kubernetes-cni.spec",
|
spec_file = "kubernetes-cni.spec",
|
||||||
version_file = "//build:os_package_version",
|
version_file = "//build:cni_package_version",
|
||||||
)
|
)
|
||||||
|
|
||||||
filegroup(
|
filegroup(
|
||||||
|
@ -2,15 +2,15 @@ Name: kubeadm
|
|||||||
Version: OVERRIDE_THIS
|
Version: OVERRIDE_THIS
|
||||||
Release: 00
|
Release: 00
|
||||||
License: ASL 2.0
|
License: ASL 2.0
|
||||||
Summary: Container Cluster Manager
|
Summary: Container Cluster Manager - Kubernetes Cluster Bootstrapping Tool
|
||||||
Requires: kubelet >= %{version}
|
Requires: kubelet >= 1.8.0
|
||||||
Requires: kubectl >= %{version}
|
Requires: kubectl >= 1.8.0
|
||||||
Requires: kubernetes-cni
|
Requires: kubernetes-cni >= 0.5.1
|
||||||
|
|
||||||
URL: https://kubernetes.io
|
URL: https://kubernetes.io
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Command-line utility for administering a Kubernetes cluster.
|
Command-line utility for deploying a Kubernetes cluster.
|
||||||
|
|
||||||
%install
|
%install
|
||||||
install -m 755 -d %{buildroot}%{_bindir}
|
install -m 755 -d %{buildroot}%{_bindir}
|
||||||
|
@ -2,7 +2,7 @@ Name: kubectl
|
|||||||
Version: OVERRIDE_THIS
|
Version: OVERRIDE_THIS
|
||||||
Release: 00
|
Release: 00
|
||||||
License: ASL 2.0
|
License: ASL 2.0
|
||||||
Summary: Container Cluster Manager
|
Summary: Container Cluster Manager - Kubernetes client tools
|
||||||
|
|
||||||
URL: https://kubernetes.io
|
URL: https://kubernetes.io
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@ Name: kubelet
|
|||||||
Version: OVERRIDE_THIS
|
Version: OVERRIDE_THIS
|
||||||
Release: 00
|
Release: 00
|
||||||
License: ASL 2.0
|
License: ASL 2.0
|
||||||
Summary: Container Cluster Manager
|
Summary: Container Cluster Manager - Kubernetes Node Agent
|
||||||
|
|
||||||
URL: https://kubernetes.io
|
URL: https://kubernetes.io
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@ Name: kubernetes-cni
|
|||||||
Version: OVERRIDE_THIS
|
Version: OVERRIDE_THIS
|
||||||
Release: 00
|
Release: 00
|
||||||
License: ASL 2.0
|
License: ASL 2.0
|
||||||
Summary: Container Cluster Manager
|
Summary: Container Cluster Manager - CNI plugins
|
||||||
|
|
||||||
URL: https://kubernetes.io
|
URL: https://kubernetes.io
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user