github.com/munnerz/test-infra@v0.0.0-20190108210205-ce3d181dc989/testgrid/cluster/BUILD.bazel (about) 1 # Copyright 2018 The Kubernetes Authors. 2 # 3 # Licensed under the Apache License, Version 2.0 (the "License"); 4 # you may not use this file except in compliance with the License. 5 # You may obtain a copy of the License at 6 # 7 # http://www.apache.org/licenses/LICENSE-2.0 8 # 9 # Unless required by applicable law or agreed to in writing, software 10 # distributed under the License is distributed on an "AS IS" BASIS, 11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 # See the License for the specific language governing permissions and 13 # limitations under the License. 14 15 load("@io_bazel_rules_k8s//k8s:object.bzl", "k8s_object") 16 load("@io_bazel_rules_k8s//k8s:objects.bzl", "k8s_objects") 17 load("//def:configmap.bzl", "k8s_configmap") 18 19 k8s_objects( 20 name = "dev", 21 objects = [ 22 ":testgrid-config", 23 ":configurator", 24 ":updater", 25 ], 26 ) 27 28 # TODO(fejta): move to variable and figure out real values 29 CLUSTER = "gke_fejta-prod_us-central1-f_erick" 30 31 ROOT = "gcr.io/fejta-prod/testgrid" 32 33 # TODO(fejta): wrap this in a rule like for prow 34 k8s_object( 35 name = "updater", 36 cluster = CLUSTER, 37 image_chroot = ROOT, 38 images = { 39 ROOT + "/updater:latest": "//testgrid/images:updater", 40 }, 41 kind = "Deployment", 42 namespace = "testgrid", 43 template = "updater_deployment.yaml", 44 ) 45 46 k8s_object( 47 name = "configurator", 48 cluster = CLUSTER, 49 image_chroot = ROOT, 50 images = { 51 ROOT + "/configurator:latest": "//testgrid/images:configurator", 52 }, 53 kind = "Deployment", 54 namespace = "testgrid", 55 template = "configurator_deployment.yaml", 56 ) 57 58 k8s_configmap( 59 name = "testgrid-config", 60 cluster = CLUSTER, 61 data = { 62 "config.yaml": "//testgrid:config-yaml", 63 }, 64 labels = { 65 "component": "config", 66 "app": "testgrid", 67 }, 68 namespace = "testgrid", 69 ) 70 71 filegroup( 72 name = "package-srcs", 73 srcs = glob(["**"]), 74 tags = ["automanaged"], 75 visibility = ["//visibility:private"], 76 ) 77 78 filegroup( 79 name = "all-srcs", 80 srcs = [":package-srcs"], 81 tags = ["automanaged"], 82 visibility = ["//visibility:public"], 83 )