diff --git a/Makefile b/Makefile index 814942a77..92023ccee 100644 --- a/Makefile +++ b/Makefile @@ -11,12 +11,14 @@ IMAGE_PUSH_CMD ?= docker push VERSION := $(shell git describe --tags --dirty --always) IMAGE_REGISTRY ?= k8s.gcr.io/nfd -IMAGE_NAME ?= node-feature-discovery IMAGE_TAG_NAME ?= $(VERSION) IMAGE_EXTRA_TAG_NAMES ?= + +IMAGE_NAME := node-feature-discovery IMAGE_REPO := $(IMAGE_REGISTRY)/$(IMAGE_NAME) IMAGE_TAG := $(IMAGE_REPO):$(IMAGE_TAG_NAME) IMAGE_EXTRA_TAGS := $(foreach tag,$(IMAGE_EXTRA_TAG_NAMES),$(IMAGE_REPO):$(tag)) + K8S_NAMESPACE ?= kube-system # We use different mount prefix for local and container builds. @@ -28,8 +30,8 @@ else endif HOSTMOUNT_PREFIX ?= / -KUBECONFIG := -E2E_TEST_CONFIG := +KUBECONFIG ?= +E2E_TEST_CONFIG ?= LDFLAGS = -ldflags "-s -w -X sigs.k8s.io/node-feature-discovery/pkg/version.version=$(VERSION) -X sigs.k8s.io/node-feature-discovery/source.pathPrefix=$(HOSTMOUNT_PREFIX)" diff --git a/README.md b/README.md index f0bbcc007..af66fb827 100644 --- a/README.md +++ b/README.md @@ -893,17 +893,13 @@ name of the resulting container image. | Variable | Description | Default value | -------------------------- | ----------------------------------------------------------------- | ----------- | -| HOSTMOUNT_PREFIX | Prefix of system directories for feature discovery (local builds) | / -| CONTAINER_HOSTMOUNT_PREFIX | Prefix of system directories for feature discovery (container builds) | <HOSTMOUNT_PREFIX> (*if specified*) /host- (*otherwise*) +| HOSTMOUNT_PREFIX | Prefix of system directories for feature discovery (local builds) | / (*local builds*) /host- (*container builds*) | IMAGE_BUILD_CMD | Command to build the image | docker build | IMAGE_BUILD_EXTRA_OPTS | Extra options to pass to build command | *empty* | IMAGE_PUSH_CMD | Command to push the image to remote registry | docker push | IMAGE_REGISTRY | Container image registry to use | k8s.gcr.io/nfd -| IMAGE_NAME | Container image name | node-feature-discovery | IMAGE_TAG_NAME | Container image tag name | <nfd version> | IMAGE_EXTRA_TAG_NAMES | Additional container image tag(s) to create when building image | *empty* -| IMAGE_REPO | Container image repository to use | <IMAGE_REGISTRY>/<IMAGE_NAME> -| IMAGE_TAG | Full image:tag to tag the image with | <IMAGE_REPO>/<IMAGE_NAME> | K8S_NAMESPACE | nfd-master and nfd-worker namespace | kube-system | KUBECONFIG | Kubeconfig for running e2e-tests | *empty* | E2E_TEST_CONFIG | Parameterization file of e2e-tests (see [example](test/e2e/e2e-test-config.exapmle.yaml)) | *empty*