forked from kubernetes-sigs/node-feature-discovery
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Tiltfile
39 lines (34 loc) · 1.11 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
35
36
37
38
39
# -*- mode: Python -*-
BASE_IMAGE_MINIMAL="gcr.io/distroless/base"
BASE_IMAGE_FULL="debian:bullseye-slim"
BUILDER_IMAGE="golang:1.19-bullseye"
HOSTMOUNT_PREFIX="/host-"
IMAGE_TAG_NAME = os.getenv('IMAGE_TAG_NAME', "master")
IMAGE_REGISTRY = os.getenv('IMAGE_REGISTRY', "gcr.io/k8s-staging-nfd")
IMAGE_NAME = os.getenv('IMAGE_NAME', "node-feature-discovery")
# Get the image name in the following format
# registry.k8s.io/nfd/node-feature-discovery:master
IMAGE = "/".join([IMAGE_REGISTRY, IMAGE_NAME])
TAGGED_IMAGE = ":".join([IMAGE, IMAGE_TAG_NAME])
# Builds container image
def build_image():
docker_build(
TAGGED_IMAGE,
context='.',
build_args={
"BUILDER_IMAGE": BUILDER_IMAGE,
"BASE_IMAGE_MINIMAL": BASE_IMAGE_MINIMAL,
"BASE_IMAGE_FULL": BASE_IMAGE_FULL,
"HOSTMOUNT_PREFIX": HOSTMOUNT_PREFIX,
},
target="full",
ignore=['./docs/', './examples/', './demo/']
)
# Deploys manifests with kustomize
def deploy_nfd():
k8s_yaml(
kustomize('deployment/overlays/default/')
)
# Actual calls to the functions
build_image()
deploy_nfd()