-
Notifications
You must be signed in to change notification settings - Fork 13
/
Tiltfile
34 lines (27 loc) · 1.04 KB
/
Tiltfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# -*- mode: Python -*-
config.define_string('helm_values_file')
cfg = config.parse()
# Settings and defaults.
helm_values_file=cfg.get('helm_values_file', './tilt-chart-values.yaml')
project_name = 'newrelic-prometheus-agent'
cluster_context = 'minikube'
# Only use explicitly allowed kubeconfigs as a safety measure.
allow_k8s_contexts(cluster_context)
local_resource('Configurator binary', 'make build-multiarch', deps=[
'./cmd',
'./configurator',
])
# Images are pushed to the docker inside minikube since we use 'eval $(minikube docker-env)'.
docker_build('prometheus-configurator', '.')
docker_build('openmetrics-fake-exporter', './test/openmetrics-fake-exporter/.')
# Deploying Kubernetes resources.
k8s_yaml(
helm(
'./charts/%s' % project_name,
name=project_name,
values=helm_values_file,
set=['licenseKey=%s' % os.getenv('NR_PROM_LICENSE_KEY'), 'cluster=%s' % os.getenv('NR_PROM_CLUSTER')],
))
k8s_yaml(helm('./charts/internal/test-resources', name='test-resources'))
# Tracking the deployment.
k8s_resource(project_name)