Skip to content

Commit

Permalink
image build target additions
Browse files Browse the repository at this point in the history
- Add webhook to image build target
- use APP_NAME var in image name for consistency

Signed-off-by: adrianc <[email protected]>
  • Loading branch information
adrianchiris committed Dec 27, 2023
1 parent e7fd641 commit a608580
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,16 @@ IMAGE_BUILDER?=docker
IMAGE_BUILD_OPTS?=
DOCKERFILE?=Dockerfile
DOCKERFILE_CONFIG_DAEMON?=Dockerfile.sriov-network-config-daemon
DOCKERFILE_WEBHOOK?=Dockerfile.webhook

CRD_BASES=./config/crd/bases

export APP_NAME?=sriov-network-operator
TARGET=$(TARGET_DIR)/bin/$(APP_NAME)
IMAGE_REPO?=ghcr.io/k8snetworkplumbingwg
IMAGE_TAG?=$(IMAGE_REPO)/$(APP_NAME):latest
CONFIG_DAEMON_IMAGE_TAG?=$(IMAGE_REPO)/sriov-network-config-daemon:latest
CONFIG_DAEMON_IMAGE_TAG?=$(IMAGE_REPO)/$(APP_NAME)-config-daemon:latest
WEBHOOK_IMAGE_TAG?=$(IMAGE_REPO)/$(APP_NAME)-webhook:latest
MAIN_PKG=cmd/manager/main.go
export NAMESPACE?=openshift-sriov-network-operator
export WATCH_NAMESPACE?=openshift-sriov-network-operator
Expand Down Expand Up @@ -68,9 +70,10 @@ clean:
update-codegen:
hack/update-codegen.sh

image: ; $(info Building image...)
image: ; $(info Building images...)
$(IMAGE_BUILDER) build -f $(DOCKERFILE) -t $(IMAGE_TAG) $(CURPATH) $(IMAGE_BUILD_OPTS)
$(IMAGE_BUILDER) build -f $(DOCKERFILE_CONFIG_DAEMON) -t $(CONFIG_DAEMON_IMAGE_TAG) $(CURPATH) $(IMAGE_BUILD_OPTS)
$(IMAGE_BUILDER) build -f $(DOCKERFILE_WEBHOOK) -t $(WEBHOOK_IMAGE_TAG) $(CURPATH) $(IMAGE_BUILD_OPTS)

# Run tests
test: generate vet manifests envtest
Expand Down

0 comments on commit a608580

Please sign in to comment.