Skip to content

Commit

Permalink
docs(contributing): Add section for building custom image
Browse files Browse the repository at this point in the history
There didn't exist any documentation on how to build images with changes
made in https://github.com/kubernetes-sigs/karpenter.

This adds explicit documentation on how to update the `go.mod` file and
produce an image with changes made to the karpenter project.
  • Loading branch information
Pokom committed Oct 18, 2024
1 parent 4fd9b56 commit 9290093
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions website/content/en/preview/contributing/development-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,24 @@ make presubmit # run codegen, lint, and tests

If you are only interested in building the Karpenter images and not deploying the updated release to your cluster immediately with Helm, you can run

*Note: that this will produce a build with the latest version of https://github.com/kubernetes-sigs/karpenter.

```bash
export $
make image # build and push the karpenter images
```

You can test out changes made in https://github.com/kubernetes-sigs/karpenter by replacing the dependency of https://github.com/aws/karpenter-provider-aws/.
For local changes, replace `$PATH_TO_KUBERNETES_SIGS_KARPENTER` with the relative or absolute path and run:

```bash
go mod edit -replace sign.k8s.io/karpenter=$PATH_TO_KUBERNETES_SIGS_KARPENTER
```

*Note: you need to commit the go.mod changes before running `make image`

Then you can build your image as before:

```bash
make image # build and push the karpenter images
```
Expand Down

0 comments on commit 9290093

Please sign in to comment.