2018-07-30 14:04:47 +00:00
|
|
|
package(default_visibility = ["//k8s:__subpackages__"])
|
|
|
|
|
|
|
|
load("@io_bazel_rules_k8s//k8s:objects.bzl", "k8s_objects")
|
|
|
|
load("@k8s_deploy//:defaults.bzl", "k8s_deploy")
|
2018-11-28 05:27:21 +00:00
|
|
|
load("@k8s_ingress//:defaults.bzl", "k8s_ingress")
|
|
|
|
load("@k8s_namespace//:defaults.bzl", "k8s_namespace")
|
2018-07-30 14:04:47 +00:00
|
|
|
load("@k8s_secret//:defaults.bzl", "k8s_secret")
|
2018-11-28 05:27:21 +00:00
|
|
|
load("@k8s_service//:defaults.bzl", "k8s_service")
|
2018-07-30 14:04:47 +00:00
|
|
|
|
|
|
|
k8s_objects(
|
|
|
|
name = "everything",
|
|
|
|
objects = [
|
2018-11-28 05:27:21 +00:00
|
|
|
":namespace", # Must be first
|
|
|
|
":deployments",
|
|
|
|
":ingress",
|
2018-07-30 14:04:47 +00:00
|
|
|
":secrets",
|
|
|
|
":services",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2018-11-28 05:27:21 +00:00
|
|
|
_NAMESPACE = "pow"
|
|
|
|
|
2018-07-30 14:04:47 +00:00
|
|
|
_deployments = [
|
|
|
|
"bootnode",
|
|
|
|
"ethstats",
|
2018-11-28 05:27:21 +00:00
|
|
|
"faucet",
|
2018-07-30 14:04:47 +00:00
|
|
|
"miners",
|
|
|
|
"nodes",
|
|
|
|
]
|
|
|
|
|
|
|
|
_services = [
|
|
|
|
"bootnode",
|
|
|
|
"ethstats",
|
2018-11-28 05:27:21 +00:00
|
|
|
"faucet",
|
2018-07-30 14:04:47 +00:00
|
|
|
"nodes",
|
|
|
|
]
|
|
|
|
|
|
|
|
_secrets = [
|
|
|
|
"bootnode",
|
|
|
|
"ethstats",
|
2018-11-28 05:27:21 +00:00
|
|
|
"faucet",
|
2018-07-30 14:04:47 +00:00
|
|
|
"genesis",
|
|
|
|
]
|
|
|
|
|
2018-11-28 05:27:21 +00:00
|
|
|
k8s_ingress(
|
|
|
|
name = "ingress",
|
|
|
|
template = "ingress.yaml",
|
|
|
|
namespace = _NAMESPACE,
|
|
|
|
)
|
|
|
|
|
|
|
|
k8s_namespace(
|
|
|
|
name = "namespace",
|
|
|
|
template = "namespace.yaml",
|
|
|
|
)
|
|
|
|
|
2018-07-30 14:04:47 +00:00
|
|
|
k8s_objects(
|
|
|
|
name = "deployments",
|
|
|
|
objects = [":" + name + ".deploy" for name in _deployments],
|
|
|
|
)
|
|
|
|
|
|
|
|
[k8s_deploy(
|
|
|
|
name = name + ".deploy",
|
|
|
|
template = name + ".deploy.yaml",
|
2018-11-28 05:27:21 +00:00
|
|
|
namespace = _NAMESPACE,
|
2018-07-30 14:04:47 +00:00
|
|
|
) for name in _deployments]
|
|
|
|
|
|
|
|
k8s_objects(
|
|
|
|
name = "secrets",
|
|
|
|
objects = [":" + name + ".secret" for name in _secrets],
|
|
|
|
)
|
|
|
|
|
|
|
|
[k8s_secret(
|
|
|
|
name = name + ".secret",
|
|
|
|
template = name + ".secret.yaml",
|
2018-11-28 05:27:21 +00:00
|
|
|
namespace = _NAMESPACE,
|
2018-07-30 14:04:47 +00:00
|
|
|
) for name in _secrets]
|
|
|
|
|
|
|
|
k8s_objects(
|
|
|
|
name = "services",
|
|
|
|
objects = [":" + name + ".service" for name in _services],
|
|
|
|
)
|
|
|
|
|
|
|
|
[k8s_service(
|
|
|
|
name = name + ".service",
|
|
|
|
template = name + ".service.yaml",
|
2018-11-28 05:27:21 +00:00
|
|
|
namespace = _NAMESPACE,
|
2018-07-30 14:04:47 +00:00
|
|
|
) for name in _services]
|