2016-11-03 01:58:29 +00:00
|
|
|
package(default_visibility = ["//visibility:public"])
|
|
|
|
|
2019-02-09 00:51:22 +00:00
|
|
|
load("@io_k8s_repo_infra//defs:deb.bzl", "deb_data", "k8s_deb")
|
2019-01-31 23:47:31 +00:00
|
|
|
load("@io_k8s_repo_infra//defs:build.bzl", "release_filegroup")
|
|
|
|
load("@io_k8s_repo_infra//defs:pkg.bzl", "pkg_tar")
|
2019-02-09 00:51:22 +00:00
|
|
|
load(
|
|
|
|
"//build:platforms.bzl",
|
|
|
|
"CLIENT_PLATFORMS",
|
|
|
|
"NODE_PLATFORMS",
|
|
|
|
"SERVER_PLATFORMS",
|
|
|
|
"for_platforms",
|
|
|
|
)
|
2018-12-04 03:37:16 +00:00
|
|
|
load("//build:workspace.bzl", "CNI_VERSION", "CRI_TOOLS_VERSION")
|
2016-11-03 01:58:29 +00:00
|
|
|
|
2017-01-04 22:14:02 +00:00
|
|
|
# We do not include kube-scheduler, kube-controller-manager,
|
|
|
|
# kube-apiserver, and kube-proxy in this list even though we
|
|
|
|
# produce debs for them. We recommend that they be run in docker
|
|
|
|
# images. We use the debs that we produce here to build those
|
|
|
|
# images.
|
2017-04-28 19:38:27 +00:00
|
|
|
release_filegroup(
|
2016-11-03 01:58:29 +00:00
|
|
|
name = "debs",
|
2019-02-09 00:51:22 +00:00
|
|
|
conditioned_srcs = for_platforms(
|
|
|
|
default = [],
|
|
|
|
for_client = [":kubectl-{ARCH}.deb"],
|
|
|
|
for_node = [
|
|
|
|
":cri-tools-{ARCH}.deb",
|
|
|
|
":kubeadm-{ARCH}.deb",
|
|
|
|
":kubelet-{ARCH}.deb",
|
|
|
|
":kubernetes-cni-{ARCH}.deb",
|
|
|
|
],
|
|
|
|
only_os = "linux",
|
|
|
|
),
|
|
|
|
)
|
|
|
|
|
|
|
|
# Create aliases from the non-arch names to the arch-specific names for backwards compatibility
|
|
|
|
alias(
|
|
|
|
name = "kubectl",
|
|
|
|
actual = select(for_platforms(
|
|
|
|
for_client = ":kubectl-{ARCH}",
|
|
|
|
only_os = "linux",
|
|
|
|
)),
|
|
|
|
)
|
|
|
|
|
|
|
|
[alias(
|
|
|
|
name = pkg,
|
|
|
|
actual = select(for_platforms(
|
|
|
|
for_node = ":%s-{ARCH}" % pkg,
|
|
|
|
only_os = "linux",
|
|
|
|
)),
|
|
|
|
) for pkg in [
|
|
|
|
"cri-tools",
|
|
|
|
"kubeadm",
|
|
|
|
"kubelet",
|
|
|
|
"kubernetes-cni",
|
|
|
|
]]
|
2016-11-03 01:58:29 +00:00
|
|
|
|
2017-01-04 22:14:02 +00:00
|
|
|
[deb_data(
|
2019-02-09 00:51:22 +00:00
|
|
|
name = "kubectl",
|
2017-01-04 22:14:02 +00:00
|
|
|
data = [
|
|
|
|
{
|
2019-02-09 00:51:22 +00:00
|
|
|
"files": ["//cmd/kubectl"],
|
2017-01-04 22:14:02 +00:00
|
|
|
"mode": "0755",
|
|
|
|
"dir": "/usr/bin",
|
|
|
|
},
|
|
|
|
],
|
2019-02-09 00:51:22 +00:00
|
|
|
goarch = arch,
|
2019-02-12 00:12:23 +00:00
|
|
|
tags = ["manual"],
|
2019-02-09 00:51:22 +00:00
|
|
|
) for arch in CLIENT_PLATFORMS["linux"]]
|
2017-01-04 22:14:02 +00:00
|
|
|
|
2019-02-09 00:51:22 +00:00
|
|
|
[[deb_data(
|
|
|
|
name = binary,
|
2016-11-03 01:58:29 +00:00
|
|
|
data = [
|
|
|
|
{
|
2019-02-09 00:51:22 +00:00
|
|
|
"files": ["//cmd/" + binary],
|
2016-11-03 01:58:29 +00:00
|
|
|
"mode": "0755",
|
|
|
|
"dir": "/usr/bin",
|
|
|
|
},
|
|
|
|
],
|
2019-02-09 00:51:22 +00:00
|
|
|
goarch = arch,
|
2019-02-12 00:12:23 +00:00
|
|
|
tags = ["manual"],
|
2019-02-09 00:51:22 +00:00
|
|
|
) for binary in [
|
|
|
|
"cloud-controller-manager",
|
|
|
|
"kube-apiserver",
|
|
|
|
"kube-controller-manager",
|
|
|
|
"kube-proxy",
|
|
|
|
"kube-scheduler",
|
|
|
|
]] for arch in SERVER_PLATFORMS["linux"]]
|
2016-11-03 01:58:29 +00:00
|
|
|
|
2019-02-09 00:51:22 +00:00
|
|
|
[deb_data(
|
2016-11-03 01:58:29 +00:00
|
|
|
name = "kubelet",
|
|
|
|
data = [
|
|
|
|
{
|
|
|
|
"files": ["//cmd/kubelet"],
|
|
|
|
"mode": "0755",
|
|
|
|
"dir": "/usr/bin",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"files": ["kubelet.service"],
|
|
|
|
"mode": "644",
|
|
|
|
"dir": "/lib/systemd/system",
|
|
|
|
},
|
|
|
|
],
|
2019-02-09 00:51:22 +00:00
|
|
|
goarch = arch,
|
2019-02-12 00:12:23 +00:00
|
|
|
tags = ["manual"],
|
2019-02-09 00:51:22 +00:00
|
|
|
) for arch in NODE_PLATFORMS["linux"]]
|
2016-11-03 01:58:29 +00:00
|
|
|
|
2019-02-09 00:51:22 +00:00
|
|
|
[deb_data(
|
2016-11-03 01:58:29 +00:00
|
|
|
name = "kubeadm",
|
|
|
|
data = [
|
|
|
|
{
|
|
|
|
"files": ["//cmd/kubeadm"],
|
|
|
|
"mode": "0755",
|
|
|
|
"dir": "/usr/bin",
|
|
|
|
},
|
|
|
|
{
|
2017-09-27 21:27:43 +00:00
|
|
|
"files": ["10-kubeadm.conf"],
|
2016-11-03 01:58:29 +00:00
|
|
|
"mode": "644",
|
|
|
|
"dir": "/etc/systemd/system/kubelet.service.d",
|
|
|
|
},
|
2018-10-25 15:57:24 +00:00
|
|
|
{
|
|
|
|
"files": ["kubeadm.conf"],
|
|
|
|
"mode": "644",
|
|
|
|
"dir": "/usr/lib/modules-load.d",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"files": ["50-kubeadm.conf"],
|
|
|
|
"mode": "644",
|
|
|
|
"dir": "/etc/sysctl.d",
|
|
|
|
},
|
2016-11-03 01:58:29 +00:00
|
|
|
],
|
2019-02-09 00:51:22 +00:00
|
|
|
goarch = arch,
|
2019-02-12 00:12:23 +00:00
|
|
|
tags = ["manual"],
|
2019-02-09 00:51:22 +00:00
|
|
|
) for arch in NODE_PLATFORMS["linux"]]
|
2016-11-03 01:58:29 +00:00
|
|
|
|
2019-02-09 00:51:22 +00:00
|
|
|
[pkg_tar(
|
|
|
|
name = "kubernetes-cni-data-%s" % goarch,
|
2017-10-25 15:17:38 +00:00
|
|
|
package_dir = "/opt/cni/bin",
|
2019-02-12 00:12:23 +00:00
|
|
|
tags = ["manual"],
|
2019-02-09 00:51:22 +00:00
|
|
|
deps = ["@kubernetes_cni_%s//file" % goarch],
|
|
|
|
) for goarch in NODE_PLATFORMS["linux"]]
|
2016-11-03 01:58:29 +00:00
|
|
|
|
2019-02-09 00:51:22 +00:00
|
|
|
[pkg_tar(
|
|
|
|
name = "cri-tools-data-%s" % goarch,
|
2018-06-06 13:35:25 +00:00
|
|
|
package_dir = "/usr/bin",
|
2019-02-12 00:12:23 +00:00
|
|
|
tags = ["manual"],
|
2019-02-09 00:51:22 +00:00
|
|
|
deps = ["@cri_tools_%s//file" % goarch],
|
|
|
|
) for goarch in NODE_PLATFORMS["linux"]]
|
2018-06-06 13:35:25 +00:00
|
|
|
|
2019-02-09 00:51:22 +00:00
|
|
|
[k8s_deb(
|
2017-05-02 19:01:13 +00:00
|
|
|
name = "cloud-controller-manager",
|
|
|
|
description = "Kubernetes Cloud Controller Manager",
|
2019-02-09 00:51:22 +00:00
|
|
|
goarch = arch,
|
2019-02-12 00:12:23 +00:00
|
|
|
tags = ["manual"],
|
2017-08-30 13:44:21 +00:00
|
|
|
version_file = "//build:os_package_version",
|
2019-02-09 00:51:22 +00:00
|
|
|
) for arch in SERVER_PLATFORMS["linux"]]
|
2017-05-02 19:01:13 +00:00
|
|
|
|
2019-02-09 00:51:22 +00:00
|
|
|
[k8s_deb(
|
2016-11-03 01:58:29 +00:00
|
|
|
name = "kubectl",
|
|
|
|
description = """Kubernetes Command Line Tool
|
|
|
|
The Kubernetes command line tool for interacting with the Kubernetes API.
|
|
|
|
""",
|
2019-02-09 00:51:22 +00:00
|
|
|
goarch = arch,
|
2019-02-12 00:12:23 +00:00
|
|
|
tags = ["manual"],
|
2017-08-30 13:44:21 +00:00
|
|
|
version_file = "//build:os_package_version",
|
2019-02-09 00:51:22 +00:00
|
|
|
) for arch in CLIENT_PLATFORMS["linux"]]
|
2016-11-03 01:58:29 +00:00
|
|
|
|
2019-02-09 00:51:22 +00:00
|
|
|
[k8s_deb(
|
2017-01-04 22:14:02 +00:00
|
|
|
name = "kube-apiserver",
|
|
|
|
description = "Kubernetes API Server",
|
2019-02-09 00:51:22 +00:00
|
|
|
goarch = arch,
|
2019-02-12 00:12:23 +00:00
|
|
|
tags = ["manual"],
|
2017-08-30 13:44:21 +00:00
|
|
|
version_file = "//build:os_package_version",
|
2019-02-09 00:51:22 +00:00
|
|
|
) for arch in SERVER_PLATFORMS["linux"]]
|
2017-01-04 22:14:02 +00:00
|
|
|
|
2019-02-09 00:51:22 +00:00
|
|
|
[k8s_deb(
|
2017-01-04 22:14:02 +00:00
|
|
|
name = "kube-controller-manager",
|
|
|
|
description = "Kubernetes Controller Manager",
|
2019-02-09 00:51:22 +00:00
|
|
|
goarch = arch,
|
2019-02-12 00:12:23 +00:00
|
|
|
tags = ["manual"],
|
2017-08-30 13:44:21 +00:00
|
|
|
version_file = "//build:os_package_version",
|
2019-02-09 00:51:22 +00:00
|
|
|
) for arch in SERVER_PLATFORMS["linux"]]
|
2017-01-04 22:14:02 +00:00
|
|
|
|
2019-02-09 00:51:22 +00:00
|
|
|
[k8s_deb(
|
2017-01-04 22:14:02 +00:00
|
|
|
name = "kube-scheduler",
|
|
|
|
description = "Kubernetes Scheduler",
|
2019-02-09 00:51:22 +00:00
|
|
|
goarch = arch,
|
2019-02-12 00:12:23 +00:00
|
|
|
tags = ["manual"],
|
2017-08-30 13:44:21 +00:00
|
|
|
version_file = "//build:os_package_version",
|
2019-02-09 00:51:22 +00:00
|
|
|
) for arch in SERVER_PLATFORMS["linux"]]
|
2017-01-04 22:14:02 +00:00
|
|
|
|
2019-02-09 00:51:22 +00:00
|
|
|
[k8s_deb(
|
2017-01-04 22:14:02 +00:00
|
|
|
name = "kube-proxy",
|
|
|
|
depends = [
|
|
|
|
"iptables (>= 1.4.21)",
|
|
|
|
"iproute2",
|
|
|
|
],
|
|
|
|
description = "Kubernetes Service Proxy",
|
2019-02-09 00:51:22 +00:00
|
|
|
goarch = arch,
|
2019-02-12 00:12:23 +00:00
|
|
|
tags = ["manual"],
|
2017-08-30 13:44:21 +00:00
|
|
|
version_file = "//build:os_package_version",
|
2019-02-09 00:51:22 +00:00
|
|
|
) for arch in NODE_PLATFORMS["linux"]]
|
2017-01-04 22:14:02 +00:00
|
|
|
|
2019-02-09 00:51:22 +00:00
|
|
|
[k8s_deb(
|
2016-11-03 01:58:29 +00:00
|
|
|
name = "kubelet",
|
|
|
|
depends = [
|
2018-11-28 21:42:26 +00:00
|
|
|
"conntrack",
|
|
|
|
"ebtables",
|
|
|
|
"ethtool",
|
|
|
|
"iproute2",
|
2016-11-03 01:58:29 +00:00
|
|
|
"iptables (>= 1.4.21)",
|
2018-12-04 03:37:16 +00:00
|
|
|
"kubernetes-cni (>= %s)" % CNI_VERSION,
|
2018-11-28 21:42:26 +00:00
|
|
|
"mount",
|
2016-11-03 01:58:29 +00:00
|
|
|
"socat",
|
|
|
|
"util-linux",
|
|
|
|
],
|
|
|
|
description = """Kubernetes Node Agent
|
|
|
|
The node agent of Kubernetes, the container cluster manager
|
|
|
|
""",
|
2019-02-09 00:51:22 +00:00
|
|
|
goarch = arch,
|
2019-02-12 00:12:23 +00:00
|
|
|
tags = ["manual"],
|
2017-08-30 13:44:21 +00:00
|
|
|
version_file = "//build:os_package_version",
|
2019-02-09 00:51:22 +00:00
|
|
|
) for arch in NODE_PLATFORMS["linux"]]
|
2016-11-03 01:58:29 +00:00
|
|
|
|
2019-02-09 00:51:22 +00:00
|
|
|
[k8s_deb(
|
2016-11-03 01:58:29 +00:00
|
|
|
name = "kubeadm",
|
|
|
|
depends = [
|
2017-09-27 21:27:43 +00:00
|
|
|
"kubelet (>= 1.8.0)",
|
|
|
|
"kubectl (>= 1.8.0)",
|
2018-12-04 03:37:16 +00:00
|
|
|
"kubernetes-cni (>= %s)" % CNI_VERSION,
|
2018-06-21 13:50:06 +00:00
|
|
|
"cri-tools (>= 1.11.0)",
|
2016-11-03 01:58:29 +00:00
|
|
|
],
|
|
|
|
description = """Kubernetes Cluster Bootstrapping Tool
|
|
|
|
The Kubernetes command line tool for bootstrapping a Kubernetes cluster.
|
|
|
|
""",
|
2019-02-09 00:51:22 +00:00
|
|
|
goarch = arch,
|
2018-06-27 20:59:55 +00:00
|
|
|
postinst = "postinst",
|
2019-02-12 00:12:23 +00:00
|
|
|
tags = ["manual"],
|
2017-08-30 13:44:21 +00:00
|
|
|
version_file = "//build:os_package_version",
|
2019-02-09 00:51:22 +00:00
|
|
|
) for arch in NODE_PLATFORMS["linux"]]
|
2016-11-03 01:58:29 +00:00
|
|
|
|
2019-02-09 00:51:22 +00:00
|
|
|
[k8s_deb(
|
2016-11-03 01:58:29 +00:00
|
|
|
name = "kubernetes-cni",
|
|
|
|
description = """Kubernetes Packaging of CNI
|
|
|
|
The Container Networking Interface tools for provisioning container networks.
|
|
|
|
""",
|
2019-02-09 00:51:22 +00:00
|
|
|
goarch = arch,
|
2019-02-12 00:12:23 +00:00
|
|
|
tags = ["manual"],
|
2018-12-04 03:37:16 +00:00
|
|
|
version = CNI_VERSION,
|
2019-02-09 00:51:22 +00:00
|
|
|
) for arch in NODE_PLATFORMS["linux"]]
|
2017-01-03 22:40:41 +00:00
|
|
|
|
2019-02-09 00:51:22 +00:00
|
|
|
[k8s_deb(
|
2018-06-18 18:48:34 +00:00
|
|
|
name = "cri-tools",
|
2018-06-06 13:35:25 +00:00
|
|
|
description = """Container Runtime Interface tools (crictl)""",
|
2019-02-09 00:51:22 +00:00
|
|
|
goarch = arch,
|
2019-02-12 00:12:23 +00:00
|
|
|
tags = ["manual"],
|
2018-06-06 13:35:25 +00:00
|
|
|
version = CRI_TOOLS_VERSION,
|
2019-02-09 00:51:22 +00:00
|
|
|
) for arch in NODE_PLATFORMS["linux"]]
|
2018-06-06 13:35:25 +00:00
|
|
|
|
2017-01-03 22:40:41 +00:00
|
|
|
filegroup(
|
|
|
|
name = "package-srcs",
|
|
|
|
srcs = glob(["**"]),
|
|
|
|
tags = ["automanaged"],
|
|
|
|
visibility = ["//visibility:private"],
|
|
|
|
)
|
|
|
|
|
|
|
|
filegroup(
|
|
|
|
name = "all-srcs",
|
|
|
|
srcs = [":package-srcs"],
|
|
|
|
tags = ["automanaged"],
|
|
|
|
)
|