Skip to content

fix: pin the kube version for kind in the .env file#1521

Merged
jakobmoellerdev merged 6 commits into
open-component-model:mainfrom
Skarlso:pin-in-env
Jan 8, 2026
Merged

fix: pin the kube version for kind in the .env file#1521
jakobmoellerdev merged 6 commits into
open-component-model:mainfrom
Skarlso:pin-in-env

Conversation

@Skarlso

@Skarlso Skarlso commented Jan 2, 2026

Copy link
Copy Markdown
Contributor

What this PR does / why we need it

Which issue(s) this PR fixes

Comment thread kubernetes/controller/.env Outdated
@Skarlso Skarlso marked this pull request as ready for review January 2, 2026 09:45
@Skarlso Skarlso requested a review from a team as a code owner January 2, 2026 09:45

@frewilhelm frewilhelm left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@Skarlso

Skarlso commented Jan 2, 2026

Copy link
Copy Markdown
Contributor Author

@frewilhelm That's not in the controller module. Meaning if I run the task without the root module it doesn't work.

@Skarlso

Skarlso commented Jan 2, 2026

Copy link
Copy Markdown
Contributor Author

That said, I can't figure out a way for this since Taskfiles doesn't allow nested dotenv. :(

@frewilhelm

Copy link
Copy Markdown
Contributor

@frewilhelm That's not in the controller module. Meaning if I run the task without the root module it doesn't work.

Maybe we need to move it to the controller then. The envtest version is defined in there as well

@Skarlso

Skarlso commented Jan 2, 2026

Copy link
Copy Markdown
Contributor Author

Yeah, I'm just going to add something like :

  ENVTEST_K8S_VERSION:
    sh: 'source ../../.env && echo "$ENVTEST_K8S_VERSION"'

this .

On-behalf-of: Gergely Brautigam <gergely.brautigam@sap.com>

Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com>
frewilhelm
frewilhelm previously approved these changes Jan 2, 2026
@jakobmoellerdev

Copy link
Copy Markdown
Member

instead of

ENVTEST_K8S_VERSION:
    sh: 'source ../../.env && echo "$ENVTEST_K8S_VERSION"'

I think you can use {{ .ROOT_DIR }} so that it will always pick the correct project root on the source

@Skarlso

Skarlso commented Jan 2, 2026

Copy link
Copy Markdown
Contributor Author

@jakobmoellerdev Root Dir doesn't work if I run the task from under kubernetes/controller. It will try to load the env file from under kubernetes/controller.

➜ task test/e2e/setup/local
source: open /Users/skarlso/goprojects/sap/open-component-model/kubernetes/controller/.env: no such file or directory
task: Command "source /Users/skarlso/goprojects/sap/open-component-model/kubernetes/controller/.env && echo "$KUSTOMIZE_VERSION"" failed: exit status 1

Relative path works whether I run it from root or from the kubernetes/controller folder.

@jakobmoellerdev

Copy link
Copy Markdown
Member

Relative paths are relative, so they break once you change your calling dir. If there is no parent root dir containing env I believe then you should fail or define a fallback value anyhow.

@Skarlso

Skarlso commented Jan 5, 2026

Copy link
Copy Markdown
Contributor Author

@jakobmoellerdev I'm sorry, I'm not sure what you mean. :D I'm having a brainfart. Do you mean on the values, something like this:

sh: 'test -n "$KIND_NODE_IMAGE_VERSION" && echo "$KIND_NODE_IMAGE_VERSION" || (source ../../.env && echo "$KIND_NODE_IMAGE_VERSION")'

Or do you mean on the ROOT_DIR? And how would ROOT_DIR not exist? Wouldn't it be just . if you launch it from the current folder or something? ROOT_DIR is always the location you are running the task from, isn't it?

…th local env

On-behalf-of: Gergely Brautigam <gergely.brautigam@sap.com>

Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com>
On-behalf-of: Gergely Brautigam <gergely.brautigam@sap.com>

Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com>
@Skarlso Skarlso requested a review from frewilhelm January 7, 2026 09:35
@Skarlso

Skarlso commented Jan 7, 2026

Copy link
Copy Markdown
Contributor Author

@jakobmoellerdev okay, I think this is now okay...?

Comment thread kubernetes/controller/.env
@jakobmoellerdev jakobmoellerdev enabled auto-merge (squash) January 8, 2026 14:28
Comment thread kubernetes/controller/Taskfile.yml
@jakobmoellerdev jakobmoellerdev merged commit a56d601 into open-component-model:main Jan 8, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/bugfix Bug size/s Small size/xs Extra small

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants