capactio / capact

Simple way to manage applications and infrastructure.
https://capact.io
Apache License 2.0
80 stars 19 forks source link

Add fixed k3d version used for docker images #566

Closed mszostok closed 2 years ago

mszostok commented 2 years ago

Description

As a part of https://github.com/capactio/capact/issues/492 I discovered that the capact env create k3d doesn't work.

The problematic part, was that the k3d go lib in version v4 was creating a docker container from the k3d-proxy:latest image instead of k3d-proxy:v4.4.8. The latest tag was selected as the github.com/rancher/k3d/v4/version.Version was not set.

In the k3d-proxy:latest image they change the way how the config is loaded, from the env to file backend (since v5 version, which is the latest one right now). This resulted in error:

Node 'k3d-k3d-ci-capact-serverlb' is restarting for more than a minute now. Possibly it will recover soon (e.g. when it's waiting to join). Consider using a creation timeout to avoid waiting forever in a Restart Loop. [started 22:04 UTC]

and from serverlb container logs:

C[2021-11-17T11:29:12+0000] creating initial nginx config (try 1/3)
T2021-11-17T11:29:12Z k3d-k3d-ci-capact-serverlb confd[10]: INFO Backend set to file
O2021-11-17T11:29:12Z k3d-k3d-ci-capact-serverlb confd[10]: INFO Starting confd
p2021-11-17T11:29:12Z k3d-k3d-ci-capact-serverlb confd[10]: INFO Backend source(s) set to /etc/confd/values.yaml
t2021-11-17T11:29:12Z k3d-k3d-ci-capact-serverlb confd[10]: DEBUG Loading template resources from confdir /etc/confd
n2021-11-17T11:29:12Z k3d-k3d-ci-capact-serverlb confd[10]: DEBUG Found template: /etc/confd/conf.d/nginx.toml
}2021-11-17T11:29:12Z k3d-k3d-ci-capact-serverlb confd[10]: DEBUG Loading template resource from /etc/confd/conf.d/nginx.toml
\2021-11-17T11:29:12Z k3d-k3d-ci-capact-serverlb confd[10]: DEBUG Retrieving keys from store
U2021-11-17T11:29:12Z k3d-k3d-ci-capact-serverlb confd[10]: DEBUG Key prefix set to /
x2021-11-17T11:29:12Z k3d-k3d-ci-capact-serverlb confd[10]: ERROR stat /etc/confd/values.yaml: no such file or directory
x2021-11-17T11:29:12Z k3d-k3d-ci-capact-serverlb confd[10]: FATAL stat /etc/confd/values.yaml: no such file or directory

Changes proposed in this pull request:

Related issue(s)