kubernetes-sigs/cluster-api

test framework: e2e config provider does not support git go getter value

开放

#12,264 创建于 2025年5月21日

 (4 条评论) (0 个反应) (1 位负责人)Go (1,532 个派生)auto 404
help wantedkind/bugpriority/backlogtriage/accepted

仓库指标

星标
 (4,267 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

What steps did you take and what happened?

Provide a private github repo go getter url like this in the e2e config file:

  - name: kubeadm
    type: BootstrapProvider
    versions:
      - name: v0.6.9
        value: "git::ssh://git@git.myprivate.com/myorg/myrepo//capi-providers/bootstrap-talos/?timeout=120&ref=main"
        type: kustomize

Execute the e2e test and it results in the following error:

"failed to execute kustomize: Error: must build at directory: not a valid directory: evalsymlink failure on '/Users/me/src/repo/test/e2e/config/git::ssh://git@git.myprivate.com/myorg/myrepo//capi-providers/bootstrap-talos/?timeout=120&ref=main' : lstat /Users/me/src/repo/test/e2e/config/git::ssh:: no such file or directory\n",

The error is caused by this line: https://github.com/kubernetes-sigs/cluster-api/blob/main/test/framework/clusterctl/e2e_config.go#L514

version.value is not null and version.value is not url, further it checks if the version.value is an absolute path. Absolute path should start with '/' and in our case the go getter URL doesn't have that. So it appends the current e2e config file folder path to it, resulting in value '/Users/me/src/repo/test/e2e/config/git::ssh://git@git.myprivate.com/myorg/myrepo//capi-providers/bootstrap-talos/?timeout=120&ref=main'

What did you expect to happen?

The documentation says that it should support go getter url with kustomize type: https://github.com/kubernetes-sigs/cluster-api/blob/main/test/framework/clusterctl/e2e_config.go#L167

No error should be thrown and kustomize should successfully build using a go getter url value.

Cluster API version

v1.10.1

Kubernetes version

v1.33.0

Anything else you would like to add?

No response

Label(s) to be applied

/area/e2e-testing

贡献者指南