Skip to content

fix: respect KUBECONFIG env var in external repo fallback#27

Merged
scotwells merged 1 commit intomainfrom
fix/kubeconfig-env-var-fallback
Apr 10, 2026
Merged

fix: respect KUBECONFIG env var in external repo fallback#27
scotwells merged 1 commit intomainfrom
fix/kubeconfig-env-var-fallback

Conversation

@scotwells
Copy link
Copy Markdown
Contributor

Summary

  • Fixes the KUBECONFIG_FILE variable in Taskfile.yml to check the KUBECONFIG environment variable before falling back to the hardcoded .test-infra/kubeconfig path when running from an external repo.
  • This resolves compatibility with the kind-bootstrap GitHub Action, which writes the kubeconfig to its own location and sets KUBECONFIG accordingly.

Discovered in datum-cloud/unikraft-provider#2.

Test plan

  • Verify that task commands work in an external repo when KUBECONFIG env var is set by the kind-bootstrap action
  • Verify that the default .test-infra/kubeconfig fallback still works when KUBECONFIG is not set

🤖 Generated with Claude Code

When consumers use the kind-bootstrap GitHub Action, the action sets
the KUBECONFIG env var to the kubeconfig file it creates. The Taskfile
previously ignored this env var and always fell back to the hardcoded
.test-infra/kubeconfig path, causing task commands to fail.

Now the external repo branch checks the KUBECONFIG env var first and
only falls back to .test-infra/kubeconfig if the env var is unset or
the file it points to does not exist.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@scotwells scotwells merged commit c5d819a into main Apr 10, 2026
1 check passed
@scotwells scotwells deleted the fix/kubeconfig-env-var-fallback branch April 10, 2026 19:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant