prysm-pulse/k8s/beacon-chain/BUILD.bazel

107 lines
2.2 KiB
Python
Raw Normal View History

2018-08-14 16:16:21 +00:00
package(default_visibility = ["//k8s:__subpackages__"])
load("@io_bazel_rules_k8s//k8s:objects.bzl", "k8s_objects")
load("@k8s_configmap//:defaults.bzl", "k8s_configmap")
2018-08-14 16:16:21 +00:00
load("@k8s_deploy//:defaults.bzl", "k8s_deploy")
load("@k8s_job//:defaults.bzl", "k8s_job")
load("@k8s_namespace//:defaults.bzl", "k8s_namespace")
2018-08-14 16:16:21 +00:00
load("@k8s_service//:defaults.bzl", "k8s_service")
load("@k8s_service_account//:defaults.bzl", "k8s_service_account")
2018-08-14 16:16:21 +00:00
k8s_objects(
name = "everything",
objects = [
":namespace", # Must be first
":configs",
2018-08-14 16:16:21 +00:00
":deployments",
":services",
":jobs",
2018-08-14 16:16:21 +00:00
],
)
_NAMESPACE = "beacon-chain"
_configs = [
"beacon-config",
]
2018-08-14 16:16:21 +00:00
_deployments = [
"beacon-chain",
"bootnode",
"relay",
]
_jobs = [
"deploydepositcontract",
2018-08-14 16:16:21 +00:00
]
_services = [
"beacon-chain",
"bootnode",
"relay",
2018-08-14 16:16:21 +00:00
]
_service_accounts = [
"deploydepositcontract",
]
k8s_objects(
name = "configs",
objects = [":" + name + ".config" for name in _configs],
)
[k8s_configmap(
name = name + ".config",
template = name + ".config.yaml",
namespace = _NAMESPACE,
) for name in _configs]
2018-08-14 16:16:21 +00:00
k8s_objects(
name = "deployments",
objects = [":" + name + ".deploy" for name in _deployments],
)
[k8s_deploy(
name = name + ".deploy",
template = name + ".deploy.yaml",
namespace = _NAMESPACE,
2018-08-14 16:16:21 +00:00
) for name in _deployments]
k8s_objects(
name = "jobs",
objects = [":" + name + ".job" for name in _jobs],
)
[k8s_job(
name = name + ".job",
template = name + ".job.yaml",
namespace = _NAMESPACE,
) for name in _jobs]
2018-08-14 16:16:21 +00:00
k8s_objects(
name = "services",
objects = [":" + name + ".service" for name in _services],
)
[k8s_service(
name = name + ".service",
template = name + ".service.yaml",
namespace = _NAMESPACE,
2018-08-14 16:16:21 +00:00
) for name in _services]
k8s_objects(
name = "service_accounts",
objects = [":" + name + ".service_account" for name in _service_accounts],
)
[k8s_service_account(
name = name + ".service_account",
template = name + ".serviceaccount.yaml",
namespace = _NAMESPACE,
) for name in _service_accounts]
k8s_namespace(
name = "namespace",
template = "namespace.yaml",
)