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

貢獻者指南