Skip to content

Commit

Permalink
Merge pull request #250 from EmilienM/dev_doc
Browse files Browse the repository at this point in the history
Document how to build a custom image
  • Loading branch information
pliurh authored Feb 24, 2022
2 parents 0e39484 + a429a7e commit 9bd5b39
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ DOCKERFILE?=Dockerfile

CRD_BASES=./config/crd/bases

export APP_NAME=sriov-network-operator
export APP_NAME?=sriov-network-operator
TARGET=$(TARGET_DIR)/bin/$(APP_NAME)
IMAGE_TAG?=ghcr.io/k8snetworkplumbingwg/$(APP_NAME):latest
MAIN_PKG=cmd/manager/main.go
Expand Down
26 changes: 26 additions & 0 deletions doc/hacking.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,29 @@ Identify controller-runtime version referenced by kubebuilder
Check controller-runtime's go.mod file
As a result, we can determine the versions of the k8s dependencies in the operator's go.mod.

## Build an custom image

To build the SR-IOV network operator container image:

```bash
make image
If you want to build another image (e.g. webhook or config-daemon), you'll need to do
the following:
```bash
export DOCKERFILE=Dockerfile.sriov-network-config-daemon
export APP_NAME=sriov-network-config-daemon
make image
export DOCKERFILE=Dockerfile.webhook
export APP_NAME=sriov-network-webhook
make image
Then you'll need to push the image to a registry using e.g. `buildah push`.
Before deploying the Operator, you want to export these variables to use that custom image:
```bash
export SRIOV_NETWORK_CONFIG_DAEMON_IMAGE=<path to custom image>
(...)

0 comments on commit 9bd5b39

Please sign in to comment.