autotls

package
v0.17.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 13, 2020 License: Apache-2.0 Imports: 20 Imported by: 0

README

This is the instruction about how to run Auto TLS E2E test under different configurations to test different use cases. For more details about Auto TLS feature, check out the Auto TLS feature documentation.

To run Auto TLS E2E test locally, run the following commands:

  1. test case 1: testing per ksvc certificate provision with self-signed CA
    1. kubectl label namespace serving-tests networking.internal.knative.dev/disableWildcardCert=true
    2. kubectl delete kcert --all -n serving-tests
    3. kubectl apply -f test/config/autotls/certmanager/selfsigned/
    4. go test -v -tags=e2e -count=1 -timeout=600s ./test/e2e/autotls/... -run ^TestAutoTLS$
  2. test case 2: testing per namespace certificate provision with self-signed CA
    1. kubectl delete kcert --all -n serving-tests
    2. kubectl apply -f test/config/autotls/certmanager/selfsigned/
    3. Run kubectl edit namespace serving-tests and remove the label networking.internal.knative.dev/disableWildcardCert
    4. go test -v -tags=e2e -count=1 -timeout=600s ./test/e2e/autotls/... -run ^TestAutoTLS$
  3. test case 3: testing per ksvc certificate provision with HTTP challenge
    1. kubectl label namespace serving-tests networking.internal.knative.dev/disableWildcardCert=true
    2. kubectl delete kcert --all -n serving-tests
    3. kubectl apply -f test/config/autotls/certmanager/http01/
    4. export SERVICE_NAME=http01
    5. kubectl patch cm config-domain -n knative-serving -p '{"data":{"<your-custom-domain>":""}}'
    6. Add a DNS A record to map host http01.serving-tests.<your-custom-domain> to the Ingress IP.
    7. go test -v -tags=e2e -count=1 -timeout=600s ./test/e2e/autotls/... -run ^TestAutoTLS$

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateDialContext

func CreateDialContext(t *testing.T, ing *v1alpha1.Ingress, clients *test.Clients) func(context.Context, string, string) (net.Conn, error)

CreateDialContext looks up the endpoint information to create a "dialer" for the provided Ingress' public ingress loas balancer. It can be used to contact external-visibility services with an HTTP client via:

client := &http.Client{
	Transport: &http.Transport{
		DialContext: CreateDialContext(t, ing, clients),
	},
}

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL