kubernetes / examples

Kubernetes application example tutorials
Apache License 2.0
6.21k stars 4.54k forks source link

Fix guestbook-go image #540 #542

Open Shumakriss opened 3 months ago

Shumakriss commented 3 months ago

/kind bug

The guestbook-go Dockerfile uses a relatively out of date version of golang, especially since it uses go get instead of modules and go install. This updates the base image and switches to a module-based build.

Fixes #540

I am currently awaiting CNCF-CLA Approval but I have already signed the docs and permitted organization access to my forks of kubernetes/examples and kubernetes/contributor-playground.

The reason I started this was because I found an error in Minikube Dashboard about the guestbook pods. The error occurs when Docker attempts to pull registry.k8s.io/guestbook:v3 which is using an outdated image format or manifest version. I am hoping that resolving the build issues will also result in an updated image in the public repo that will enable everyone to run guestbook-go pods on up-to-date environments but the image needed an update either way and this is something I can help with.

Here's the error on Docker Pull that shows up in Minikube Dashboard:

Failed to pull image "registry.k8s.io/guestbook:v3": [DEPRECATION NOTICE] Docker Image Format v1 and Docker Image manifest version 2, schema 1 support is disabled by default and will be removed in an upcoming release. Suggest the author of registry.k8s.io/guestbook:v3 to upgrade the image to the OCI Format or Docker Image manifest v2, schema 2. More information at https://docs.docker.com/go/deprecated-image-specs/

linux-foundation-easycla[bot] commented 3 months ago

CLA Signed


The committers listed above are authorized under a signed CLA.

k8s-ci-robot commented 3 months ago

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Shumakriss Once this PR has been reviewed and has the lgtm label, please assign idvoretskyi 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: - **[OWNERS](https://github.com/kubernetes/examples/blob/master/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 3 months ago

Welcome @Shumakriss!

It looks like this is your first PR to kubernetes/examples 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes/examples has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. :smiley:

Shumakriss commented 3 months ago

This may also fix #506

soltysh commented 2 months ago

Can you sync with author of https://github.com/kubernetes/examples/pull/544 and figure out how to combine the two PRs into one?