blob: ff7f64b2874d131e3ab6cbe791e07d2d80782cd0 [file] [log] [blame]
Sergiusz Bazanskib13b7ff2019-08-29 20:12:24 +02001load("@io_bazel_rules_docker//container:container.bzl", "container_image", "container_layer", "container_push")
2load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
3
4go_library(
Serge Bazanski97b5cd72023-07-28 17:14:50 +00005 name = "prodvider_lib",
Sergiusz Bazanskib13b7ff2019-08-29 20:12:24 +02006 srcs = [
7 "certs.go",
Serge Bazanski02e15982021-03-17 22:39:00 +00008 "crdb.go",
Serge Bazanskif3312ef2020-08-01 17:15:52 +02009 "hspki.go",
Sergiusz Bazanskib13b7ff2019-08-29 20:12:24 +020010 "kubernetes.go",
11 "main.go",
12 "service.go",
13 ],
14 importpath = "code.hackerspace.pl/hscloud/cluster/prodvider",
15 visibility = ["//visibility:private"],
16 deps = [
Serge Bazanski97b5cd72023-07-28 17:14:50 +000017 "//cluster/prodvider/proto",
18 "@com_github_cloudflare_cfssl//config",
19 "@com_github_cloudflare_cfssl//csr",
20 "@com_github_cloudflare_cfssl//helpers",
21 "@com_github_cloudflare_cfssl//signer",
22 "@com_github_cloudflare_cfssl//signer/local",
23 "@com_github_go_ldap_ldap_v3//:ldap",
24 "@com_github_golang_glog//:glog",
25 "@io_k8s_api//core/v1:core",
26 "@io_k8s_api//rbac/v1:rbac",
27 "@io_k8s_apimachinery//pkg/api/errors",
28 "@io_k8s_apimachinery//pkg/apis/meta/v1:meta",
29 "@io_k8s_client_go//kubernetes",
30 "@io_k8s_client_go//rest",
Sergiusz Bazanskib13b7ff2019-08-29 20:12:24 +020031 "@org_golang_google_grpc//:go_default_library",
Serge Bazanski97b5cd72023-07-28 17:14:50 +000032 "@org_golang_google_grpc//codes",
33 "@org_golang_google_grpc//credentials",
34 "@org_golang_google_grpc//status",
Sergiusz Bazanskib13b7ff2019-08-29 20:12:24 +020035 ],
36)
37
38go_binary(
39 name = "prodvider",
Serge Bazanski97b5cd72023-07-28 17:14:50 +000040 embed = [":prodvider_lib"],
Sergiusz Bazanskib13b7ff2019-08-29 20:12:24 +020041 visibility = ["//visibility:public"],
42)
43
44container_layer(
45 name = "layer_bin",
Serge Bazanski97b5cd72023-07-28 17:14:50 +000046 directory = "/cluster/prodvider/",
Sergiusz Bazanskib13b7ff2019-08-29 20:12:24 +020047 files = [
48 ":prodvider",
49 ],
Sergiusz Bazanskib13b7ff2019-08-29 20:12:24 +020050)
51
52container_image(
53 name = "runtime",
54 base = "@prodimage-bionic//image",
55 layers = [
56 ":layer_bin",
57 ],
58)
59
60container_push(
61 name = "push",
Sergiusz Bazanskib13b7ff2019-08-29 20:12:24 +020062 format = "Docker",
Serge Bazanski97b5cd72023-07-28 17:14:50 +000063 image = ":runtime",
Sergiusz Bazanskib13b7ff2019-08-29 20:12:24 +020064 registry = "registry.k0.hswaw.net",
Serge Bazanskif3312ef2020-08-01 17:15:52 +020065 repository = "q3k/prodvider",
Serge Bazanski073d8502023-04-01 11:17:17 +000066 tag = "1680303245",
Sergiusz Bazanskib13b7ff2019-08-29 20:12:24 +020067)