Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(contributing): Add section for building custom image #7250

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

Pokom
Copy link

@Pokom Pokom commented Oct 18, 2024

Fixes #N/A

Description

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.

How was this change tested?

By viewing the generated documenation.

Does this change impact docs?

  • Yes, PR includes docs updates
  • Yes, issue opened: #
  • No

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

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.
@Pokom Pokom requested a review from a team as a code owner October 18, 2024 16:49
@Pokom Pokom requested a review from jmdeal October 18, 2024 16:49
Copy link

netlify bot commented Oct 18, 2024

Deploy Preview for karpenter-docs-prod ready!

Name Link
🔨 Latest commit 57a95b0
🔍 Latest deploy log https://app.netlify.com/sites/karpenter-docs-prod/deploys/674538efd8fde1000815d7f2
😎 Deploy Preview https://deploy-preview-7250--karpenter-docs-prod.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

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

```bash
export $
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you mean to leave something here? Or does this do something I'm not aware of

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah yeah, I was debating if I wanted to explicitly add setting $KO_DOCKER_REPO but that's already called out earlier. Let me update it and remove


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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is automatically done by make apply. Was there a reason you wanted to specifically include this as a separate step ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as my comment below. My company is a heavy GitOps shop and I don't deploy karpenter via helm. make apply is not relevant to my experience and would actually cause more problems.

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`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you shouldn't need to git commit it. If you run make apply, it runs the verify target, which should run go mod tidy for you

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it. I didn't use make apply when building the images and deploying. I deploy my changes via flux and so that entire part of the process didn't apply to me. Do you prefer I remove this bit, or make a call out that you need to do this only if you're trying to build the images?

Comment on lines 82 to 84
```bash
make image # build and push the karpenter images
```
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you can probably remove these lines now that you've added more detail above

@Pokom Pokom requested a review from njtran October 24, 2024 11:14
Copy link
Contributor

github-actions bot commented Nov 7, 2024

This PR has been inactive for 14 days. StaleBot will close this stale PR after 14 more days of inactivity.

Copy link
Contributor

This PR has been inactive for 14 days. StaleBot will close this stale PR after 14 more days of inactivity.

Copy link
Contributor

This PR has been inactive for 14 days. StaleBot will close this stale PR after 14 more days of inactivity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants