Skip to content

Bind test services to an IP other than localhost #3051

Closed as not planned
Closed as not planned
@ns-sjorgedeaguiar

Description

@ns-sjorgedeaguiar

Hi,

I'm trying to expose the test cluster to a docker network but it fails to start with the default namespace not being created before the timeout. Looks like the API is not able to connect to etcd. What is the right way to get this working? I tried setting the etcd url

etcdURL := &url.URL{
	Scheme: "http",
	Host: ips[0].String() + ":2379",
}

testEnv := &envtest.Environment{
	ControlPlaneStartTimeout: time.Hour,
	CRDDirectoryPaths: crdDirs,
	ControlPlane: envtest.ControlPlane{
		APIServer: &envtest.APIServer{
			EtcdURL: etcdURL,
			SecureServing: envtest.SecureServing{
				ListenAddr: envtest.ListenAddr{
					Address: ips[0].String(),
					Port:    listenPort,
				},
			},
		},
		Etcd: &envtest.Etcd{
			URL: etcdURL,
		},
	},
}

But this didn't work, same error. Also tried setting listen-client-urls, advertise-address and listen-peer-urls in the etcd and api server, to no avail. Is this supported?

Metadata

Metadata

Assignees

No one assigned

    Labels

    lifecycle/rottenDenotes an issue or PR that has aged beyond stale and will be auto-closed.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions