mirror of
https://github.com/kubernetes-sigs/node-feature-discovery.git
synced 2024-12-14 11:57:51 +00:00
add initial tilt configuration
Signed-off-by: Feruzjon Muyassarov <feruzjon.muyassarov@intel.com>
This commit is contained in:
parent
2b64baef86
commit
bac1ea1642
1 changed files with 39 additions and 0 deletions
39
Tiltfile
Normal file
39
Tiltfile
Normal file
|
@ -0,0 +1,39 @@
|
|||
# -*- mode: Python -*-
|
||||
|
||||
BASE_IMAGE_MINIMAL="gcr.io/distroless/base"
|
||||
BASE_IMAGE_FULL="debian:buster-slim"
|
||||
BUILDER_IMAGE="golang:1.18-buster"
|
||||
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
|
||||
# k8s.gcr.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()
|
Loading…
Reference in a new issue