kubernetes-sigs / image-builder

Tools for building Kubernetes disk images
https://image-builder.sigs.k8s.io/
Apache License 2.0
402 stars 394 forks source link

GCE: use n2-standard-2 machine type #1584

Closed aslafy-z closed 1 month ago

aslafy-z commented 1 month ago

Change description

N1 machines are less and less available. I could not build my image in multiple zones of european regions. N2 seams to be more available.

k8s-ci-robot commented 1 month ago

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Once this PR has been reviewed and has the lgtm label, please assign richardcase for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files: - **[images/capi/packer/gce/OWNERS](https://github.com/kubernetes-sigs/image-builder/blob/main/images/capi/packer/gce/OWNERS)** Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
k8s-ci-robot commented 1 month ago

Hi @aslafy-z. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.
drew-viles commented 1 month ago

Hi,

I'm not seeing anything from Google to suggest there is a removal of N1 instances happening anywhere and it's still listed in their workload types. The N1 machines are generally cheaper to run which is why this option was set originally I suspect - Though in Europe it looks to be the same now tbh.

You can override this via your own configuration file too so I'd recommend taking that approach for now: https://github.com/kubernetes-sigs/image-builder/blob/main/docs/book/src/capi/capi.md

PACKER_VAR_FILES=var_file_1.json make ...

I mean, I'm no GCE expert for what it's worth so happy to be told otherwise! 😄

AverageMarcus commented 1 month ago

Yeah I think I agree with @drew-viles on this unless there is actual indication that the n1 series is being phased out.

The price difference is quite a lot and could be a surprise for users that use the defaults and builds a lot of images. n1-standard-1 - $0.055 n2-standard-2 - $0.133382

As Drew points out, machine_type can be provided in the user vars to override this value.

Maybe we could get away with just updating the GCP docs to point this out specifically?

aslafy-z commented 1 month ago

Thank you for the feedback! I opened https://github.com/kubernetes-sigs/image-builder/pull/1608 to update the documentation. Closing this PR.