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

k8s: fix missing kubeconfig check from endpoint #1941

Merged
merged 1 commit into from
Jul 17, 2023

Conversation

crazy-max
Copy link
Member

Reported by @jer-k on Slack: https://dockercommunity.slack.com/archives/C7S7A40MP/p1689292389773349

It appears that #1430 (cc: @crazy-max)) removed the commands/util.go file. That file was the only place that called ctxkube.ConfigFromEndpoint:

func ConfigFromEndpoint(endpointName string, s store.Reader) (clientcmd.ClientConfig, error) {

From what I can tell, this makes it so any buildx instances that are using the Kubernetes driver require either

  1. KUBECONFIG=<path_to_config> to be prepended to any docker buildx commands
  2. KUBECONFIG is exported as an environment variable in your shell
  3. .kube/config to point to the cluster

Previously though ctxkube.ConfigFromEndpoint would extract the kubeconfig path from the buildx/instances/<name> file. Was this meant to be removed? It isn't a huge deal as I can resolve my issue with one of the above three approaches. I'm more so just curious 🙂

It has been an oversight during this refactoring.

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
@crazy-max crazy-max requested a review from jedevc July 17, 2023 08:11
@crazy-max crazy-max marked this pull request as ready for review July 17, 2023 08:11
@crazy-max crazy-max merged commit fb4c4f0 into docker:master Jul 17, 2023
@crazy-max crazy-max deleted the fix-kube-config branch July 17, 2023 10:36
woodpecker-bot pushed a commit to woodpecker-ci/plugin-docker-buildx that referenced this pull request Oct 17, 2023
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [docker/buildx-bin](https://github.com/docker/buildx) | stage | patch | `0.11.0` -> `0.11.2` |

---

### Release Notes

<details>
<summary>docker/buildx (docker/buildx-bin)</summary>

### [`v0.11.2`](https://github.com/docker/buildx/releases/tag/v0.11.2)

[Compare Source](docker/buildx@v0.11.1...v0.11.2)

Welcome to the v0.11.2 release of buildx!

Please try out the release binaries and report any issues at https://github.com/docker/buildx/issues.

##### Contributors

-   [Justin Chadwell](https://github.com/jedevc)
-   [CrazyMax](https://github.com/crazy-max)
-   [Sebastiaan van Stijn](https://github.com/thaJeztah)

##### Changes

-   Fix a regression that caused buildx to not read the `KUBECONFIG` path from the instance store [#&#8203;1941](docker/buildx#1941)
-   Fix a regression with result handle builds showing up in the build history incorrectly [#&#8203;1954](docker/buildx#1954)

##### Dependency Changes

-   **github.com/docker/docker**          v24.0.2 -> [`36e9e79`](docker/buildx@36e9e796c6fc)
-   **github.com/moby/buildkit**          [`67a0862`](docker/buildx@67a08623b95a) -> [`faa0cc7`](docker/buildx@faa0cc7da353)
-   **github.com/tonistiigi/fsutil**      [`9e7a6df`](docker/buildx@9e7a6df48576) -> [`36ef4d8`](docker/buildx@36ef4d8c0dbb)
-   **github.com/xeipuuv/gojsonpointer**  [`4e3ac27`](docker/buildx@4e3ac2762d5f) -> [`02993c4`](docker/buildx@02993c407bfb)

Previous release can be found at [v0.11.1](https://github.com/docker/buildx/releases/tag/v0.11.1)

### [`v0.11.1`](https://github.com/docker/buildx/releases/tag/v0.11.1)

[Compare Source](docker/buildx@v0.11.0...v0.11.1)

Welcome to the v0.11.1 release of buildx!

Please try out the release binaries and report any issues at https://github.com/docker/buildx/issues.

##### Contributors

-   [CrazyMax](https://github.com/crazy-max)
-   [Justin Chadwell](https://github.com/jedevc)
-   [David Karlsson](https://github.com/dvdksn)
-   [Jhan S. Álvarez](https://github.com/yastanotheruser)

##### Changes

-   Fix a regression for bake where services in profiles would not be loaded. [#&#8203;1903](docker/buildx#1903)

-   Fix a regression where `--cgroup-parent` option had no effect during build. [#&#8203;1913](docker/buildx#1913)

-   Fix a regression where valid docker contexts could fail buildx builder name validation. [#&#8203;1879](docker/buildx#1879)

-   Fix an issue where the `host-gateway` special address could not be used as an argument to `--add-host`. [#&#8203;1894](docker/buildx#1894) (also requires moby/moby#45767)

-   Fix a possible panic when terminal is resized during the build. [#&#8203;1929](docker/buildx#1929)

##### Dependency Changes

-   **github.com/docker/cli-docs-tool**  v0.5.1 -> v0.6.0

Previous release can be found at [v0.11.0](https://github.com/docker/buildx/releases/tag/v0.11.0)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

��� **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yMy4wIiwidXBkYXRlZEluVmVyIjoiMzcuMjQuMCIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->

Reviewed-on: https://codeberg.org/woodpecker-plugins/docker-buildx/pulls/85
Co-authored-by: Patrick Schratz <pat-s@mailbox.org>
Co-committed-by: Patrick Schratz <pat-s@mailbox.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/driver/kubernetes kind/bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants