Sergiusz Bazanski | b13b7ff | 2019-08-29 20:12:24 +0200 | [diff] [blame] | 1 | load("@io_bazel_rules_docker//container:container.bzl", "container_image", "container_layer", "container_push") |
| 2 | load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library") |
| 3 | |
| 4 | go_library( |
Serge Bazanski | 97b5cd7 | 2023-07-28 17:14:50 +0000 | [diff] [blame] | 5 | name = "prodvider_lib", |
Sergiusz Bazanski | b13b7ff | 2019-08-29 20:12:24 +0200 | [diff] [blame] | 6 | srcs = [ |
| 7 | "certs.go", |
Serge Bazanski | 02e1598 | 2021-03-17 22:39:00 +0000 | [diff] [blame] | 8 | "crdb.go", |
Serge Bazanski | f3312ef | 2020-08-01 17:15:52 +0200 | [diff] [blame] | 9 | "hspki.go", |
Sergiusz Bazanski | b13b7ff | 2019-08-29 20:12:24 +0200 | [diff] [blame] | 10 | "kubernetes.go", |
| 11 | "main.go", |
| 12 | "service.go", |
| 13 | ], |
| 14 | importpath = "code.hackerspace.pl/hscloud/cluster/prodvider", |
| 15 | visibility = ["//visibility:private"], |
| 16 | deps = [ |
Serge Bazanski | 97b5cd7 | 2023-07-28 17:14:50 +0000 | [diff] [blame] | 17 | "//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 Bazanski | b13b7ff | 2019-08-29 20:12:24 +0200 | [diff] [blame] | 31 | "@org_golang_google_grpc//:go_default_library", |
Serge Bazanski | 97b5cd7 | 2023-07-28 17:14:50 +0000 | [diff] [blame] | 32 | "@org_golang_google_grpc//codes", |
| 33 | "@org_golang_google_grpc//credentials", |
| 34 | "@org_golang_google_grpc//status", |
Sergiusz Bazanski | b13b7ff | 2019-08-29 20:12:24 +0200 | [diff] [blame] | 35 | ], |
| 36 | ) |
| 37 | |
| 38 | go_binary( |
| 39 | name = "prodvider", |
Serge Bazanski | 97b5cd7 | 2023-07-28 17:14:50 +0000 | [diff] [blame] | 40 | embed = [":prodvider_lib"], |
Sergiusz Bazanski | b13b7ff | 2019-08-29 20:12:24 +0200 | [diff] [blame] | 41 | visibility = ["//visibility:public"], |
| 42 | ) |
| 43 | |
| 44 | container_layer( |
| 45 | name = "layer_bin", |
Serge Bazanski | 97b5cd7 | 2023-07-28 17:14:50 +0000 | [diff] [blame] | 46 | directory = "/cluster/prodvider/", |
Sergiusz Bazanski | b13b7ff | 2019-08-29 20:12:24 +0200 | [diff] [blame] | 47 | files = [ |
| 48 | ":prodvider", |
| 49 | ], |
Sergiusz Bazanski | b13b7ff | 2019-08-29 20:12:24 +0200 | [diff] [blame] | 50 | ) |
| 51 | |
| 52 | container_image( |
| 53 | name = "runtime", |
| 54 | base = "@prodimage-bionic//image", |
| 55 | layers = [ |
| 56 | ":layer_bin", |
| 57 | ], |
| 58 | ) |
| 59 | |
| 60 | container_push( |
| 61 | name = "push", |
Sergiusz Bazanski | b13b7ff | 2019-08-29 20:12:24 +0200 | [diff] [blame] | 62 | format = "Docker", |
Serge Bazanski | 97b5cd7 | 2023-07-28 17:14:50 +0000 | [diff] [blame] | 63 | image = ":runtime", |
Sergiusz Bazanski | b13b7ff | 2019-08-29 20:12:24 +0200 | [diff] [blame] | 64 | registry = "registry.k0.hswaw.net", |
Serge Bazanski | f3312ef | 2020-08-01 17:15:52 +0200 | [diff] [blame] | 65 | repository = "q3k/prodvider", |
Serge Bazanski | 073d850 | 2023-04-01 11:17:17 +0000 | [diff] [blame] | 66 | tag = "1680303245", |
Sergiusz Bazanski | b13b7ff | 2019-08-29 20:12:24 +0200 | [diff] [blame] | 67 | ) |