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

[FEATURE] Config file compatible with Kustomize #945

Merged
merged 1 commit into from
Jan 31, 2022

Conversation

erikgb
Copy link
Contributor

@erikgb erikgb commented Jan 29, 2022

What

Move name to metadata.name in k3d.io/v1alpha4 Simple config file format.

Why

Fixes #937

This change in config format allow users to kustomize cluster-config using kustomize.

Implications

This is a breaking change in the v1alpha4 config-format, but this is a new and currently unreleased version.

@erikgb
Copy link
Contributor Author

erikgb commented Jan 29, 2022

@all-contributors please add @erikgb for code

@allcontributors
Copy link
Contributor

@erikgb

I've put up a pull request to add @erikgb! 🎉

Move name to metadata.name in Simple kind
@erikgb
Copy link
Contributor Author

erikgb commented Jan 29, 2022

Hmmm, I am not sure if I understand why the e2e-test is failing. Maybe you can assist me a bit, @iwilltry42? 🙏

@iwilltry42
Copy link
Member

Hi @erikgb , thank you for this PR, great! :)
I'll review it tomorrow.
Don't worry about the e2e tests. Somehow one or two of them suddenly started failing recently for no apparent reason.
I.e. they always work in my dev and test environments, but not in CI.
I have to deep-dive into this problem soon

@erikgb
Copy link
Contributor Author

erikgb commented Jan 30, 2022

Thanks @iwilltry42! K3d is such a great tool, and you are doing an excellent job as a maintainer! ❤️

I.e. they always work in my dev and test environments, but not in CI.

Ok, good to hear. I couldn't find find an apparent reason for the failure, but it might be something I missed. Note: I was unable to run the e2e-test locally. Is there some special setup that needs to be done? This is the log for an attempt:

D:~/projects/github/k3d (feat/kustomize-compat) $ make e2e
/bin/bash: golangci-lint: command not found
Running e2e tests
LOG_LEVEL="WARN" E2E_INCLUDE="" E2E_EXCLUDE="" E2E_EXTRA="" E2E_RUNNER_START_TIMEOUT=10 E2E_HELPER_IMAGE_TAG="" E2E_KEEP="" E2E_PARALLEL="" E2E_DIND_VERSION="" tests/dind.sh "5.2.2-17-ga4bc1b68"
2022-01-30 09:29:20 UTC [DIND] >>> Building container image k3d:5.2.2-17-ga4bc1b68-dind
[+] Building 0.0s (10/14)
 => [internal] load build definition from Dockerfile                                                                                                                                                                                                       0.0s
 => => transferring dockerfile: 38B                                                                                                                                                                                                                        0.0s
 => [internal] load .dockerignore                                                                                                                                                                                                                          0.0s
 => => transferring context: 34B                                                                                                                                                                                                                           0.0s
 => [internal] load metadata for docker.io/library/docker:20.10-dind                                                                                                                                                                                       1.0s
 => [internal] load metadata for docker.io/library/golang:1.17                                                                                                                                                                                             1.0s
 => CANCELED [dind 1/5] FROM docker.io/library/docker:20.10-dind@sha256:6f2ae4a5fd85ccf85cdd829057a34ace894d25d544e5e4d9f2e7109297fedf8d                                                                                                                   1.4s
 => => resolve docker.io/library/docker:20.10-dind@sha256:6f2ae4a5fd85ccf85cdd829057a34ace894d25d544e5e4d9f2e7109297fedf8d                                                                                                                                 0.0s
 => => sha256:1ea03e1895df432fba23ac2810a53a408fa25273ecf001276263d810107e1c81 0B / 1.98MB                                                                                                                                                                 0.0s
 => => sha256:1a42336ff683d7dadd320ea6fe9d93a5b101474346302d23f96c9b4546cb414d 6.39kB / 6.39kB                                                                                                                                                             0.0s
 => => sha256:1ff98835b05535c14c9bd8aa0449fd33d147a58c9a9fe7f21b76137065d0f4c5 152B / 152B                                                                                                                                                                 0.3s
 => => sha256:6f2ae4a5fd85ccf85cdd829057a34ace894d25d544e5e4d9f2e7109297fedf8d 549B / 549B                                                                                                                                                                 0.0s
 => => sha256:59bf1c3509f33515622619af21ed55bbe26d24913cedbca106468a5fb37a50c3 2.82MB / 2.82MB                                                                                                                                                             1.2s
 => => sha256:d848d730231a7e8303e538515251f95cfb6ce86ea7385c9d1bfae7cfd7eff179 2.61kB / 2.61kB                                                                                                                                                             0.0s
 => => sha256:a3f2dd7b7d653d57dbfc55dcef38007cf7ae05a4c1a226f4465b3723cb2232ed 2.10MB / 63.72MB                                                                                                                                                            0.0s
 => => extracting sha256:59bf1c3509f33515622619af21ed55bbe26d24913cedbca106468a5fb37a50c3                                                                                                                                                                  0.1s
 => => sha256:d182b62d4a3549bba88c6f8f32c2d7850ca927a7df0682d9a0de05d0c40095e2 544B / 544B                                                                                                                                                                 1.3s
 => => sha256:d7a57db2abd77c0b995c329d7812464e3734bc1af7b829bd1a42d461de77d3b7 0B / 1.02kB                                                                                                                                                                 0.0s
 => [internal] load build context                                                                                                                                                                                                                          0.4s
 => => transferring context: 25.00MB                                                                                                                                                                                                                       0.4s
 => [builder 1/4] FROM docker.io/library/golang:1.17@sha256:301609ebecc0ec4cd3174294220a4d9c92aab9015b3a2958297d7663aac627a1                                                                                                                               0.0s
 => => resolve docker.io/library/golang:1.17@sha256:301609ebecc0ec4cd3174294220a4d9c92aab9015b3a2958297d7663aac627a1                                                                                                                                       0.0s
 => CACHED [builder 2/4] WORKDIR /app                                                                                                                                                                                                                      0.0s
 => [builder 3/4] COPY . .                                                                                                                                                                                                                                 0.5s
 => ERROR [builder 4/4] RUN make build -e GIT_TAG_OVERRIDE=${GIT_TAG_OVERRIDE} && bin/k3d version                                                                                                                                                          0.5s
------
 > [builder 4/4] RUN make build -e GIT_TAG_OVERRIDE=${GIT_TAG_OVERRIDE} && bin/k3d version:
#13 0.420 Makefile:36: K3S_TAG undefined: couldn't get latest k3s image tag!
#13 0.451 Makefile:37: Output of curl:
#13 0.451 Makefile:38: *** exiting.  Stop.
------
executor failed running [/bin/sh -c make build -e GIT_TAG_OVERRIDE=${GIT_TAG_OVERRIDE} && bin/k3d version]: exit code: 2
2022-01-30 09:29:23 UTC [DIND] >>> Build failed
2022-01-30 09:29:23 UTC [DIND] >>> FATAL: test failed
make: *** [Makefile:181: e2e] Error 1
D:~/projects/github/k3d (feat/kustomize-compat) $

Copy link
Member

@iwilltry42 iwilltry42 left a comment

Choose a reason for hiding this comment

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

Great! Very clean, love it 👍
Thanks especially for the test enhancement :)

@iwilltry42 iwilltry42 self-assigned this Jan 31, 2022
@iwilltry42 iwilltry42 added this to the v5.3.0 milestone Jan 31, 2022
@iwilltry42 iwilltry42 merged commit 9a2a3ec into k3d-io:main Jan 31, 2022
@iwilltry42
Copy link
Member

Thank you very much for your contribution and the positive feedback 😃

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

Successfully merging this pull request may close these issues.

[FEATURE] Config file compatible with Kustomize
2 participants