Skip to content

Setting APIServer.SecureServing.Address to anything other than 127.0.0.1 envtest.Start fails. #1751

@zawachte

Description

@zawachte

Repro code:

	apiServer := envtest.APIServer{}
	apiServer.SecureServing.Address = "0.0.0.0"
	apiServer.SecureServing.Port = "6884"

	testEnv := &envtest.Environment{
		ControlPlane: envtest.ControlPlane{
			APIServer: &apiServer,
		},
	}

	//start testEnv
	cfg, err := testEnv.Start()
	if err != nil {
		log.Fatal(err)
	}

output:

2021/12/16 14:51:34 unable to install CRDs onto control plane: unable to create CRD instances: unable to create client: Get "https://0.0.0.0:6884/api?timeout=32s": x509: certificate is valid for ::1, 127.0.0.1, not 0.0.0.0
exit status 1

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